summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-08-14 13:44:15 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-08-14 13:44:15 +0500
commitde619bd17c69453dc115fad746719b0751de87f5 (patch)
tree53eaf037f0205e6fad795d1db3d180a456adb0c0 /mysql-test/t
parentc4ba195a7ec99221d249d781d96f908bf1e5518a (diff)
parent5c5233cd2b71fc28a07fbe9d9f625702bcb85ce6 (diff)
downloadmariadb-git-de619bd17c69453dc115fad746719b0751de87f5.tar.gz
Merge gleb.loc:/home/uchum/work/bk/5.0
into gleb.loc:/home/uchum/work/bk/5.0-opt
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/rpl_relayspace.test16
-rw-r--r--mysql-test/t/rpl_timezone.test29
-rw-r--r--mysql-test/t/select.test30
-rw-r--r--mysql-test/t/type_bit.test19
4 files changed, 92 insertions, 2 deletions
diff --git a/mysql-test/t/rpl_relayspace.test b/mysql-test/t/rpl_relayspace.test
index 70315c14f34..d4ef2fe59bd 100644
--- a/mysql-test/t/rpl_relayspace.test
+++ b/mysql-test/t/rpl_relayspace.test
@@ -14,6 +14,22 @@ connection slave;
reset slave;
start slave io_thread;
# Give the I/O thread time to block.
+let $run= 1;
+let $counter= 300;
+while ($run)
+{
+ let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1);
+ if (`SELECT '$io_state' = 'Waiting for the slave SQL thread to free enough relay log space'`){
+ let $run= 0;
+ }
+ sleep 0.1;
+ if (!$counter){
+ --echo "Failed while waiting for slave IO thread block"
+ SHOW SLAVE STATUS;
+ exit;
+ }
+ dec $counter;
+}
sleep 2;
# A bug caused the I/O thread to refuse stopping.
stop slave io_thread;
diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test
index 6ed5b21ace0..28ca250340e 100644
--- a/mysql-test/t/rpl_timezone.test
+++ b/mysql-test/t/rpl_timezone.test
@@ -126,8 +126,33 @@ connection master;
drop table t1, t2;
sync_slave_with_master;
-# End of 4.1 tests
-
# Restore original timezone
connection master;
set global time_zone= @my_time_zone;
+
+--echo End of 4.1 tests
+
+#
+# Bug #29536: timestamp inconsistent in replication around 1970
+#
+connection master;
+
+CREATE TABLE t1 (a INT, b TIMESTAMP);
+INSERT INTO t1 VALUES (1, NOW());
+
+SET @@session.time_zone='Japan';
+UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
+SELECT * FROM t1 ORDER BY a;
+
+sync_slave_with_master;
+SET @@session.time_zone='Japan';
+# must procdure the same result as the SELECT on the master
+SELECT * FROM t1 ORDER BY a;
+
+SET @@session.time_zone = default;
+connection master;
+DROP TABLE t1;
+SET @@session.time_zone = default;
+
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 56b2f1b02b8..8bfa12539fa 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -3370,4 +3370,34 @@ EXPLAIN SELECT COUNT(*) FROM t1 f1 INNER JOIN t1 f2
WHERE 1 AND f1.b NOT IN (100,2232,3343,51111);
DROP TABLE t1;
+#
+# Bug #27352: Incorrect result of nested selects instead of error reporting
+#
+
+CREATE TABLE t1 (c1 INT, c2 INT);
+INSERT INTO t1 VALUES (1,11), (2,22), (2,22);
+
+let $n= 31;
+let $q= COUNT(c2);
+while ($n)
+{
+ let $q= (SELECT $q);
+ dec $n;
+}
+--disable_warnings
+eval EXPLAIN SELECT c1 FROM t1 WHERE $q > 0;
+--enable_warnings
+
+let $n= 64;
+let $q= COUNT(c2);
+while ($n)
+{
+ let $q= (SELECT $q);
+ dec $n;
+}
+--error ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
+eval EXPLAIN SELECT c1 FROM t1 WHERE $q > 0;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 48ad24ff6b7..6423d017afb 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -272,4 +272,23 @@ handler t1 read a=(1);
handler t1 close;
drop table t1;
+#
+# Bug #30219: GROUP BY a column of the BIT type
+#
+
+CREATE TABLE t1 (b BIT(2), a VARCHAR(5));
+INSERT INTO t1 (b, a) VALUES (1, "x"), (3, "zz"), (0, "y"), (3, "z");
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), b BIT(2));
+INSERT INTO t1 (b, a) VALUES (1, "x"), (3, "zz"), (0, "y"), (3, "z");
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT, b BIT(2));
+INSERT INTO t1 (b, a) VALUES (1, 1), (3, 2), (0, 3), (3, 4);
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
--echo End of 5.0 tests