diff options
Diffstat (limited to 'mysql-test/r')
29 files changed, 789 insertions, 116 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index e865d775c6a..a250821d12b 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12717,3 +12717,13 @@ COUNT(t1.a) 729 DROP TABLE t1; SET @@join_buffer_size= @save_join_buffer_size; +End of 5.1 tests +CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(128) NOT NULL, PRIMARY KEY(id)) ENGINE=archive; +INSERT INTO t1 VALUES(NULL,'a'),(NULL,'a'); +CREATE TABLE t2(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(128) NOT NULL, PRIMARY KEY(id)) ENGINE=archive; +INSERT INTO t2 VALUES(NULL,'b'),(NULL,'b'); +SELECT t1.id, t2.id, t1.name, t2.name FROM t1,t2 WHERE t1.id = t2.id; +id id name name +1 1 a b +2 2 a b +DROP TABLE t1,t2; diff --git a/mysql-test/r/deprecated_features.result b/mysql-test/r/deprecated_features.result new file mode 100644 index 00000000000..ecfb830542d --- /dev/null +++ b/mysql-test/r/deprecated_features.result @@ -0,0 +1,26 @@ +set global log_bin_trust_routine_creators=1; +ERROR HY000: Unknown system variable 'log_bin_trust_routine_creators' +set table_type='MyISAM'; +ERROR HY000: Unknown system variable 'table_type' +select @@table_type='MyISAM'; +ERROR HY000: Unknown system variable 'table_type' +backup table t1 to 'data.txt'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'backup table t1 to 'data.txt'' at line 1 +restore table t1 from 'data.txt'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'restore table t1 from 'data.txt'' at line 1 +show plugin; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'plugin' at line 1 +load table t1 from master; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table t1 from master' at line 1 +load data from master; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from master' at line 1 +SHOW INNODB STATUS; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNODB STATUS' at line 1 +create table t1 (t6 timestamp(6)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6))' at line 1 +create table t1 (t6 timestamp) type=myisam; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=myisam' at line 1 +show table types; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'types' at line 1 +show mutex status; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mutex status' at line 1 diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 42739b10d50..54bd05e526f 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -86,6 +86,26 @@ select 1; 1 1 unlock tables; +drop table if exists t1,t2; +create table t1 (a int); +create table t2 (a int); +lock table t1 read; +drop table t2; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +drop table t1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +unlock tables; +drop table t1,t2; +create table t1 (i int); +create table t2 (i int); +lock tables t1 read; +lock tables t2 read; +drop table t1; +ERROR HY000: Table 't1' was not locked with LOCK TABLES +drop table t1,t2; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +unlock tables; +drop table t1,t2; End of 5.0 tests create database mysql_test; create table mysql_test.t1(f1 int); diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index d15daf2e4b0..b5863b94026 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -55,6 +55,42 @@ Error 1054 Unknown column 'b' in 'field list' INSERT INTO t1 SELECT b FROM t1; ERROR 42S22: Unknown column 'b' in 'field list' DROP TABLE t1; +flush status; +drop table if exists t1, t2; +create table t1 (a int unique); +create table t2 (a int); +drop function if exists f1; +Warnings: +Note 1305 FUNCTION f1 does not exist +drop function if exists f2; +Warnings: +Note 1305 FUNCTION f2 does not exist +create function f1() returns int +begin +insert into t1 (a) values (1); +insert into t1 (a) values (1); +return 1; +end| +create function f2() returns int +begin +insert into t2 (a) values (1); +return 2; +end| +flush status; +select f1(), f2(); +ERROR 23000: Duplicate entry '1' for key 'a' +show status like 'Com_insert'; +Variable_name Value +Com_insert 2 +select * from t1; +a +1 +select * from t2; +a +drop table t1; +drop table t2; +drop function f1; +drop function f2; SET NAMES utf8; SET sql_quote_show_create= _binary x'5452C39C45'; ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE' diff --git a/mysql-test/r/flush2.result b/mysql-test/r/flush2.result index 5056955c7b7..13bcc371ef6 100644 --- a/mysql-test/r/flush2.result +++ b/mysql-test/r/flush2.result @@ -4,11 +4,9 @@ show variables like 'log_bin%'; Variable_name Value log_bin OFF log_bin_trust_function_creators ON -log_bin_trust_routine_creators ON flush logs; show variables like 'log_bin%'; Variable_name Value log_bin OFF log_bin_trust_function_creators ON -log_bin_trust_routine_creators ON set global expire_logs_days = 0; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 742d4b90807..e6063047ba4 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -107,8 +107,9 @@ SELECT cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 cid CONCAT(firstname, ' ', surname) COUNT(call_id) SELECT HIGH_PRIORITY cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid ORDER BY surname, firstname; cid CONCAT(firstname, ' ', surname) COUNT(call_id) -drop table t1,t2; +drop table t2; unlock tables; +drop table t1; CREATE TABLE t1 ( bug_id mediumint(9) NOT NULL auto_increment, groupset bigint(20) DEFAULT '0' NOT NULL, diff --git a/mysql-test/r/insert_notembedded.result b/mysql-test/r/insert_notembedded.result index ac69cb65972..2315d695abe 100644 --- a/mysql-test/r/insert_notembedded.result +++ b/mysql-test/r/insert_notembedded.result @@ -122,5 +122,6 @@ a b connection: default select * from t1; a b +unlock tables; drop table t1; set low_priority_updates=default; diff --git a/mysql-test/r/ipv4_as_ipv6.result b/mysql-test/r/ipv4_as_ipv6.result new file mode 100644 index 00000000000..8523dc82f02 --- /dev/null +++ b/mysql-test/r/ipv4_as_ipv6.result @@ -0,0 +1,179 @@ +=============Test of '127.0.0.1' (IPv4) =========================== +mysqld is alive +CREATE USER testuser@'127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'127.0.0.1'; +SHOW GRANTS FOR testuser@'127.0.0.1'; +Grants for testuser@127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +SET @nip= inet_aton('127.0.0.1'); +SELECT @nip; +@nip +2130706433 +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +127.0.0.1 +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'127.0.0.1'; +RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1'; +SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'127.0.0.1'; +=============Test of '0:0:0:0:0:FFFF:127.0.0.1' =================== +mysqld is alive +CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' +SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1'; +=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +=============Test of '0::0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1'; +Grants for testuser@0::0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0::0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0::0000:FFFF:127.0.0.1'; +=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================ +=============Test of '::FFFF:127.0.0.1' =========================== +mysqld is alive +CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1'; +Grants for testuser@::FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1' +SET @nip= inet_aton('::FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1'; +RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'::FFFF:127.0.0.1'; +=============Test of '::FFFF:127.0.0.1/96' ======================== +=============Test of '::1' ======================== +connect (con1, ::1, root, , test, MASTER_MYPORT,); +Got one of the listed errors diff --git a/mysql-test/r/ipv4_as_ipv6_win.result b/mysql-test/r/ipv4_as_ipv6_win.result new file mode 100644 index 00000000000..45e23d4d7e6 --- /dev/null +++ b/mysql-test/r/ipv4_as_ipv6_win.result @@ -0,0 +1,32 @@ +=============Test of '127.0.0.1' (IPv4) =========================== +mysqld is alive +CREATE USER testuser@'127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'127.0.0.1'; +SHOW GRANTS FOR testuser@'127.0.0.1'; +Grants for testuser@127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +SET @nip= inet_aton('127.0.0.1'); +SELECT @nip; +@nip +2130706433 +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +127.0.0.1 +SELECT USER(); +USER() +root@127.0.0.1 +SELECT current_user(); +current_user() +root@127.0.0.1 +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'127.0.0.1'; +RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1'; +SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@127.0.0.1 +DROP USER testuser1@'127.0.0.1'; +=============Test of '::1' ======================== +connect (con1, ::1, root, , test, MASTER_MYPORT); +Got one of the listed errors diff --git a/mysql-test/r/ipv6.result b/mysql-test/r/ipv6.result new file mode 100644 index 00000000000..566938296a9 --- /dev/null +++ b/mysql-test/r/ipv6.result @@ -0,0 +1,264 @@ +=============Test of '::1' ======================================== +mysqld is alive +CREATE USER testuser@'::1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'::1'; +SHOW GRANTS FOR testuser@'::1'; +Grants for testuser@::1 +GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1' +SET @nip= inet_aton('::1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'::1'; +RENAME USER testuser@'::1' to testuser1@'::1'; +SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'::1'; +=============Test of '::1/128' ==================================== +=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ==== +mysqld is alive +CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001 +GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' +SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001'; +SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001'; +=============Test of '0:0:0:0:0:0:0:1' ============================ +mysqld is alive +CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1'; +SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1'; +Grants for testuser@0:0:0:0:0:0:0:1 +GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1' +SET @nip= inet_aton('0:0:0:0:0:0:0:1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1'; +RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1'; +SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0:0:0:0:0:0:0:1'; +=============Test of '127.0.0.1' (IPv4) =========================== +mysqld is alive +CREATE USER testuser@'127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'127.0.0.1'; +SHOW GRANTS FOR testuser@'127.0.0.1'; +Grants for testuser@127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +SET @nip= inet_aton('127.0.0.1'); +SELECT @nip; +@nip +2130706433 +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +127.0.0.1 +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'127.0.0.1'; +RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1'; +SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'127.0.0.1'; +=============Test of '0:0:0:0:0:FFFF:127.0.0.1' =================== +mysqld is alive +CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' +SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1'; +RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1'; +=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; +=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1'; +=============Test of '0::0000:FFFF:127.0.0.1' ==== +mysqld is alive +CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1'; +Grants for testuser@0::0000:FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' +SET @nip= inet_aton('0::0000:FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1'; +RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'0::0000:FFFF:127.0.0.1'; +=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================ +=============Test of '::FFFF:127.0.0.1' =========================== +mysqld is alive +CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1'; +SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1'; +Grants for testuser@::FFFF:127.0.0.1 +GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1' +SET @nip= inet_aton('::FFFF:127.0.0.1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@localhost +SELECT current_user(); +current_user() +root@localhost +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1'; +RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1'; +SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@localhost +DROP USER testuser1@'::FFFF:127.0.0.1'; +=============Test of '::FFFF:127.0.0.1/96' ======================== diff --git a/mysql-test/r/ipv6_win.result b/mysql-test/r/ipv6_win.result new file mode 100644 index 00000000000..8082e8aa25e --- /dev/null +++ b/mysql-test/r/ipv6_win.result @@ -0,0 +1,88 @@ +=============Test of '::1' ======================================== +mysqld is alive +CREATE USER testuser@'::1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'::1'; +SHOW GRANTS FOR testuser@'::1'; +Grants for testuser@::1 +GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1' +SET @nip= inet_aton('::1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@::1 +SELECT current_user(); +current_user() +root@::1 +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'::1'; +RENAME USER testuser@'::1' to testuser1@'::1'; +SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@::1 +DROP USER testuser1@'::1'; +=============Test of '::1/128' ==================================== +=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ==== +mysqld is alive +CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001 +GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' +SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@::1 +SELECT current_user(); +current_user() +root@::1 +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; +RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001'; +SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@::1 +DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001'; +=============Test of '0:0:0:0:0:0:0:1' ============================ +mysqld is alive +CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234'; +GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1'; +SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1'; +Grants for testuser@0:0:0:0:0:0:0:1 +GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1' +SET @nip= inet_aton('0:0:0:0:0:0:0:1'); +SELECT @nip; +@nip +NULL +SELECT inet_ntoa(@nip); +inet_ntoa(@nip) +NULL +SELECT USER(); +USER() +root@::1 +SELECT current_user(); +current_user() +root@::1 +SHOW PROCESSLIST; +REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1'; +RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1'; +SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876'); +SELECT USER(); +USER() +root@::1 +DROP USER testuser1@'0:0:0:0:0:0:0:1'; diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 7ec07fb5273..1f8f6aa04ae 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -48,6 +48,9 @@ unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; drop table t1,t2; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables; +drop table t1,t2; create table t1 (c1 int); create table t2 (c1 int); create table t3 (c1 int); @@ -69,6 +72,9 @@ ERROR HY000: Table 't2' was locked with a READ lock and can't be updated delete t2 from t1,t2 where t1.a=t2.a; ERROR HY000: Table 't2' was locked with a READ lock and can't be updated drop table t1,t2; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +unlock tables; +drop table t2,t1; End of 4.1 tests. drop table if exists t1; create table t1 (a int); diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index d8768e802ea..3f1165fd069 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -27,6 +27,7 @@ update t1,t2 set c=a where b=d; select c from t2; c 2 +unlock tables; drop table t1; drop table t2; create table t1 (a int); @@ -209,3 +210,12 @@ select @tlwa < @tlwb; @tlwa < @tlwb 1 End of 5.1 tests +drop table if exists t1; +create table t1 (i int); +connection: default +lock tables t1 write; +connection: flush +flush tables with read lock;; +connection: default +flush tables; +drop table t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 95fdc4fb93d..16e8a8e5ad1 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -529,6 +529,7 @@ select straight_join * from t1,t2 force index (primary) where t1.a=t2.a; a a b 1 1 1 2 2 1 +unlock tables; drop table t1,t2; CREATE TABLE t1 (c1 varchar(250) NOT NULL); CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1)); @@ -542,6 +543,7 @@ INSERT INTO t2 VALUES ('test000001'), ('test000005'); SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2 WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1; t1c1 t2c1 +UNLOCK TABLES; DROP TABLE t1,t2; CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM; Got one of the listed errors diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result index fbcd8aed17a..dd14c31f32e 100644 --- a/mysql-test/r/myisampack.result +++ b/mysql-test/r/myisampack.result @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE, c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY); INSERT INTO t1 VALUES @@ -85,5 +86,37 @@ FLUSH TABLE mysql_db1.t1; SELECT COUNT(*) FROM mysql_db1.t1 WHERE c2 < 5; COUNT(*) 128 +# ===== myisampack.1 ===== +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(20); +CREATE TABLE t2(a INT); +INSERT INTO t2 VALUES(40); +FLUSH TABLE t1,t2; +#If the myisampack --join operation is successful, we have table t3(.frm) +#so we should be able to query about the table from server. +SELECT COUNT(a) FROM t3; +COUNT(a) +1024 +# ===== myisampack.2 ===== +FLUSH TABLE t3; +#Tests the myisampack join operation with an existing destination .frm file, +#the command should return correct exit status(0) and +#we should be able to query the table. +SELECT COUNT(a) FROM t3; +COUNT(a) +1024 +# ===== myisampack.3 ===== +DROP TABLE t3; +#Tests the myisampack join operation without frm file for the first and second table +#No frm file is generated in this and we shouldn't be able to access the newly +#created table +SELECT COUNT(a) FROM t3; +ERROR 42S02: Table 'test.t3' doesn't exist +# ===== myisampack.4 ===== +#Tests the myisampack join operation with an existing destination .frm,.MYI,.MDI +#the command should fail with exit status 2 +myisampack: Can't create/write to file (Errcode: 17) +Aborted: file is not compressed +DROP TABLE t1,t2,t3; DROP TABLE mysql_db1.t1; DROP DATABASE mysql_db1; diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 065e46dbf92..543a70f9a2a 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -2048,23 +2048,4 @@ CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM PARTITION BY HASH(id) PARTITIONS 2; DROP TABLE t1; SET SESSION SQL_MODE=DEFAULT; -# -# BUG#45816 - assertion failure with index containing double -# column on partitioned table -# -CREATE TABLE t1 ( -a INT DEFAULT NULL, -b DOUBLE DEFAULT NULL, -c INT DEFAULT NULL, -KEY idx2(b,a) -) PARTITION BY HASH(c) PARTITIONS 3; -INSERT INTO t1 VALUES (6,8,9); -INSERT INTO t1 VALUES (6,8,10); -SELECT 1 FROM t1 JOIN t1 AS t2 USING (a) FOR UPDATE; -1 -1 -1 -1 -1 -DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index 3ab65c24040..1603ecec127 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -412,8 +412,6 @@ prepare stmt1 from ' optimize table t1 ' ; prepare stmt1 from ' analyze table t1 ' ; prepare stmt1 from ' checksum table t1 ' ; prepare stmt1 from ' repair table t1 ' ; -prepare stmt1 from ' restore table t1 from ''<MYSQLTEST_VARDIR>/tmp/data.txt'' ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' handler t1 open '; ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' commit ' ; diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index d9bf7a6d814..25894634bf3 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -93,6 +93,7 @@ a 3 SELECT * FROM t1; a +UNLOCK TABLES; drop table t1; flush query cache; reset query cache; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 091d932a6fc..50384149a26 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -808,7 +808,6 @@ show plugins; show columns in t1; show slave hosts; show keys in t1; -show table types; show storage engines; show authors; show contributors; @@ -1291,11 +1290,6 @@ delete from mysql.db where user='mysqltest_4'; delete from mysql.tables_priv where user='mysqltest_4'; flush privileges; drop database mysqltest; -show full plugin; -show warnings; -Level Code Message -Warning 1287 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 6.0. Please use 'SHOW PLUGINS' instead -show plugin; show plugins; create database `mysqlttest\1`; create table `mysqlttest\1`.`a\b` (a int); @@ -1447,7 +1441,6 @@ DROP PROCEDURE p1; DROP FUNCTION f1; DROP TABLE t1; DROP EVENT ev1; -SHOW TABLE TYPES; CREATE USER test_u@localhost; GRANT PROCESS ON *.* TO test_u@localhost; SHOW ENGINE MYISAM MUTEX; diff --git a/mysql-test/r/signal_code.result b/mysql-test/r/signal_code.result index 8cda8877216..2ecba4701fa 100644 --- a/mysql-test/r/signal_code.result +++ b/mysql-test/r/signal_code.result @@ -20,16 +20,16 @@ return 0; end $$ show procedure code signal_proc; Pos Instruction -0 stmt 135 "SIGNAL foo" -1 stmt 135 "SIGNAL foo SET MESSAGE_TEXT = "This i..." -2 stmt 136 "RESIGNAL foo" -3 stmt 136 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +0 stmt 131 "SIGNAL foo" +1 stmt 131 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 132 "RESIGNAL foo" +3 stmt 132 "RESIGNAL foo SET MESSAGE_TEXT = "This..." drop procedure signal_proc; show function code signal_func; Pos Instruction -0 stmt 135 "SIGNAL foo" -1 stmt 135 "SIGNAL foo SET MESSAGE_TEXT = "This i..." -2 stmt 136 "RESIGNAL foo" -3 stmt 136 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +0 stmt 131 "SIGNAL foo" +1 stmt 131 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 132 "RESIGNAL foo" +3 stmt 132 "RESIGNAL foo SET MESSAGE_TEXT = "This..." 4 freturn 3 0 drop function signal_func; diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 949976719ea..0a0f620b80a 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -155,11 +155,11 @@ Pos Instruction 0 stmt 9 "drop temporary table if exists sudoku..." 1 stmt 1 "create temporary table sudoku_work ( ..." 2 stmt 1 "create temporary table sudoku_schedul..." -3 stmt 93 "call sudoku_init()" +3 stmt 89 "call sudoku_init()" 4 jump_if_not 7(8) p_naive@0 5 stmt 4 "update sudoku_work set cnt = 0 where ..." 6 jump 8 -7 stmt 93 "call sudoku_count()" +7 stmt 89 "call sudoku_count()" 8 stmt 6 "insert into sudoku_schedule (row,col)..." 9 set v_scounter@2 0 10 set v_i@3 1 diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 499506957fa..00ae7dd4eca 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -921,10 +921,6 @@ CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN DROP TRIGGER test1; EN ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. CREATE FUNCTION bug_13627_f() returns int BEGIN DROP TRIGGER test1; return 1; END | ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN load table t1 from master; END | -ERROR 0A000: LOAD TABLE is not allowed in stored procedures -CREATE FUNCTION bug_13627_f() returns int BEGIN load table t1 from master; return 1; END | -ERROR 0A000: LOAD TABLE is not allowed in stored procedures CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create table t2 (a int); END | ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. CREATE FUNCTION bug_13627_f() returns int BEGIN create table t2 (a int); return 1; END | @@ -1115,18 +1111,6 @@ REPAIR TABLE t1; RETURN 1; END| ERROR 0A000: Not allowed to return a result set from a function -CREATE FUNCTION bug13012() RETURNS INT -BEGIN -BACKUP TABLE t1 TO '/tmp'; -RETURN 1; -END| -ERROR 0A000: Not allowed to return a result set from a function -CREATE FUNCTION bug13012() RETURNS INT -BEGIN -RESTORE TABLE t1 FROM '/tmp'; -RETURN 1; -END| -ERROR 0A000: Not allowed to return a result set from a function create table t1 (a int)| CREATE PROCEDURE bug13012_1() REPAIR TABLE t1| CREATE FUNCTION bug13012_2() RETURNS INT @@ -1639,11 +1623,9 @@ DROP TABLE t1| drop procedure if exists p1; create procedure p1() begin -create table t1 (a int) type=MyISAM; +create table t1 (a int) engine=MyISAM; drop table t1; end| -Warnings: -Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 6.0. Please use 'ENGINE=storage_engine' instead call p1(); call p1(); drop procedure p1; @@ -1659,6 +1641,29 @@ begin declare continue handler for sqlstate '00000' set @x=0; end$$ ERROR 42000: Bad SQLSTATE: '00000' +drop procedure if exists proc_36510; +create procedure proc_36510() +begin +declare should_be_illegal condition for sqlstate '00123'; +declare continue handler for should_be_illegal set @x=0; +end$$ +ERROR 42000: Bad SQLSTATE: '00123' +create procedure proc_36510() +begin +declare continue handler for sqlstate '00123' set @x=0; +end$$ +ERROR 42000: Bad SQLSTATE: '00123' +create procedure proc_36510() +begin +declare should_be_illegal condition for 0; +declare continue handler for should_be_illegal set @x=0; +end$$ +ERROR HY000: Incorrect CONDITION value: '0' +create procedure proc_36510() +begin +declare continue handler for 0 set @x=0; +end$$ +ERROR HY000: Incorrect CONDITION value: '0' drop procedure if exists p1; set @old_recursion_depth = @@max_sp_recursion_depth; set @@max_sp_recursion_depth = 255; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 26ba2af8f68..4d8bcaf6589 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -3321,9 +3321,43 @@ call bug11529()| call bug11529()| delete from t1| drop procedure bug11529| +set character set utf8| drop procedure if exists bug6063| drop procedure if exists bug7088_1| drop procedure if exists bug7088_2| +create procedure bug6063() +begin +lâbel: begin end; +label: begin end; +label1: begin end; +end| +create procedure bug7088_1() +label1: begin end label1| +create procedure bug7088_2() +läbel1: begin end| +call bug6063()| +call bug7088_1()| +call bug7088_2()| +set character set default| +show create procedure bug6063| +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +bug6063 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug6063`() +begin +lâbel: begin end; +label: begin end; +label1: begin end; +end utf8 latin1_swedish_ci latin1_swedish_ci +show create procedure bug7088_1| +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +bug7088_1 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug7088_1`() +label1: begin end label1 utf8 latin1_swedish_ci latin1_swedish_ci +show create procedure bug7088_2| +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +bug7088_2 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug7088_2`() +läbel1: begin end utf8 latin1_swedish_ci latin1_swedish_ci +drop procedure bug6063| +drop procedure bug7088_1| +drop procedure bug7088_2| drop procedure if exists bug9565_sub| drop procedure if exists bug9565| create procedure bug9565_sub() @@ -4271,19 +4305,10 @@ drop procedure if exists bug13012| create procedure bug13012() BEGIN REPAIR TABLE t1; -BACKUP TABLE t1 to '<MYSQLTEST_VARDIR>/tmp/'; -DROP TABLE t1; -RESTORE TABLE t1 FROM '<MYSQLTEST_VARDIR>/tmp/'; END| call bug13012()| Table Op Msg_type Msg_text test.t1 repair status OK -Table Op Msg_type Msg_text -test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 backup status OK -Table Op Msg_type Msg_text -test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead -test.t1 restore status OK drop procedure bug13012| create view v1 as select * from t1| create procedure bug13012() diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index be45e5ff5d7..f55e535a293 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -533,9 +533,7 @@ set @@session.max_heap_table_size=default| CREATE DATABASE db_bug7787| use db_bug7787| CREATE PROCEDURE p1() -SHOW INNODB STATUS; | -Warnings: -Warning 1287 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 6.0. Please use 'SHOW ENGINE INNODB STATUS' instead +SHOW ENGINE INNODB STATUS; | GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost| DROP DATABASE db_bug7787| drop user user_bug7787@localhost| diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index ce3acba9b8a..c0cd0f7bc1a 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -238,5 +238,11 @@ SELECT 9; 9 DROP PROCEDURE p1; DROP FUNCTION f1; +DROP VIEW IF EXISTS v1; +CREATE VIEW v1 AS SELECT VARIABLE_NAME AS NAME, CONVERT(VARIABLE_VALUE, UNSIGNED) AS VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS; +SELECT VALUE INTO @tc FROM v1 WHERE NAME = 'Threads_connected'; +SELECT NAME FROM v1 WHERE NAME = 'Threads_created' AND VALUE < @tc; +NAME +DROP VIEW v1; set @@global.concurrent_insert= @old_concurrent_insert; SET GLOBAL log_output = @old_log_output; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index d11ab236c34..b7464ae8ad6 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -889,28 +889,12 @@ CREATE TABLE b15776 (a year(0)); DROP TABLE b15776; CREATE TABLE b15776 (a year(-2)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2))' at line 1 -CREATE TABLE b15776 (a timestamp(4294967294)); -Warnings: -Warning 1287 The syntax 'TIMESTAMP(4294967294)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -DROP TABLE b15776; -CREATE TABLE b15776 (a timestamp(4294967295)); -Warnings: -Warning 1287 The syntax 'TIMESTAMP(4294967295)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -DROP TABLE b15776; -CREATE TABLE b15776 (a timestamp(4294967296)); -ERROR 42000: Display width out of range for column 'a' (max = 4294967295) -CREATE TABLE b15776 (a timestamp(-1)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1))' at line 1 -CREATE TABLE b15776 (a timestamp(-2)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2))' at line 1 CREATE TABLE b15776 (a int(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); ERROR 42000: Display width out of range for column 'a' (max = 4294967295) CREATE TABLE b15776 (a char(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); ERROR 42000: Display width out of range for column 'a' (max = 4294967295) CREATE TABLE b15776 (a year(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); ERROR 42000: Display width out of range for column 'a' (max = 4294967295) -CREATE TABLE b15776 (a timestamp(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); -ERROR 42000: Display width out of range for column 'a' (max = 4294967295) CREATE TABLE b15776 select cast(null as char(4294967295)); show columns from b15776; Field Type Null Key Default Extra diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 24cb725de9f..fd13f53d02b 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -97,30 +97,6 @@ date date_time time_stamp 2005-01-01 2005-01-01 00:00:00 2005-01-01 00:00:00 2030-01-01 2030-01-01 00:00:00 2030-01-01 00:00:00 drop table t1; -create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), -t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), -t14 timestamp(14)); -Warnings: -Warning 1287 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead -insert t1 values (0,0,0,0,0,0,0), -("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", -"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", -"1997-12-31 23:47:59"); -select * from t1; -t2 t4 t6 t8 t10 t12 t14 -0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 -1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 -select * from t1; -t2 t4 t6 t8 t10 t12 t14 -0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 -1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 -drop table t1; create table t1 (ix timestamp); insert into t1 values (0),(20030101010160),(20030101016001),(20030101240101),(20030132010101),(20031301010101),(20031200000000),(20030000000000); Warnings: @@ -436,7 +412,7 @@ max(t) 2004-02-01 00:00:00 drop table t1; set sql_mode='maxdb'; -create table t1 (a timestamp, b timestamp(19)); +create table t1 (a timestamp, b timestamp); show create table t1; Table Create Table t1 CREATE TABLE "t1" ( diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 69bcf349f51..2df2b0bafa6 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1104,6 +1104,9 @@ select * from t2; ERROR HY000: Table 't2' was not locked with LOCK TABLES drop view v1; drop table t1, t2; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +unlock tables; +drop table t1, t2; create table t1 (a int); create view v1 as select * from t1 where a < 2 with check option; insert into v1 values(1); diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index e2bce537179..8e70ea8b53d 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -166,9 +166,6 @@ show variables like 'max_error_count'; Variable_name Value max_error_count 10 drop table t1; -set table_type=MYISAM; -Warnings: -Warning 1287 The syntax '@@table_type' is deprecated and will be removed in MySQL 6.0. Please use '@@storage_engine' instead create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); update t1 set a='abc'; |