INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
@ -43,7 +43,7 @@ SET character_set_client = @saved_cs_client;
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
DROP TABLE t1;
#
# Bug#2055
# Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL"
#
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES ('-9e999999');
@ -58,7 +58,7 @@ SET character_set_client = @saved_cs_client;
@ -1844,7 +1844,7 @@ SET character_set_client = @saved_cs_client;
drop table t1, t2, t3;
#
# Bug#21288: mysqldump segmentation fault when using --where
# Bug#21288 mysqldump segmentation fault when using --where
#
create table t1 (a int);
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': 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 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064)
@ -1880,7 +1880,7 @@ SET character_set_client = @saved_cs_client;
drop table t1;
#
# BUG#13926: --order-by-primary fails if PKEY contains quote character
# Bug#13926 --order-by-primary fails if PKEY contains quote character
#
DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
@ -1959,7 +1959,7 @@ UNLOCK TABLES;
DROP TABLE `t1`;
End of 4.1 tests
#
# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X)
# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X)
#
create database db1;
use db1;
@ -2036,7 +2036,7 @@ drop view v2;
drop database db1;
use test;
#
# Bug10713 mysqldump includes database in create view and referenced tables
# Bug#10713 mysqldump includes database in create view and referenced tables
#
create database db2;
use db2;
@ -2067,9 +2067,6 @@ a b
drop table t1, t2;
drop database db1;
use test;
#
# dump of view
#
create table t1(a int);
create view v1 as select * from t1;
@ -2130,7 +2127,7 @@ SET character_set_client = @saved_cs_client;
drop view v1;
drop table t1;
#
# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X)
# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X)
#
create database mysqldump_test_db;
use mysqldump_test_db;
@ -2207,7 +2204,7 @@ drop view v2;
drop database mysqldump_test_db;
use test;
#
# Bug#9756
# Bug#9756 mysql client failing on dumps containing certain \ sequences
#
CREATE TABLE t1 (a char(10));
INSERT INTO t1 VALUES ('\'');
@ -2247,7 +2244,7 @@ UNLOCK TABLES;
DROP TABLE t1;
#
# Bug#10927 mysqldump: Can't reload dump with view that consist of other view
# Bug#10927 mysqldump: Can't reload dump with view that consist of other view
end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DROP TABLE t1, t2;
#
# Bugs #9136, #12917: problems with --defaults-extra-file option
# Bug#9136 my_print_defaults changed behaviour between 4.1.7 and 4.1.10a
# Bug#12917 The --defaults-extra-file option is ignored by the 5.0 client binaries
# (Problems with --defaults-extra-file option)
#
--port=1234
--port=1234
#
# Test of fix to BUG 12597
# Test of fix to Bug#12597 mysqldump dumps triggers wrongly
#
DROP TABLE IF EXISTS `test1`;
Warnings:
@ -2659,7 +2658,7 @@ DROP TRIGGER testref;
DROP TABLE test1;
DROP TABLE test2;
#
# BUG#9056 - mysqldump does not dump routines
# Bug#9056 mysqldump does not dump routines
#
DROP TABLE IF EXISTS t1;
DROP FUNCTION IF EXISTS bug9056_func1;
@ -2677,9 +2676,9 @@ begin
set f1= concat( 'hello', f1 );
return f1;
end //
CREATE PROCEDURE bug9056_proc2(OUT a INT)
BEGIN
select sum(id) from t1 into a;
CREATE PROCEDURE bug9056_proc2(OUT a INT)
BEGIN
select sum(id) from t1 into a;
END //
set sql_mode='ansi';
create procedure `a'b` () select 1;
@ -2794,8 +2793,8 @@ DELIMITER ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc2`(OUT a INT)
BEGIN
select sum(id) from t1 into a;
BEGIN
select sum(id) from t1 into a;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -2819,7 +2818,7 @@ DROP PROCEDURE bug9056_proc2;
DROP PROCEDURE `a'b`;
drop table t1;
#
# BUG# 13052 - mysqldump timestamp reloads broken
# Bug#13052 mysqldump timestamp reloads broken
#
drop table if exists t1;
create table t1 (`d` timestamp, unique (`d`));
@ -2914,7 +2913,7 @@ drop table t1;
set global time_zone=default;
set time_zone=default;
#
# Test of fix to BUG 13146 - ansi quotes break loading of triggers
# Test of fix to Bug#13146 ansi quotes break loading of triggers
#
DROP TABLE IF EXISTS `t1 test`;
DROP TABLE IF EXISTS `t2 test`;
@ -2993,7 +2992,7 @@ DROP TRIGGER `test trig`;
DROP TABLE `t1 test`;
DROP TABLE `t2 test`;
#
# BUG# 12838 mysqldump -x with views exits with error
# Bug#12838 mysqldump -x with views exits with error
#
drop table if exists t1;
create table t1 (a int, b varchar(32), c varchar(32));
@ -3127,7 +3126,7 @@ drop view v0;
drop view v1;
drop table t1;
#
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
# Bug#14554 mysqldump does not separate words "ROW" and "BEGIN"
# for tables with trigger created in the IGNORE_SPACE sql mode.
#
SET @old_sql_mode = @@SQL_MODE;
@ -3198,8 +3197,8 @@ DELIMITER ;
DROP TRIGGER tr1;
DROP TABLE t1;
#
# Bug#13318: Bad result with empty field and --hex-blob
#
# Bug#13318 Bad result with empty field and --hex-blob
#
create table t1 (a binary(1), b blob);
insert into t1 values ('','');
@ -3274,7 +3273,7 @@ UNLOCK TABLES;
drop table t1;
#
# Bug14871 Invalid view dump output
# Bug#14871 Invalid view dump output
#
create table t1 (a int);
insert into t1 values (289), (298), (234), (456), (789);
@ -3303,7 +3302,7 @@ a
drop table t1;
drop view v1, v2, v3, v4, v5;
#
# Bug#16878 dump of trigger
# Bug#16878 dump of trigger
#
create table t1 (a int, created datetime);
create table t2 (b int, created datetime);
@ -3371,7 +3370,7 @@ drop view v2;
drop table t;
#
# Bug#14857 Reading dump files with single statement stored routines fails.
# Bug 27293: mysqldump crashes when dumping routines
# defined by a different user
#
# Bug #22761: mysqldump reports no errors when using
# --routines without mysql.proc privileges
# Bug#27293 mysqldump crashes when dumping routines
# defined by a different user
#
# Bug#22761 mysqldump reports no errors when using
# --routines without mysql.proc privileges
#
create database mysqldump_test_db;
grant all privileges on mysqldump_test_db.* to user1;
@ -3764,7 +3763,7 @@ drop user user1;
drop user user2;
drop database mysqldump_test_db;
#
# Bug#28522: buffer overrun by '\0' byte using --hex-blob.
# Bug#28522 buffer overrun by '\0' byte using --hex-blob.
#
CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
@ -3778,8 +3777,8 @@ SET character_set_client = @saved_cs_client;
INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171);
DROP TABLE t1;
#
# Bug#28524: mysqldump --skip-add-drop-table is not
# compatible with views
# Bug#28524 mysqldump --skip-add-drop-table is not
# compatible with views
#
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
@ -3788,8 +3787,8 @@ SELECT * FROM v1;
1
DROP VIEW v1;
#
# Bug#29788: mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of
# the SQL_MODE variable after the dumping of triggers.
# Bug#29788 mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of
# the SQL_MODE variable after the dumping of triggers.
#
CREATE TABLE t1 (c1 INT);
CREATE TRIGGER t1bd BEFORE DELETE ON t1 FOR EACH ROW BEGIN END;
@ -3810,8 +3809,8 @@ c1
2
DROP TABLE t1,t2;
#
# Bug#29815: new option for suppressing last line of mysqldump:
# "Dump completed on"
# Bug#29815 new option for suppressing last line of mysqldump:
# "Dump completed on"
#
# --skip-dump-date:
--
@ -3876,7 +3875,7 @@ UNLOCK TABLES;
DROP TABLE t1;
#
# BUG# 16853: mysqldump doesn't show events
# Bug#16853 mysqldump doesn't show events
#
create database first;
use first;
@ -3916,7 +3915,7 @@ drop database third;
set time_zone = 'SYSTEM';
use test;
#
# BUG#17201 Spurious 'DROP DATABASE' in output,
# Bug#17201 Spurious 'DROP DATABASE' in output,
# also confusion between tables and views.
# Example code from Markus Popp
#
@ -3996,8 +3995,8 @@ drop view v1;
drop table t1;
drop database mysqldump_test_db;
#
# Bug#30027: mysqldump does not dump views properly.
#
# Bug#30027 mysqldump does not dump views properly.
#
# Cleanup.
DROP DATABASE IF EXISTS mysqldump_test_db;
@ -4029,8 +4028,8 @@ set names latin1;
# Cleanup.
DROP DATABASE mysqldump_test_db;
#
# BUG#29938: wrong behavior of mysqldump --skip-events
# with --all-databases
# Bug#29938 wrong behavior of mysqldump --skip-events
# with --all-databases
#
TRUNCATE mysql.event;
USE test;
@ -4062,7 +4061,7 @@ drop database `test-database`;
create user 'mysqltest_2' identified by 'Mysqltest-2';
create user 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff';
@ -238,7 +242,7 @@ select host,user,password from mysql.user where user like 'mysqltest_%' order by
select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
--error 1141
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
#
# Rename
@ -249,7 +253,7 @@ select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest
select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
show grants for 'mysqltest_1';
drop user 'mysqltest_1', 'mysqltest_3';
--error 1396
--error ER_CANNOT_USER
drop user 'mysqltest_1';
#
# Cleanup
@ -258,9 +262,9 @@ drop table t1, t2;
# Add a stray record
insert into mysql.db set user='mysqltest_1', db='%', host='%';
flush privileges;
--error 1141
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
--error 1269
--error ER_REVOKE_GRANTS
revoke all privileges, grant option from 'mysqltest_1';
drop user 'mysqltest_1';
select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user;
@ -268,7 +272,7 @@ select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,us
# Add a stray record
insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1';
flush privileges;
--error 1141
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
drop user 'mysqltest_1';
select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name;
@ -276,7 +280,7 @@ select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1'
# Add a stray record
insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1';
flush privileges;
--error 1141
--error ER_NONEXISTING_GRANT
show grants for 'mysqltest_1';
drop user 'mysqltest_1';
select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name;
@ -286,23 +290,23 @@ create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
create user 'mysqltest_1', 'mysqltest_2' identified by 'Mysqltest-2', 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff';
rename user 'mysqltest_1' to 'mysqltest_1a', 'mysqltest_2' TO 'mysqltest_2a', 'mysqltest_3' TO 'mysqltest_3a';
--error 1396
--error ER_CANNOT_USER
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
drop user 'mysqltest_1a', 'mysqltest_2a', 'mysqltest_3a';
#
# Let one of multiple users fail
create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
--error 1396
--error ER_CANNOT_USER
create user 'mysqltest_1a', 'mysqltest_2', 'mysqltest_3a';
--error 1396
--error ER_CANNOT_USER
rename user 'mysqltest_1a' to 'mysqltest_1b', 'mysqltest_2a' TO 'mysqltest_2b', 'mysqltest_3a' TO 'mysqltest_3b';
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
--error 1396
--error ER_CANNOT_USER
drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b';
#
# Obsolete syntax has been dropped
create user 'mysqltest_2' identified by 'Mysqltest-2';
--error 1064
--error ER_PARSE_ERROR
drop user 'mysqltest_2' identified by 'Mysqltest-2';
drop user 'mysqltest_2';
#
@ -312,7 +316,7 @@ show grants for '%@b'@'b';
grant select on mysql.* to '%@b'@'b';
show grants for '%@b'@'b';
rename user '%@b'@'b' to '%@a'@'a';
--error 1141
--error ER_NONEXISTING_GRANT
show grants for '%@b'@'b';
show grants for '%@a'@'a';
drop user '%@a'@'a';
@ -323,7 +327,7 @@ create user mysqltest_2@localhost;
grant create user on *.* to mysqltest_2@localhost;
connect (user3,localhost,mysqltest_2,,);
connection user3;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%';
@ -338,7 +342,7 @@ grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost;
connect (user4,localhost,mysqltest_3,,);
connection user4;
show grants;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
insert into mysql.user set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
@ -349,7 +353,7 @@ disconnect user4;
connection default;
drop user mysqltest_3@localhost;
#
# Bug#3309: Test IP addresses with netmask
# Bug#3309 Test IP addresses with netmask
set @@sql_mode='';
create database mysqltest_1;
create table mysqltest_1.t1 (i int);
@ -367,7 +371,8 @@ flush privileges;
drop table mysqltest_1.t1;
#
# Bug #12302: 'SET PASSWORD = ...' didn't work if connecting hostname !=