Commit fdf3c175 authored by unknown's avatar unknown

after merge fix

parent 4e15adf8
...@@ -80,7 +80,6 @@ enum options_client ...@@ -80,7 +80,6 @@ enum options_client
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID, OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID,
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
OPT_WRITE_BINLOG, OPT_MAX_CLIENT_OPTION, OPT_WRITE_BINLOG, OPT_DUMP_DATE,
OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CLIENT_OPTION
OPT_DEBUG_INFO, OPT_ERROR_LOG_FILE, OPT_DUMP_DATE
}; };
...@@ -425,7 +425,7 @@ static struct my_option my_long_options[] = ...@@ -425,7 +425,7 @@ static struct my_option my_long_options[] =
(uchar**) &opt_single_transaction, (uchar**) &opt_single_transaction, 0, (uchar**) &opt_single_transaction, (uchar**) &opt_single_transaction, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.", {"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.",
(gptr*) &opt_dump_date, (gptr*) &opt_dump_date, 0, (uchar**) &opt_dump_date, (uchar**) &opt_dump_date, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-opt", OPT_SKIP_OPTIMIZATION, {"skip-opt", OPT_SKIP_OPTIMIZATION,
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.", "Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
......
...@@ -516,7 +516,7 @@ drop database mysqldump_test_db; ...@@ -516,7 +516,7 @@ drop database mysqldump_test_db;
# --default-character-set=xxx. However, we should dump in UTF8 # --default-character-set=xxx. However, we should dump in UTF8
# if it is explicitely set. # if it is explicitely set.
CREATE TABLE t1 (a CHAR(10)); CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß'); INSERT INTO t1 VALUES (_latin1 '');
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
...@@ -574,7 +574,7 @@ SET character_set_client = @saved_cs_client; ...@@ -574,7 +574,7 @@ SET character_set_client = @saved_cs_client;
LOCK TABLES `t1` WRITE; LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES ('Ž™šá'); INSERT INTO `t1` VALUES ('');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */; /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
...@@ -600,7 +600,7 @@ SET character_set_client = @saved_cs_client; ...@@ -600,7 +600,7 @@ SET character_set_client = @saved_cs_client;
LOCK TABLES `t1` WRITE; LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES ('Ž™šá'); INSERT INTO `t1` VALUES ('');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */; /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
...@@ -1739,11 +1739,11 @@ create table t1 (a text character set utf8, b text character set latin1); ...@@ -1739,11 +1739,11 @@ create table t1 (a text character set utf8, b text character set latin1);
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E); insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
select * from t1; select * from t1;
a b a b
Osnabrück Köln Osnabrck Kln
test.t1: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 test.t1: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
select * from t1; select * from t1;
a b a b
Osnabrück Köln Osnabrck Kln
drop table t1; drop table t1;
# #
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
...@@ -3805,6 +3805,28 @@ c1 ...@@ -3805,6 +3805,28 @@ c1
2 2
DROP TABLE t1,t2; DROP TABLE t1,t2;
# #
# Bug#29815: new option for suppressing last line of mysqldump:
# "Dump completed on"
#
# --skip-dump-date:
--
-- Dump completed
# --dump-date:
--
-- Dump completed on DATE
# --dump-date (default):
--
-- Dump completed on DATE
#
# End of 5.0 tests # End of 5.0 tests
# #
drop table if exists t1; drop table if exists t1;
...@@ -3848,145 +3870,6 @@ UNLOCK TABLES; ...@@ -3848,145 +3870,6 @@ UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1; DROP TABLE t1;
`a` int(11) default NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`);
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `t2`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `t2` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `t3`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `t3` (
`a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
LOCK TABLES `t3` WRITE;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
/*!40000 ALTER TABLE `t3` 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, t2, t3;
#
# Bug #23491: MySQLDump prefix function call in a view by database name
#
create database bug23491_original;
create database bug23491_restore;
use bug23491_original;
create table t1 (c1 int);
create view v1 as select * from t1;
create procedure p1() select 1;
create function f1() returns int return 1;
create view v2 as select f1();
create function f2() returns int return f1();
create view v3 as select bug23491_original.f1();
use bug23491_restore;
show create view bug23491_restore.v2;
View Create View
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()`
show create view bug23491_restore.v3;
View Create View
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()`
drop database bug23491_original;
drop database bug23491_restore;
use test;
#
# 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;
grant all privileges on mysqldump_test_db.* to user2;
create procedure mysqldump_test_db.sp1() select 'hello';
/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
-- does user2 have permissions on mysql.proc?
DELIMITER ;
/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
/*!50003 SET SESSION SQL_MODE=""*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`user1`@`%`*/ /*!50003 PROCEDURE `sp1`()
select 'hello' */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
DELIMITER ;
drop procedure sp1;
drop user user1;
drop user user2;
drop database mysqldump_test_db;
#
# 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);
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `t1` (
`c1` int(11) default NULL,
`c2` longblob
);
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
#
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
SELECT * FROM v1;
1
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.
#
CREATE TABLE t1 (c1 INT);
CREATE TRIGGER t1bd BEFORE DELETE ON t1 FOR EACH ROW BEGIN END;
CREATE TABLE t2 (c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SET @TMP_SQL_MODE = @@SQL_MODE;
SET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
INSERT INTO t2 VALUES (0), (1), (2);
SET SQL_MODE = @TMP_SQL_MODE;
SELECT * FROM t2;
c1
0
1
2
SELECT * FROM t2;
c1
0
1
2
DROP TABLE t1,t2;
#
create table t1 (a text , b text); create table t1 (a text , b text);
create table t2 (a text , b text); create table t2 (a text , b text);
insert t1 values ("Duck, Duck", "goose"); insert t1 values ("Duck, Duck", "goose");
...@@ -4292,8 +4175,8 @@ DROP DATABASE IF EXISTS mysqldump_test_db; ...@@ -4292,8 +4175,8 @@ DROP DATABASE IF EXISTS mysqldump_test_db;
# Create objects. # Create objects.
CREATE DATABASE mysqldump_test_db; CREATE DATABASE mysqldump_test_db;
set names koi8r; set names koi8r;
CREATE VIEW mysqldump_test_db.v2 AS SELECT 1 AS ËÏÌÏÎËÁ1; CREATE VIEW mysqldump_test_db.v2 AS SELECT 1 AS 1;
CREATE VIEW mysqldump_test_db.v1 AS SELECT ËÏÌÏÎËÁ1 FROM mysqldump_test_db.v2; CREATE VIEW mysqldump_test_db.v1 AS SELECT 1 FROM mysqldump_test_db.v2;
set names latin1; set names latin1;
# Dump mysqldump_test_db to bug30027.sql. # Dump mysqldump_test_db to bug30027.sql.
......
...@@ -785,7 +785,7 @@ ALTER VIEW v3 AS SELECT f2 FROM t1; ...@@ -785,7 +785,7 @@ ALTER VIEW v3 AS SELECT f2 FROM t1;
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
SHOW CREATE VIEW v3; SHOW CREATE VIEW v3;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
DROP USER u26813@localhost; DROP USER u26813@localhost;
DROP DATABASE db26813; DROP DATABASE db26813;
# #
...@@ -810,24 +810,24 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation ...@@ -810,24 +810,24 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation
ALTER VIEW v2 AS SELECT f2 FROM t1; ALTER VIEW v2 AS SELECT f2 FROM t1;
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
SHOW CREATE VIEW v2; SHOW CREATE VIEW v2;
View Create View View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
ALTER VIEW v1 AS SELECT f2 FROM t1; ALTER VIEW v1 AS SELECT f2 FROM t1;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f2` AS `f2` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci
ALTER VIEW v2 AS SELECT f2 FROM t1; ALTER VIEW v2 AS SELECT f2 FROM t1;
SHOW CREATE VIEW v2; SHOW CREATE VIEW v2;
View Create View View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f2` AS `f2` from `t1` v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f2` AS `f2` from `t1` latin1 latin1_swedish_ci
ALTER VIEW v1 AS SELECT f1 FROM t1; ALTER VIEW v1 AS SELECT f1 FROM t1;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
ALTER VIEW v2 AS SELECT f1 FROM t1; ALTER VIEW v2 AS SELECT f1 FROM t1;
SHOW CREATE VIEW v2; SHOW CREATE VIEW v2;
View Create View View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
DROP USER u29908_1@localhost; DROP USER u29908_1@localhost;
DROP USER u29908_2@localhost; DROP USER u29908_2@localhost;
DROP DATABASE mysqltest_29908; DROP DATABASE mysqltest_29908;
...@@ -938,6 +938,8 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VI ...@@ -938,6 +938,8 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VI
Warnings: Warnings:
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
Warnings:
Note 1449 There is no 'no_such'@'user_1' registered
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment