mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Merge mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
This commit is contained in:
commit
996b8d92c7
2 changed files with 632 additions and 263 deletions
|
@ -23,6 +23,9 @@ INSERT INTO t1 VALUES (1), (2);
|
|||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2005
|
||||
#
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
|
@ -31,6 +34,9 @@ CREATE TABLE `t1` (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2055
|
||||
#
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
Warnings:
|
||||
|
@ -40,6 +46,9 @@ CREATE TABLE `t1` (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES (RES);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||
|
@ -137,6 +146,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
|||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1707
|
||||
#
|
||||
CREATE TABLE t1 (`a"b"` char(2));
|
||||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
<?xml version="1.0"?>
|
||||
|
@ -156,6 +168,10 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
|
|||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1994
|
||||
# Bug #4261
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||||
|
||||
|
@ -191,6 +207,9 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2634
|
||||
#
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
|
@ -240,11 +259,17 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||
#
|
||||
create table ```a` (i int);
|
||||
CREATE TABLE ```a` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
drop table ```a`;
|
||||
#
|
||||
# Bug #2591 "mysqldump quotes names inconsistently"
|
||||
#
|
||||
create table t1(a int);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
|
@ -353,6 +378,9 @@ UNLOCK TABLES;
|
|||
|
||||
set global sql_mode='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #2705 'mysqldump --tab extra output'
|
||||
#
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
|
||||
|
@ -381,6 +409,9 @@ CREATE TABLE `t1` (
|
|||
2
|
||||
3
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #6101: create database problem
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
|
@ -433,6 +464,12 @@ USE `mysqldump_test_db`;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug #7020
|
||||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||||
# but use the default compiled values, or the values given in
|
||||
# --default-character-set=xxx. However, we should dump in UTF8
|
||||
# if it is explicitely set.
|
||||
CREATE TABLE t1 (a CHAR(10));
|
||||
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
|
||||
|
||||
|
@ -466,6 +503,13 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
#
|
||||
# Bug #8063: make test mysqldump [ fail ]
|
||||
# We cannot tes this command because its output depends
|
||||
# on --default-character-set incompiled into "mysqldump" program.
|
||||
# If the future we can move this command into a separate test with
|
||||
# checking that "mysqldump" is compiled with "latin1"
|
||||
#
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
|
@ -536,6 +580,9 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# WL#2319: Exclude Tables from dump
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
|
@ -573,6 +620,9 @@ UNLOCK TABLES;
|
|||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug #8830
|
||||
#
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
|
||||
|
@ -607,6 +657,9 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for --insert-ignore
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
|
@ -671,6 +724,10 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10286: mysqldump -c crashes on table that has many fields with
|
||||
# long names
|
||||
#
|
||||
create table t1 (
|
||||
F_c4ca4238a0b923820dcc509a6f75849b int,
|
||||
F_c81e728d9d4c2f636f067f89cc14862c int,
|
||||
|
@ -1364,6 +1421,9 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Test for --add-drop-database
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
|
||||
|
@ -1404,6 +1464,104 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE TABLE t2 (
|
||||
a varchar(30) default NULL,
|
||||
KEY a (a(5))
|
||||
);
|
||||
INSERT INTO t2 VALUES ('alfred');
|
||||
INSERT INTO t2 VALUES ('angie');
|
||||
INSERT INTO t2 VALUES ('bingo');
|
||||
INSERT INTO t2 VALUES ('waffle');
|
||||
INSERT INTO t2 VALUES ('lemon');
|
||||
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t2`;
|
||||
CREATE TABLE `t2` (
|
||||
`a` varchar(30) default NULL,
|
||||
KEY `a` (`a`(5))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t2` WRITE;
|
||||
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
|
||||
INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
|
||||
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE IF EXISTS `v2`;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 CREATE TABLE `v2` (
|
||||
`a` varchar(30)
|
||||
) */;
|
||||
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `v2` AS select `t2`.`a` AS `a` from `t2` where (`t2`.`a` like _latin1'a%') */
|
||||
/*!50002 WITH CASCADED CHECK OPTION */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
#
|
||||
# Bug #10713 mysqldump includes database in create view and referenced tables
|
||||
#
|
||||
create database db2;
|
||||
use db2;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b varchar(10), primary key(a));
|
||||
insert into t2 values (1, "on"), (2, "off"), (10, "pol"), (12, "meg");
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
create view v1 as select * from t2;
|
||||
create view v2 as select * from t1;
|
||||
drop table t1, t2;
|
||||
drop view v1, v2;
|
||||
drop database db2;
|
||||
create database db1;
|
||||
use db1;
|
||||
show tables;
|
||||
Tables_in_db1
|
||||
t1
|
||||
t2
|
||||
v1
|
||||
v2
|
||||
select * from t2 order by a;
|
||||
a b
|
||||
1 on
|
||||
2 off
|
||||
10 pol
|
||||
12 meg
|
||||
drop table t1, t2;
|
||||
drop database db1;
|
||||
#
|
||||
# Bug #15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
#
|
||||
--fields-optionally-enclosed-by="
|
||||
#
|
||||
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
#
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
|
@ -1492,6 +1650,11 @@ CREATE TABLE `t2` (
|
|||
</mysqldump>
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
#
|
||||
# Testing with tables and databases that don't exists
|
||||
# or contains illegal characters
|
||||
# (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
|
@ -1530,6 +1693,9 @@ mysqldump: Got error: 1049: Unknown database 'mysqld\ump_test_db' when selecting
|
|||
drop table t1, t2, t3;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
|
||||
#
|
||||
create table t1 (a int(10));
|
||||
create table t2 (pk int primary key auto_increment,
|
||||
a int(10), b varchar(30), c datetime, d blob, e text);
|
||||
|
@ -1586,6 +1752,9 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
|
|||
</database>
|
||||
</mysqldump>
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug #12123
|
||||
#
|
||||
create table t1 (a text character set utf8, b text character set latin1);
|
||||
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
|
||||
select * from t1;
|
||||
|
@ -1597,6 +1766,9 @@ a b
|
|||
Osnabrück Köln
|
||||
drop table t1;
|
||||
--fields-optionally-enclosed-by="
|
||||
#
|
||||
# Bug #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
|
||||
#
|
||||
create table `t1` (
|
||||
t1_name varchar(255) default null,
|
||||
t1_id int(10) unsigned not null auto_increment,
|
||||
|
@ -1701,7 +1873,6 @@ CREATE TABLE `t1` (
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE TABLE t2 (
|
||||
|
@ -1790,6 +1961,12 @@ a b
|
|||
drop table t1, t2;
|
||||
drop database db1;
|
||||
use test;
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
#
|
||||
# Dump of view
|
||||
#
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
|
||||
|
@ -1834,6 +2011,9 @@ DROP TABLE IF EXISTS `v1`;
|
|||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
CREATE TABLE t2 (
|
||||
|
@ -1893,6 +2073,9 @@ drop table t2;
|
|||
drop view v2;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9756
|
||||
#
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
|
||||
|
@ -1927,6 +2110,9 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10927 mysqldump: Can't reload dump with view that consist of other view
|
||||
#
|
||||
create table t1(a int, b int, c varchar(30));
|
||||
insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three");
|
||||
create view v3 as
|
||||
|
@ -2004,6 +2190,9 @@ DROP TABLE IF EXISTS `v3`;
|
|||
|
||||
drop view v1, v2, v3;
|
||||
drop table t1;
|
||||
#
|
||||
# Test for dumping triggers
|
||||
#
|
||||
CREATE TABLE t1 (a int, b bigint default NULL);
|
||||
CREATE TABLE t2 (a int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
|
@ -2202,8 +2391,14 @@ set @fired:= "No";
|
|||
end if;
|
||||
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
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
#
|
||||
--port=1234
|
||||
--port=1234
|
||||
#
|
||||
# Bug #12597
|
||||
#
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test1'
|
||||
|
@ -2235,6 +2430,9 @@ a2
|
|||
DROP TRIGGER testref;
|
||||
DROP TABLE test1;
|
||||
DROP TABLE test2;
|
||||
#
|
||||
# Bug #9056 - mysqldump does not dump routines
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func2;
|
||||
|
@ -2331,6 +2529,9 @@ DROP PROCEDURE bug9056_proc1;
|
|||
DROP PROCEDURE bug9056_proc2;
|
||||
DROP PROCEDURE `a'b`;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #13052 - mysqldump timestamp reloads broken
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (`d` timestamp, unique (`d`));
|
||||
set time_zone='+00:00';
|
||||
|
@ -2417,6 +2618,9 @@ UNLOCK TABLES;
|
|||
drop table t1;
|
||||
set global time_zone=default;
|
||||
set time_zone=default;
|
||||
#
|
||||
# Bug #13146 - ansi quotes break loading of triggers
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1 test`;
|
||||
DROP TABLE IF EXISTS `t2 test`;
|
||||
CREATE TABLE `t1 test` (
|
||||
|
@ -2480,6 +2684,9 @@ UNLOCK TABLES;
|
|||
DROP TRIGGER `test trig`;
|
||||
DROP TABLE `t1 test`;
|
||||
DROP TABLE `t2 test`;
|
||||
#
|
||||
# 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));
|
||||
insert into t1 values (1, 'first value', 'xxxx');
|
||||
|
@ -2572,6 +2779,10 @@ drop view v2;
|
|||
drop view v0;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# 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;
|
||||
SET SQL_MODE = IGNORE_SPACE;
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
@ -2693,7 +2904,122 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TRIGGER tr1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #13318: Bad result with empty field and --hex-blob
|
||||
#
|
||||
create table t1 (a binary(1), b blob);
|
||||
insert into t1 values ('','');
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` binary(1) default NULL,
|
||||
`b` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
INSERT INTO `t1` VALUES (0x00,'');
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` binary(1) default NULL,
|
||||
`b` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
INSERT INTO `t1` VALUES (0x00,'');
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #18536: wrong table order
|
||||
#
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table t3(a int);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t3`;
|
||||
CREATE TABLE `t3` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS `t2`;
|
||||
CREATE TABLE `t2` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1, t2, t3;
|
||||
End of 4.1 tests
|
||||
#
|
||||
# Bug #14871 Invalid view dump output
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
create definer = CURRENT_USER view v1 as select * from t1;
|
||||
|
@ -2720,6 +3046,9 @@ a
|
|||
789
|
||||
drop table t1;
|
||||
drop view v1, v2, v3, v4, v5;
|
||||
#
|
||||
# Bug #16878 dump of trigger
|
||||
#
|
||||
create table t1 (a int, created datetime);
|
||||
create table t2 (b int, created datetime);
|
||||
create trigger tr1 before insert on t1 for each row set
|
||||
|
@ -2742,6 +3071,9 @@ end AFTER # root@localhost
|
|||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug #18462 mysqldump does not dump view structures correctly
|
||||
#
|
||||
create table t (qty int, price int);
|
||||
insert into t values(3, 50);
|
||||
insert into t values(5, 51);
|
||||
|
@ -2761,6 +3093,10 @@ mysqldump {
|
|||
drop view v1;
|
||||
drop view v2;
|
||||
drop table t;
|
||||
#
|
||||
# Bug #14857 Reading dump files with single statement stored routines fails.
|
||||
# fixed by patch for Bug #16878
|
||||
#
|
||||
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
|
||||
return 42 */|
|
||||
/*!50003 CREATE PROCEDURE `p`()
|
||||
|
@ -2775,6 +3111,9 @@ p CREATE DEFINER=`root`@`localhost` PROCEDURE `p`()
|
|||
select 42
|
||||
drop function f;
|
||||
drop procedure p;
|
||||
#
|
||||
# Bug #17371 Unable to dump a schema with invalid views
|
||||
#
|
||||
create table t1 ( id serial );
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
|
@ -2784,6 +3123,11 @@ mysqldump {
|
|||
|
||||
} mysqldump
|
||||
drop view v1;
|
||||
#
|
||||
# Bug #17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
|
@ -2811,7 +3155,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_test_db` /*!40100 DEFAULT CH
|
|||
USE `mysqldump_test_db`;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
`id` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
|
@ -2844,6 +3188,9 @@ USE `mysqldump_test_db`;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug21014 Segmentation fault of mysqldump on view
|
||||
#
|
||||
create database mysqldump_tables;
|
||||
use mysqldump_tables;
|
||||
create table basetable ( id serial, tag varchar(64) );
|
||||
|
@ -2877,6 +3224,9 @@ drop view nasishnasifu;
|
|||
drop database mysqldump_views;
|
||||
drop table mysqldump_tables.basetable;
|
||||
drop database mysqldump_tables;
|
||||
#
|
||||
# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
|
||||
#
|
||||
create database mysqldump_dba;
|
||||
use mysqldump_dba;
|
||||
create table t1 (f1 int, f2 int);
|
||||
|
@ -2908,6 +3258,9 @@ use mysqldump_dbb;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_dbb;
|
||||
#
|
||||
# Bug #21215 mysqldump creating incomplete backups without warning
|
||||
#
|
||||
use test;
|
||||
create user mysqltest_1@localhost;
|
||||
create table t1(a int, b varchar(34));
|
||||
|
@ -2918,64 +3271,16 @@ grant RELOAD on *.* to mysqltest_1@localhost;
|
|||
mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227)
|
||||
mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227)
|
||||
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
||||
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=537;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL,
|
||||
`b` varchar(34) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||
|
||||
USE `mysqldump_tables`;
|
||||
DROP TABLE IF EXISTS `basetable`;
|
||||
CREATE TABLE `basetable` (
|
||||
`id` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`tag` varchar(64) default NULL,
|
||||
UNIQUE KEY `id` (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `basetable` WRITE;
|
||||
/*!40000 ALTER TABLE `basetable` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `basetable` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||
|
||||
USE `mysqldump_views`;
|
||||
DROP TABLE IF EXISTS `nasishnasifu`;
|
||||
/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
|
||||
/*!50001 CREATE TABLE `nasishnasifu` (
|
||||
`id` bigint(20) unsigned
|
||||
) */;
|
||||
/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
|
||||
/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `mysqldump_views`.`nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop view nasishnasifu;
|
||||
drop database mysqldump_views;
|
||||
drop table mysqldump_tables.basetable;
|
||||
drop database mysqldump_tables;
|
||||
USE test;
|
||||
#
|
||||
# Bug #13926: --order-by-primary fails if PKEY contains quote character
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a b` INT,
|
||||
|
@ -3371,4 +3676,6 @@ USE `mysqldump_test_db`;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
|
|
|
@ -16,9 +16,9 @@ INSERT INTO t1 VALUES (1), (2);
|
|||
--exec $MYSQL_DUMP --skip-create --skip-comments -X test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #2005
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2005
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
|
@ -26,9 +26,9 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
|||
--exec $MYSQL_DUMP --compact test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #2055
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2055
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
|
@ -38,9 +38,9 @@ INSERT INTO t1 VALUES ('-9e999999');
|
|||
--exec $MYSQL_DUMP --compact test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||
|
||||
|
@ -69,28 +69,28 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
|||
--exec $MYSQL_DUMP --skip-create --compact -X test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #1707
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #1707
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (`a"b"` char(2));
|
||||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
--exec $MYSQL_DUMP --compact --skip-create -X test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #1994
|
||||
# Bug #4261
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #1994
|
||||
--echo # Bug #4261
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||||
--exec $MYSQL_DUMP --skip-comments --skip-extended-insert test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #2634
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2634
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
|
@ -98,17 +98,17 @@ INSERT INTO t1 VALUES (1), (2);
|
|||
--exec $MYSQL_DUMP --skip-comments --compatible=mysql323 test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||
--echo #
|
||||
|
||||
create table ```a` (i int);
|
||||
--exec $MYSQL_DUMP --compact test
|
||||
drop table ```a`;
|
||||
|
||||
#
|
||||
# Bug #2591 "mysqldump quotes names inconsistently"
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2591 "mysqldump quotes names inconsistently"
|
||||
--echo #
|
||||
|
||||
create table t1(a int);
|
||||
--exec $MYSQL_DUMP --comments=0 test
|
||||
|
@ -119,9 +119,9 @@ set global sql_mode='ANSI_QUOTES';
|
|||
set global sql_mode='';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #2705 'mysqldump --tab extra output'
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #2705 'mysqldump --tab extra output'
|
||||
--echo #
|
||||
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
|
@ -135,9 +135,9 @@ insert into t1 values (1),(2),(3);
|
|||
--exec rm $MYSQLTEST_VARDIR/tmp/t1.txt
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6101: create database problem
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #6101: create database problem
|
||||
--echo #
|
||||
|
||||
--exec $MYSQL_DUMP --skip-comments --databases test
|
||||
|
||||
|
@ -145,32 +145,33 @@ create database mysqldump_test_db character set latin2 collate latin2_bin;
|
|||
--exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db
|
||||
drop database mysqldump_test_db;
|
||||
|
||||
#
|
||||
# Bug #7020
|
||||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||||
# but use the default compiled values, or the values given in
|
||||
# --default-character-set=xxx. However, we should dump in UTF8
|
||||
# if it is explicitely set.
|
||||
--echo #
|
||||
--echo # Bug #7020
|
||||
--echo # Check that we don't dump in UTF8 in compatible mode by default,
|
||||
--echo # but use the default compiled values, or the values given in
|
||||
--echo # --default-character-set=xxx. However, we should dump in UTF8
|
||||
--echo # if it is explicitely set.
|
||||
|
||||
CREATE TABLE t1 (a CHAR(10));
|
||||
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
|
||||
#
|
||||
# Bug#8063: make test mysqldump [ fail ]
|
||||
# We cannot tes this command because its output depends
|
||||
# on --default-character-set incompiled into "mysqldump" program.
|
||||
# If the future we can move this command into a separate test with
|
||||
# checking that "mysqldump" is compiled with "latin1"
|
||||
#
|
||||
|
||||
--echo #
|
||||
--echo # Bug #8063: make test mysqldump [ fail ]
|
||||
--echo # We cannot tes this command because its output depends
|
||||
--echo # on --default-character-set incompiled into "mysqldump" program.
|
||||
--echo # If the future we can move this command into a separate test with
|
||||
--echo # checking that "mysqldump" is compiled with "latin1"
|
||||
--echo #
|
||||
#--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# WL #2319: Exclude Tables from dump
|
||||
#
|
||||
--echo #
|
||||
--echo # WL#2319: Exclude Tables from dump
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
|
@ -180,18 +181,18 @@ INSERT INTO t2 VALUES (4),(5),(6);
|
|||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
#
|
||||
# Bug #8830
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #8830
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
--exec $MYSQL_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test for --insert-ignore
|
||||
#
|
||||
--echo #
|
||||
--echo # Test for --insert-ignore
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
|
@ -200,10 +201,10 @@ INSERT INTO t1 VALUES (4),(5),(6);
|
|||
--exec $MYSQL_DUMP --skip-comments --insert-ignore --delayed-insert test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #10286: mysqldump -c crashes on table that has many fields with long
|
||||
# names
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #10286: mysqldump -c crashes on table that has many fields with
|
||||
--echo # long names
|
||||
--echo #
|
||||
create table t1 (
|
||||
F_c4ca4238a0b923820dcc509a6f75849b int,
|
||||
F_c81e728d9d4c2f636f067f89cc14862c int,
|
||||
|
@ -539,18 +540,81 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
|
|||
--exec $MYSQL_DUMP --skip-comments -c test
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for --add-drop-database
|
||||
#
|
||||
--echo #
|
||||
--echo # Test for --add-drop-database
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
--echo #
|
||||
|
||||
create database db1;
|
||||
use db1;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
a varchar(30) default NULL,
|
||||
KEY a (a(5))
|
||||
);
|
||||
|
||||
INSERT INTO t2 VALUES ('alfred');
|
||||
INSERT INTO t2 VALUES ('angie');
|
||||
INSERT INTO t2 VALUES ('bingo');
|
||||
INSERT INTO t2 VALUES ('waffle');
|
||||
INSERT INTO t2 VALUES ('lemon');
|
||||
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||
--exec $MYSQL_DUMP --skip-comments db1
|
||||
drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #10713 mysqldump includes database in create view and referenced tables
|
||||
--echo #
|
||||
|
||||
# create table and views in db2
|
||||
create database db2;
|
||||
use db2;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b varchar(10), primary key(a));
|
||||
insert into t2 values (1, "on"), (2, "off"), (10, "pol"), (12, "meg");
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
create view v1 as select * from t2;
|
||||
create view v2 as select * from t1;
|
||||
|
||||
# dump tables and view from db2
|
||||
--exec $MYSQL_DUMP db2 > $MYSQLTEST_VARDIR/tmp/bug10713.sql
|
||||
|
||||
# drop the db, tables and views
|
||||
drop table t1, t2;
|
||||
drop view v1, v2;
|
||||
drop database db2;
|
||||
|
||||
# create db1 and reload dump
|
||||
create database db1;
|
||||
use db1;
|
||||
--exec $MYSQL db1 < $MYSQLTEST_VARDIR/tmp/bug10713.sql
|
||||
|
||||
# check that all tables and views could be created
|
||||
show tables;
|
||||
select * from t2 order by a;
|
||||
|
||||
drop table t1, t2;
|
||||
drop database db1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
--echo #
|
||||
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
|
||||
|
||||
--echo #
|
||||
--echo # Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
--echo #
|
||||
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
|
@ -565,11 +629,11 @@ INSERT INTO t2 VALUES (1), (2);
|
|||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
|
||||
#
|
||||
# Testing with tables and databases that don't exists
|
||||
# or contains illegal characters
|
||||
# (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
#
|
||||
--echo #
|
||||
--echo # Testing with tables and databases that don't exists
|
||||
--echo # or contains illegal characters
|
||||
--echo # (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
--echo #
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
|
@ -629,9 +693,9 @@ drop database mysqldump_test_db;
|
|||
use test;
|
||||
|
||||
|
||||
#
|
||||
# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
|
||||
--echo #
|
||||
|
||||
create table t1 (a int(10));
|
||||
create table t2 (pk int primary key auto_increment,
|
||||
|
@ -641,9 +705,9 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
|
|||
--exec $MYSQL_DUMP --skip-comments --xml --no-create-info test
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# BUG #12123
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #12123
|
||||
--echo #
|
||||
create table t1 (a text character set utf8, b text character set latin1);
|
||||
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
|
||||
select * from t1;
|
||||
|
@ -654,15 +718,9 @@ select * from t1;
|
|||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
#
|
||||
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
|
||||
|
||||
#
|
||||
# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
|
||||
--echo #
|
||||
create table `t1` (
|
||||
t1_name varchar(255) default null,
|
||||
t1_id int(10) unsigned not null auto_increment,
|
||||
|
@ -689,9 +747,9 @@ show create table `t1`;
|
|||
|
||||
drop table `t1`;
|
||||
|
||||
#
|
||||
# Bug #18536: wrong table order
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #18536: wrong table order
|
||||
--echo #
|
||||
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
|
@ -700,19 +758,18 @@ create table t3(a int);
|
|||
--exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# Bug #21288: mysqldump segmentation fault when using --where
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #21288: mysqldump segmentation fault when using --where
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
--error 2
|
||||
--exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
--echo #
|
||||
|
||||
create database db1;
|
||||
use db1;
|
||||
|
@ -734,9 +791,9 @@ drop view v2;
|
|||
drop database db1;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug 10713 mysqldump includes database in create view and referenced tables
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug 10713 mysqldump includes database in create view and referenced tables
|
||||
--echo #
|
||||
|
||||
# create table and views in db2
|
||||
create database db2;
|
||||
|
@ -770,18 +827,24 @@ drop table t1, t2;
|
|||
drop database db1;
|
||||
use test;
|
||||
|
||||
#
|
||||
# dump of view
|
||||
#
|
||||
--echo #
|
||||
--echo # End of 4.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Dump of view
|
||||
--echo #
|
||||
|
||||
>>>>>>>
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
--exec $MYSQL_DUMP --skip-comments test
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
--echo #
|
||||
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
|
@ -803,18 +866,18 @@ drop view v2;
|
|||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug #9756
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #9756
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
--exec $MYSQL_DUMP --skip-comments test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #10927 mysqldump: Can't reload dump with view that consist of other view
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #10927 mysqldump: Can't reload dump with view that consist of other view
|
||||
--echo #
|
||||
|
||||
create table t1(a int, b int, c varchar(30));
|
||||
|
||||
|
@ -834,9 +897,9 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
|
|||
drop view v1, v2, v3;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for dumping triggers
|
||||
#
|
||||
--echo #
|
||||
--echo # Test for dumping triggers
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int, b bigint default NULL);
|
||||
CREATE TABLE t2 (a int);
|
||||
|
@ -884,9 +947,9 @@ show tables;
|
|||
show triggers;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
#
|
||||
--echo #
|
||||
--echo # Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
--echo #
|
||||
|
||||
--system echo '[mysqltest1]' > $MYSQLTEST_VARDIR/tmp/tmp.cnf
|
||||
--system echo 'port=1234' >> $MYSQLTEST_VARDIR/tmp/tmp.cnf
|
||||
|
@ -894,9 +957,9 @@ DROP TABLE t1, t2;
|
|||
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
|
||||
--system rm $MYSQLTEST_VARDIR/tmp/tmp.cnf
|
||||
|
||||
#
|
||||
# Test of fix to BUG 12597
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #12597
|
||||
--echo #
|
||||
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
CREATE TABLE `test1` (
|
||||
|
@ -932,9 +995,9 @@ DROP TRIGGER testref;
|
|||
DROP TABLE test1;
|
||||
DROP TABLE test2;
|
||||
|
||||
#
|
||||
# BUG#9056 - mysqldump does not dump routines
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #9056 - mysqldump does not dump routines
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
@ -981,9 +1044,9 @@ DROP PROCEDURE bug9056_proc2;
|
|||
DROP PROCEDURE `a'b`;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG# 13052 - mysqldump timestamp reloads broken
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #13052 - mysqldump timestamp reloads broken
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
@ -1003,9 +1066,9 @@ drop table t1;
|
|||
set global time_zone=default;
|
||||
set time_zone=default;
|
||||
|
||||
#
|
||||
# Test of fix to BUG 13146 - ansi quotes break loading of triggers
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #13146 - ansi quotes break loading of triggers
|
||||
--echo #
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS `t1 test`;
|
||||
DROP TABLE IF EXISTS `t2 test`;
|
||||
|
@ -1036,9 +1099,9 @@ DROP TRIGGER `test trig`;
|
|||
DROP TABLE `t1 test`;
|
||||
DROP TABLE `t2 test`;
|
||||
|
||||
#
|
||||
# BUG# 12838 mysqldump -x with views exits with error
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #12838 mysqldump -x with views exits with error
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
|
@ -1059,10 +1122,10 @@ drop view v0;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
|
||||
# for tables with trigger created in the IGNORE_SPACE sql mode.
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #14554 - mysqldump does not separate words "ROW" and "BEGIN"
|
||||
--echo # for tables with trigger created in the IGNORE_SPACE sql mode.
|
||||
--echo #
|
||||
|
||||
SET @old_sql_mode = @@SQL_MODE;
|
||||
SET SQL_MODE = IGNORE_SPACE;
|
||||
|
@ -1083,18 +1146,31 @@ SET SQL_MODE = @old_sql_mode;
|
|||
DROP TRIGGER tr1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #13318: Bad result with empty field and --hex-blob
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #13318: Bad result with empty field and --hex-blob
|
||||
--echo #
|
||||
create table t1 (a binary(1), b blob);
|
||||
insert into t1 values ('','');
|
||||
--exec $MYSQL_DUMP --skip-comments --skip-extended-insert --hex-blob test t1
|
||||
--exec $MYSQL_DUMP --skip-comments --hex-blob test t1
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 14871 Invalid view dump output
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #18536: wrong table order
|
||||
--echo #
|
||||
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table t3(a int);
|
||||
--error 6
|
||||
--exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
|
||||
drop table t1, t2, t3;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #14871 Invalid view dump output
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
|
@ -1121,9 +1197,9 @@ select * from v3 order by a;
|
|||
drop table t1;
|
||||
drop view v1, v2, v3, v4, v5;
|
||||
|
||||
#
|
||||
# Bug #16878 dump of trigger
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #16878 dump of trigger
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, created datetime);
|
||||
create table t2 (b int, created datetime);
|
||||
|
@ -1152,10 +1228,9 @@ drop trigger tr2;
|
|||
drop table t1, t2;
|
||||
|
||||
|
||||
#
|
||||
# Bug#18462 mysqldump does not dump view structures correctly
|
||||
#
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #18462 mysqldump does not dump view structures correctly
|
||||
--echo #
|
||||
create table t (qty int, price int);
|
||||
insert into t values(3, 50);
|
||||
insert into t values(5, 51);
|
||||
|
@ -1172,11 +1247,10 @@ drop view v2;
|
|||
drop table t;
|
||||
|
||||
|
||||
#
|
||||
# Bug#14857 Reading dump files with single statement stored routines fails.
|
||||
# fixed by patch for bug#16878
|
||||
#
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #14857 Reading dump files with single statement stored routines fails.
|
||||
--echo # fixed by patch for Bug #16878
|
||||
--echo #
|
||||
DELIMITER |;
|
||||
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
|
||||
return 42 */|
|
||||
|
@ -1188,10 +1262,10 @@ show create procedure p;
|
|||
drop function f;
|
||||
drop procedure p;
|
||||
|
||||
#
|
||||
# Bug #17371 Unable to dump a schema with invalid views
|
||||
#
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #17371 Unable to dump a schema with invalid views
|
||||
--echo #
|
||||
|
||||
create table t1 ( id serial );
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
|
@ -1202,10 +1276,11 @@ drop table t1;
|
|||
--echo } mysqldump
|
||||
drop view v1;
|
||||
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
|
||||
--echo #
|
||||
--echo # Bug #17201 Spurious 'DROP DATABASE' in output,
|
||||
--echo # also confusion between tables and views.
|
||||
--echo # Example code from Markus Popp
|
||||
--echo #
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
|
@ -1219,9 +1294,9 @@ drop view v1;
|
|||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
|
||||
#
|
||||
# Bug21014 Segmentation fault of mysqldump on view
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug21014 Segmentation fault of mysqldump on view
|
||||
--echo #
|
||||
create database mysqldump_tables;
|
||||
use mysqldump_tables;
|
||||
create table basetable ( id serial, tag varchar(64) );
|
||||
|
@ -1237,9 +1312,9 @@ drop database mysqldump_views;
|
|||
drop table mysqldump_tables.basetable;
|
||||
drop database mysqldump_tables;
|
||||
|
||||
#
|
||||
# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #20221 Dumping of multiple databases containing view(s) yields maleformed dumps
|
||||
--echo #
|
||||
create database mysqldump_dba;
|
||||
use mysqldump_dba;
|
||||
create table t1 (f1 int, f2 int);
|
||||
|
@ -1275,11 +1350,11 @@ use mysqldump_dbb;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_dbb;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Bug#21215 mysqldump creating incomplete backups without warning
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #21215 mysqldump creating incomplete backups without warning
|
||||
--echo #
|
||||
use test;
|
||||
|
||||
# Create user without sufficient privs to perform the requested operation
|
||||
create user mysqltest_1@localhost;
|
||||
|
@ -1321,10 +1396,10 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
|||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
#
|
||||
# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||
# information_schema database.
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||
--echo # information_schema database.
|
||||
--echo #
|
||||
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
connection root;
|
||||
create database mysqldump_myDB;
|
||||
|
@ -1365,9 +1440,10 @@ INSERT INTO t1 VALUES (3,4), (4,5);
|
|||
--exec $MYSQL_DUMP --replace --skip-comments test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#13926: --order-by-primary fails if PKEY contains quote character
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #13926: --order-by-primary fails if PKEY contains quote character
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
|
@ -1382,11 +1458,14 @@ insert into t1 values (0815, 4711, 2006);
|
|||
--exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
|
||||
DROP TABLE `t1`;
|
||||
--enable_warnings
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
# Added for use-thread option
|
||||
#
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Added for use-thread option
|
||||
--echo #
|
||||
create table t1 (a text , b text);
|
||||
create table t2 (a text , b text);
|
||||
insert t1 values ("Duck, Duck", "goose");
|
||||
|
@ -1424,9 +1503,9 @@ drop table t2;
|
|||
|
||||
drop table words2;
|
||||
|
||||
#
|
||||
# BUG# 16853: mysqldump doesn't show events
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #16853: mysqldump doesn't show events
|
||||
--echo #
|
||||
create database first;
|
||||
use first;
|
||||
set time_zone = 'UTC';
|
||||
|
@ -1462,23 +1541,6 @@ drop database third;
|
|||
set time_zone = 'SYSTEM';
|
||||
use test;
|
||||
|
||||
#####
|
||||
#
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
insert into t1 values (1232131);
|
||||
insert into t1 values (4711);
|
||||
insert into t1 values (3231);
|
||||
insert into t1 values (0815);
|
||||
--exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_test_db
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
|
Loading…
Reference in a new issue