Loading mysql-test/r/group_by.result +30 −0 Original line number Diff line number Diff line Loading @@ -1359,4 +1359,34 @@ tt 41 SET sql_mode=@save_sql_mode; DROP TABLE t1, t2; # # BUG#38072: Wrong result: HAVING not observed in a query with aggregate # CREATE TABLE t1 ( pk int(11) NOT NULL AUTO_INCREMENT, int_nokey int(11) NOT NULL, int_key int(11) NOT NULL, varchar_key varchar(1) NOT NULL, varchar_nokey varchar(1) NOT NULL, PRIMARY KEY (pk), KEY int_key (int_key), KEY varchar_key (varchar_key) ); INSERT INTO t1 VALUES (1,5,5, 'h','h'), (2,1,1, '{','{'), (3,1,1, 'z','z'), (4,8,8, 'x','x'), (5,7,7, 'o','o'), (6,3,3, 'p','p'), (7,9,9, 'c','c'), (8,0,0, 'k','k'), (9,6,6, 't','t'), (10,0,0,'c','c'); explain SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar'; X drop table t1; End of 5.0 tests mysql-test/r/order_by.result +16 −0 Original line number Diff line number Diff line Loading @@ -1076,3 +1076,19 @@ set session max_sort_length= 2180; select * from t1 order by b; ERROR HY001: Out of sort memory; increase server sort buffer size drop table t1; # # Bug #39844: Query Crash Mysql Server 5.0.67 # CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t2 (a INT PRIMARY KEY, b INT); CREATE TABLE t3 (c INT); INSERT INTO t1 (a) VALUES (1), (2); INSERT INTO t2 (a,b) VALUES (1,2), (2,3); INSERT INTO t3 (c) VALUES (1), (2); SELECT (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) FROM t3; (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) 2 NULL DROP TABLE t1, t2, t3; mysql-test/r/rpl_flush_log_loop.result +33 −2 Original line number Diff line number Diff line Loading @@ -20,5 +20,36 @@ master_password='',master_port=SLAVE_PORT; start slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 208 # # slave-bin.000001 Yes Yes 0 0 208 # None 0 No # Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 98 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running Yes Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 Exec_Master_Log_Pos 98 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # mysql-test/r/status2.result 0 → 100644 +64 −0 Original line number Diff line number Diff line # # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines # FLUSH STATUS; DROP TABLE IF EXISTS t1,t2; DROP PROCEDURE IF EXISTS p1; DROP FUNCTION IF EXISTS f1; CREATE FUNCTION f1() RETURNS INTEGER BEGIN DECLARE foo INTEGER; DECLARE bar INTEGER; SET foo=1; SET bar=2; RETURN foo; END $$ CREATE PROCEDURE p1() BEGIN SELECT 1; END $$ CREATE TABLE t1 (c1 INT); CREATE TABLE t2 (c1 INT); INSERT INTO t1 VALUES (1); Assert Questions == 9 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 9 SELECT f1(); f1() 1 Assert Questions == 11 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 11 CALL p1(); 1 1 Assert Questions == 13 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 13 SELECT 1; 1 1 Assert Questions == 15 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 15 FLUSH STATUS; SELECT 1; 1 1 Assert Questions == 16 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 16 Global status updated; Assert diff == 4 FLUSH STATUS; SELECT 4; 4 4 DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; End of 6.0 tests mysql-test/r/view.result +2 −0 Original line number Diff line number Diff line Loading @@ -3677,6 +3677,8 @@ DROP VIEW v1; # -- End of test case for Bug#35193. CREATE VIEW v1 AS SELECT 1; DROP VIEW v1; # ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- Loading
mysql-test/r/group_by.result +30 −0 Original line number Diff line number Diff line Loading @@ -1359,4 +1359,34 @@ tt 41 SET sql_mode=@save_sql_mode; DROP TABLE t1, t2; # # BUG#38072: Wrong result: HAVING not observed in a query with aggregate # CREATE TABLE t1 ( pk int(11) NOT NULL AUTO_INCREMENT, int_nokey int(11) NOT NULL, int_key int(11) NOT NULL, varchar_key varchar(1) NOT NULL, varchar_nokey varchar(1) NOT NULL, PRIMARY KEY (pk), KEY int_key (int_key), KEY varchar_key (varchar_key) ); INSERT INTO t1 VALUES (1,5,5, 'h','h'), (2,1,1, '{','{'), (3,1,1, 'z','z'), (4,8,8, 'x','x'), (5,7,7, 'o','o'), (6,3,3, 'p','p'), (7,9,9, 'c','c'), (8,0,0, 'k','k'), (9,6,6, 't','t'), (10,0,0,'c','c'); explain SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING SELECT COUNT(varchar_key) AS X FROM t1 WHERE pk = 8 having 'foo'='bar'; X drop table t1; End of 5.0 tests
mysql-test/r/order_by.result +16 −0 Original line number Diff line number Diff line Loading @@ -1076,3 +1076,19 @@ set session max_sort_length= 2180; select * from t1 order by b; ERROR HY001: Out of sort memory; increase server sort buffer size drop table t1; # # Bug #39844: Query Crash Mysql Server 5.0.67 # CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t2 (a INT PRIMARY KEY, b INT); CREATE TABLE t3 (c INT); INSERT INTO t1 (a) VALUES (1), (2); INSERT INTO t2 (a,b) VALUES (1,2), (2,3); INSERT INTO t3 (c) VALUES (1), (2); SELECT (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) FROM t3; (SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a) 2 NULL DROP TABLE t1, t2, t3;
mysql-test/r/rpl_flush_log_loop.result +33 −2 Original line number Diff line number Diff line Loading @@ -20,5 +20,36 @@ master_password='',master_port=SLAVE_PORT; start slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 208 # # slave-bin.000001 Yes Yes 0 0 208 # None 0 No # Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 98 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running Yes Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 Exec_Master_Log_Pos 98 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master #
mysql-test/r/status2.result 0 → 100644 +64 −0 Original line number Diff line number Diff line # # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines # FLUSH STATUS; DROP TABLE IF EXISTS t1,t2; DROP PROCEDURE IF EXISTS p1; DROP FUNCTION IF EXISTS f1; CREATE FUNCTION f1() RETURNS INTEGER BEGIN DECLARE foo INTEGER; DECLARE bar INTEGER; SET foo=1; SET bar=2; RETURN foo; END $$ CREATE PROCEDURE p1() BEGIN SELECT 1; END $$ CREATE TABLE t1 (c1 INT); CREATE TABLE t2 (c1 INT); INSERT INTO t1 VALUES (1); Assert Questions == 9 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 9 SELECT f1(); f1() 1 Assert Questions == 11 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 11 CALL p1(); 1 1 Assert Questions == 13 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 13 SELECT 1; 1 1 Assert Questions == 15 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 15 FLUSH STATUS; SELECT 1; 1 1 Assert Questions == 16 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 16 Global status updated; Assert diff == 4 FLUSH STATUS; SELECT 4; 4 4 DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; End of 6.0 tests
mysql-test/r/view.result +2 −0 Original line number Diff line number Diff line Loading @@ -3677,6 +3677,8 @@ DROP VIEW v1; # -- End of test case for Bug#35193. CREATE VIEW v1 AS SELECT 1; DROP VIEW v1; # ----------------------------------------------------------------- # -- End of 5.0 tests. # -----------------------------------------------------------------