summaryrefslogtreecommitdiffstats
path: root/debian/patches/2777-fix-disks-disk-test.patch
blob: 49b88ef6b94021a0a8bd5ac121c9f23890ccf571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Forwarded: not-needed
Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2777.patch
Bug: https://github.com/MariaDB/server/pull/2777
From: Daniel Black <daniel@mariadb.org>
Date: Thu, 5 Oct 2023 16:55:34 +0300
Subject: [PATCH] MDEV-21587: disk.disk{_notembedded} test result

Allow for a CI system to be almost out of space, or having so
little use, that the Total space is the same as available or used.

Thanks Otto Kekäläinen for the bug report and testing.
---
 plugin/disks/mysql-test/disks/disks.result             | 4 ++--
 plugin/disks/mysql-test/disks/disks.test               | 2 +-
 plugin/disks/mysql-test/disks/disks_notembedded.result | 8 ++++----
 plugin/disks/mysql-test/disks/disks_notembedded.test   | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

--- a/plugin/disks/mysql-test/disks/disks.result
+++ b/plugin/disks/mysql-test/disks/disks.result
@@ -7,6 +7,6 @@ DISKS	CREATE TEMPORARY TABLE `DISKS` (
   `Used` bigint(32) NOT NULL,
   `Available` bigint(32) NOT NULL
 ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
-sum(Total) > sum(Available)	sum(Total)>sum(Used)
+select sum(Total) >= sum(Available), sum(Total)>=sum(Used) from information_schema.disks;
+sum(Total) >= sum(Available)	sum(Total)>=sum(Used)
 1	1
--- a/plugin/disks/mysql-test/disks/disks.test
+++ b/plugin/disks/mysql-test/disks/disks.test
@@ -1,3 +1,3 @@
 --replace_regex /varchar\([0-9]+\)/varchar(pathlen)/
 show create table information_schema.disks;
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
+select sum(Total) >= sum(Available), sum(Total)>=sum(Used) from information_schema.disks;
--- a/plugin/disks/mysql-test/disks/disks_notembedded.result
+++ b/plugin/disks/mysql-test/disks/disks_notembedded.result
@@ -6,16 +6,16 @@ CREATE USER user1@localhost;
 GRANT SELECT ON *.* TO user1@localhost;
 connect  con1,localhost,user1,,;
 connection con1;
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
-sum(Total) > sum(Available)	sum(Total)>sum(Used)
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
+sum(Total) >= sum(Available)	sum(Total) >= sum(Used)
 NULL	NULL
 disconnect con1;
 connection default;
 GRANT FILE ON *.* TO user1@localhost;
 connect  con1,localhost,user1,,;
 connection con1;
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
-sum(Total) > sum(Available)	sum(Total)>sum(Used)
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
+sum(Total) >= sum(Available)	sum(Total) >= sum(Used)
 1	1
 connection default;
 DROP USER user1@localhost;
--- a/plugin/disks/mysql-test/disks/disks_notembedded.test
+++ b/plugin/disks/mysql-test/disks/disks_notembedded.test
@@ -10,7 +10,7 @@ GRANT SELECT ON *.* TO user1@localhost;

 connect (con1,localhost,user1,,);
 connection con1;
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
 disconnect con1;

 connection default;
@@ -18,7 +18,7 @@ GRANT FILE ON *.* TO user1@localhost;

 connect (con1,localhost,user1,,);
 connection con1;
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
 connection default;
 DROP USER user1@localhost;