diff options
Diffstat (limited to 'mysql-test')
32 files changed, 342 insertions, 249 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 61c523f1aed..5dc59c4e49e 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -2,8 +2,8 @@ # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. +# License as published by the Free Software Foundation; version 2 +# of the License. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/mysql-test/include/system_db_struct.inc b/mysql-test/include/system_db_struct.inc index 4c80161bb85..123c82484b9 100644 --- a/mysql-test/include/system_db_struct.inc +++ b/mysql-test/include/system_db_struct.inc @@ -11,6 +11,7 @@ show create table func; show create table tables_priv; show create table columns_priv; show create table procs_priv; +show create table servers; show create table proc; show create table event; show create table general_log; diff --git a/mysql-test/lib/init_db.sql b/mysql-test/lib/init_db.sql index fcef17eab9b..c6c0f1d81dd 100644 --- a/mysql-test/lib/init_db.sql +++ b/mysql-test/lib/init_db.sql @@ -114,6 +114,20 @@ REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y INSERT INTO user (host,user) VALUES ('localhost',''); INSERT INTO user (host,user) VALUES ('@HOSTNAME@%',''); +CREATE TABLE servers ( + Server_name char(64) NOT NULL DEFAULT '', + Host char(64) NOT NULL DEFAULT '', + Db char(64) NOT NULL DEFAULT '', + Username char(64) NOT NULL DEFAULT '', + Password char(64) NOT NULL DEFAULT '', + Port INT(4) NOT NULL DEFAULT '0', + Socket char(64) NOT NULL DEFAULT '', + Wrapper char(64) NOT NULL DEFAULT '', + Owner char(64) NOT NULL DEFAULT '', + PRIMARY KEY (Server_name)) + CHARACTER SET utf8 comment='MySQL Foreign Servers table'; + +INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root'); CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, diff --git a/mysql-test/r/1st.result b/mysql-test/r/1st.result index 274a23cc48c..60190629dd0 100644 --- a/mysql-test/r/1st.result +++ b/mysql-test/r/1st.result @@ -19,6 +19,7 @@ ndb_binlog_index plugin proc procs_priv +servers slow_log tables_priv time_zone diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index b299940e332..be1a3efc5c6 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -6,26 +6,26 @@ Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X) backup table t4 to '../tmp'; Table Op Msg_type Msg_text test.t4 backup status OK Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead backup table t4 to '../tmp'; Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Error 1 Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X) drop table t4; restore table t4 from '../tmp'; Table Op Msg_type Msg_text test.t4 restore status OK Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead select count(*) from t4; count(*) 0 @@ -35,19 +35,19 @@ backup table t1 to '../tmp'; Table Op Msg_type Msg_text test.t1 backup status OK Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead drop table t1; restore table t1 from '../bogus'; Table Op Msg_type Msg_text t1 restore error Failed copying .frm file Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) restore table t1 from '../tmp'; Table Op Msg_type Msg_text test.t1 restore status OK Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead select n from t1; n 23 @@ -62,7 +62,7 @@ Table Op Msg_type Msg_text test.t2 backup status OK test.t3 backup status OK Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead drop table t1,t2,t3; restore table t1,t2,t3 from '../tmp'; Table Op Msg_type Msg_text @@ -70,7 +70,7 @@ test.t1 restore status OK test.t2 restore status OK test.t3 restore status OK Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead select n from t1; n 23 @@ -91,7 +91,7 @@ restore table t1 from '../tmp'; Table Op Msg_type Msg_text test.t1 restore status OK Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead rename table t1 to t5; lock tables t5 write; backup table t5 to '../tmp'; @@ -99,7 +99,7 @@ unlock tables; Table Op Msg_type Msg_text test.t5 backup status OK Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead drop table t5; DROP TABLE IF EXISTS `t+1`; CREATE TABLE `t+1` (c1 INT); @@ -108,13 +108,13 @@ BACKUP TABLE `t+1` TO '../tmp'; Table Op Msg_type Msg_text test.t+1 backup status OK Warnings: -Warning 1541 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead DROP TABLE `t+1`; RESTORE TABLE `t+1` FROM '../tmp'; Table Op Msg_type Msg_text test.t+1 restore status OK Warnings: -Warning 1541 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead SELECT * FROM `t+1`; c1 1 diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index a222d11cb50..25cf4f90e6d 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -15,6 +15,7 @@ ndb_binlog_index plugin proc procs_priv +servers slow_log tables_priv time_zone @@ -47,6 +48,7 @@ ndb_binlog_index plugin proc procs_priv +servers slow_log tables_priv time_zone @@ -87,6 +89,7 @@ ndb_binlog_index plugin proc procs_priv +servers slow_log tables_priv time_zone diff --git a/mysql-test/r/federated_server.result b/mysql-test/r/federated_server.result new file mode 100644 index 00000000000..43a99454e1e --- /dev/null +++ b/mysql-test/r/federated_server.result @@ -0,0 +1,112 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +create database first_db; +create database second_db; +use first_db; +DROP TABLE IF EXISTS first_db.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE first_db.t1 ( +`id` int(20) NOT NULL, +`name` varchar(64) NOT NULL default '' + ) +DEFAULT CHARSET=latin1; +use second_db; +DROP TABLE IF EXISTS second_db.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE second_db.t1 ( +`id` int(20) NOT NULL, +`name` varchar(64) NOT NULL default '' + ) +DEFAULT CHARSET=latin1; +drop server if exists 'server_one'; +create server 'server_one' foreign data wrapper 'mysql' options +(HOST '127.0.0.1', +DATABASE 'first_db', +USER 'root', +PASSWORD '', +PORT SLAVE_PORT, +SOCKET '', +OWNER 'root'); +drop server if exists 'server_two'; +create server 'server_two' foreign data wrapper 'mysql' options +(HOST '127.0.0.1', +DATABASE 'second_db', +USER 'root', +PASSWORD '', +PORT SLAVE_PORT, +SOCKET '', +OWNER 'root'); +select * from mysql.servers; +Server_name Host Db Username Password Port Socket Wrapper Owner +test localhost test root 0 mysql root +server_one 127.0.0.1 first_db root SLAVE_PORT mysql root +server_two 127.0.0.1 second_db root SLAVE_PORT mysql root +DROP TABLE IF EXISTS federated.old; +Warnings: +Note 1051 Unknown table 'old' +CREATE TABLE federated.old ( +`id` int(20) NOT NULL, +`name` varchar(64) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/first_db/t1'; +INSERT INTO federated.old (id, name) values (1, 'federated.old url'); +SELECT * FROM federated.old; +id name +1 federated.old url +DROP TABLE IF EXISTS federated.old2; +Warnings: +Note 1051 Unknown table 'old2' +CREATE TABLE federated.old2 ( +`id` int(20) NOT NULL, +`name` varchar(64) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/second_db/t1'; +INSERT INTO federated.old2 (id, name) values (1, 'federated.old2 url'); +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(64) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +CONNECTION='server_one'; +INSERT INTO federated.t1 (id, name) values (1, 'server_one, new scheme'); +SELECT * FROM federated.t1; +id name +1 federated.old url +1 server_one, new scheme +ALTER SERVER 'server_one' options(DATABASE 'second_db'); +flush tables; +INSERT INTO federated.t1 (id, name) values (1, 'server_two, new scheme'); +SELECT * FROM federated.t1; +id name +1 federated.old2 url +1 server_two, new scheme +drop table federated.t1; +drop server 'server_one'; +drop server 'server_two'; +select * from mysql.servers; +Server_name Host Db Username Password Port Socket Wrapper Owner +test localhost test root 0 mysql root +drop table first_db.t1; +drop table second_db.t1; +drop database first_db; +drop database second_db; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index ac51bfe2a36..e8599241cc0 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -76,6 +76,7 @@ host plugin proc procs_priv +servers slow_log tables_priv time_zone @@ -852,7 +853,7 @@ flush privileges; SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; table_schema count(*) information_schema 27 -mysql 21 +mysql 22 create table t1 (i int, j int); create trigger trg1 before insert on t1 for each row begin diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index a031b440b17..a65020754be 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -1,173 +1,3 @@ Run mysql_upgrade once -mysql.columns_priv OK -mysql.db OK -mysql.event OK -mysql.func OK -mysql.general_log OK -mysql.help_category OK -mysql.help_keyword OK -mysql.help_relation OK -mysql.help_topic OK -mysql.host OK -mysql.ndb_binlog_index OK -mysql.plugin OK -mysql.proc OK -mysql.procs_priv OK -mysql.slow_log OK -mysql.tables_priv OK -mysql.time_zone OK -mysql.time_zone_leap_second OK -mysql.time_zone_name OK -mysql.time_zone_transition OK -mysql.time_zone_transition_type OK -mysql.user OK -@hadGrantPriv:=1 -1 -1 -1 -1 -1 -@hadShowDbPriv:=1 -1 -1 -1 -1 -1 -@hadCreateViewPriv:=1 -1 -1 -1 -1 -1 -@hadCreateRoutinePriv:=1 -1 -1 -1 -1 -1 -@hadCreateUserPriv:=1 -1 -1 -1 -1 -1 -@hadEventPriv :=1 -1 -1 -1 -1 -1 -@hadTriggerPriv :=1 -1 -1 -1 -1 -1 Run it again - should say already completed -@hadGrantPriv:=1 -1 -1 -1 -1 -1 -@hadShowDbPriv:=1 -1 -1 -1 -1 -1 -@hadCreateViewPriv:=1 -1 -1 -1 -1 -1 -@hadCreateRoutinePriv:=1 -1 -1 -1 -1 -1 -@hadCreateUserPriv:=1 -1 -1 -1 -1 -1 -@hadEventPriv :=1 -1 -1 -1 -1 -1 -@hadTriggerPriv :=1 -1 -1 -1 -1 -1 Force should run it regardless of wheter it's been run before -mysql.columns_priv OK -mysql.db OK -mysql.event OK -mysql.func OK -mysql.general_log OK -mysql.help_category OK -mysql.help_keyword OK -mysql.help_relation OK -mysql.help_topic OK -mysql.host OK -mysql.ndb_binlog_index OK -mysql.plugin OK -mysql.proc OK -mysql.procs_priv OK -mysql.slow_log OK -mysql.tables_priv OK -mysql.time_zone OK -mysql.time_zone_leap_second OK -mysql.time_zone_name OK -mysql.time_zone_transition OK -mysql.time_zone_transition_type OK -mysql.user OK -@hadGrantPriv:=1 -1 -1 -1 -1 -1 -@hadShowDbPriv:=1 -1 -1 -1 -1 -1 -@hadCreateViewPriv:=1 -1 -1 -1 -1 -1 -@hadCreateRoutinePriv:=1 -1 -1 -1 -1 -1 -@hadCreateUserPriv:=1 -1 -1 -1 -1 -1 -@hadEventPriv :=1 -1 -1 -1 -1 -1 -@hadTriggerPriv :=1 -1 -1 -1 -1 -1 diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index 37d0f6ebeeb..c664932f2bb 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -17,6 +17,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK +mysql.servers OK mysql.slow_log note : The storage engine for the table doesn't support optimize mysql.tables_priv OK @@ -41,6 +42,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK +mysql.servers OK mysql.slow_log note : The storage engine for the table doesn't support optimize mysql.tables_priv OK diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 83cb12ce964..724b42b6db3 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -5,20 +5,20 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; Warnings: -Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M ENGINE=XYZ; Warnings: Error 1286 Unknown table engine 'XYZ' -Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 12M; Warnings: -Error 1465 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' set storage_engine=ndb; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/r/ndb_dd_ddl.result b/mysql-test/r/ndb_dd_ddl.result index eea80090768..aab44e261b2 100644 --- a/mysql-test/r/ndb_dd_ddl.result +++ b/mysql-test/r/ndb_dd_ddl.result @@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP SHOW WARNINGS; Level Code Message Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB -Error 1515 Failed to create LOGFILE GROUP +Error 1516 Failed to create LOGFILE GROUP CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' INITIAL_SIZE 1M diff --git a/mysql-test/r/rpl_extraCol_innodb.result b/mysql-test/r/rpl_extraCol_innodb.result index 7f681aef4be..ff505364124 100644 --- a/mysql-test/r/rpl_extraCol_innodb.result +++ b/mysql-test/r/rpl_extraCol_innodb.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -129,7 +129,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -186,7 +186,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -242,7 +242,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -349,7 +349,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -405,7 +405,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -720,7 +720,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/mysql-test/r/rpl_extraCol_myisam.result b/mysql-test/r/rpl_extraCol_myisam.result index 3c0d1fae4a8..b5ccab8ff4c 100644 --- a/mysql-test/r/rpl_extraCol_myisam.result +++ b/mysql-test/r/rpl_extraCol_myisam.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -129,7 +129,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -186,7 +186,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -242,7 +242,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -349,7 +349,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -405,7 +405,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -720,7 +720,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/mysql-test/r/rpl_ndb_extraCol.result b/mysql-test/r/rpl_ndb_extraCol.result index e51fae29c54..bc40e24ecac 100644 --- a/mysql-test/r/rpl_ndb_extraCol.result +++ b/mysql-test/r/rpl_ndb_extraCol.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -129,7 +129,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -186,7 +186,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -242,7 +242,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -349,7 +349,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -405,7 +405,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -721,7 +721,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result index ae792a5dc2a..527274bf81d 100644 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result @@ -159,7 +159,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns Skip_Counter 0 Exec_Master_Log_Pos # @@ -197,7 +197,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -235,7 +235,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -273,7 +273,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result index b7f0b7b15e2..df9442bfbaf 100644 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result @@ -159,7 +159,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns Skip_Counter 0 Exec_Master_Log_Pos # @@ -197,7 +197,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -235,7 +235,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -273,7 +273,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1522 +Last_Errno 1523 Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result index fe54b1cbeb4..175e8b6613d 100644 --- a/mysql-test/r/rpl_sp.result +++ b/mysql-test/r/rpl_sp.result @@ -181,7 +181,7 @@ end| ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) set global log_bin_trust_routine_creators=1; Warnings: -Warning 1541 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead +Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead set global log_bin_trust_function_creators=0; set global log_bin_trust_function_creators=1; set global log_bin_trust_function_creators=1; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index f24b109d75a..15937a4a6f5 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3475,7 +3475,7 @@ SELECT 0.9888889889 * 1.011111411911; 0.9998769417899202067879 prepare stmt from 'select 1 as " a "'; Warnings: -Warning 1546 Leading spaces are removed from name ' a ' +Warning 1548 Leading spaces are removed from name ' a ' execute stmt; a 1 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 73450c9a773..516355839b5 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -712,7 +712,7 @@ drop database mysqltest; show full plugin; show warnings; Level Code Message -Warning 1541 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead +Warning 1543 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead show plugin; show plugins; create database `mysqlttest\1`; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 6859de2ed63..71684d23b9d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5633,7 +5633,7 @@ drop function if exists pi; create function pi() returns varchar(50) return "pie, my favorite desert."; Warnings: -Note 1579 This function 'pi' has the same name as a native function. +Note 1581 This function 'pi' has the same name as a native function. SET @save_sql_mode=@@sql_mode; SET SQL_MODE='IGNORE_SPACE'; select pi(), pi (); @@ -5682,15 +5682,15 @@ use test; create function `database`() returns varchar(50) return "Stored function database"; Warnings: -Note 1579 This function 'database' has the same name as a native function. +Note 1581 This function 'database' has the same name as a native function. create function `current_user`() returns varchar(50) return "Stored function current_user"; Warnings: -Note 1579 This function 'current_user' has the same name as a native function. +Note 1581 This function 'current_user' has the same name as a native function. create function md5(x varchar(50)) returns varchar(50) return "Stored function md5"; Warnings: -Note 1579 This function 'md5' has the same name as a native function. +Note 1581 This function 'md5' has the same name as a native function. SET SQL_MODE='IGNORE_SPACE'; select database(), database (); database() database () diff --git a/mysql-test/r/sp_gis.result b/mysql-test/r/sp_gis.result index 0eebd1b9342..f46bcc90308 100644 --- a/mysql-test/r/sp_gis.result +++ b/mysql-test/r/sp_gis.result @@ -7,11 +7,11 @@ return 1; create function x() returns int return 2; Warnings: -Note 1579 This function 'x' has the same name as a native function. +Note 1581 This function 'x' has the same name as a native function. create function y() returns int return 3; Warnings: -Note 1579 This function 'y' has the same name as a native function. +Note 1581 This function 'y' has the same name as a native function. select a(); a() 1 diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index bf4c478677b..a0d687e565b 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -535,7 +535,7 @@ use db_bug7787| CREATE PROCEDURE p1() SHOW INNODB STATUS; | Warnings: -Warning 1541 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead +Warning 1543 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost| DROP DATABASE db_bug7787| drop user user_bug7787@localhost| diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 6bbd0adfc49..c93fbfba6e2 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -15,6 +15,7 @@ ndb_binlog_index plugin proc procs_priv +servers slow_log tables_priv time_zone @@ -169,6 +170,20 @@ procs_priv CREATE TABLE `procs_priv` ( PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +show create table servers; +Table Create Table +servers CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' show create table proc; Table Create Table proc CREATE TABLE `proc` ( diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 281a5f3fab6..c075a199dae 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -101,13 +101,13 @@ 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 1541 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1541 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1543 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. 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", diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index d03c5ed2f54..21c553951f6 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -175,7 +175,7 @@ Warning 1266 Using storage engine MyISAM for table 't1' drop table t1; set table_type=MYISAM; Warnings: -Warning 1541 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead +Warning 1543 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. 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'; diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index bb7f84d0287..08f8293ff52 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -640,32 +640,32 @@ select extractValue('<a>a','/a'); extractValue('<a>a','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' select extractValue('<a>a<','/a'); extractValue('<a>a<','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' select extractValue('<a>a</','/a'); extractValue('<a>a</','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)' select extractValue('<a>a</a','/a'); extractValue('<a>a</a','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)' select extractValue('<a>a</a></b>','/a'); extractValue('<a>a</a></b>','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)' select extractValue('<a b=>a</a>','/a'); extractValue('<a b=>a</a>','/a') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' select extractValue('<e>1</e>','position()'); ERROR HY000: XPATH syntax error: '' select extractValue('<e>1</e>','last()'); @@ -716,17 +716,17 @@ select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//* extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)' select extractValue('<.>test</.>','//*'); extractValue('<.>test</.>','//*') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' select extractValue('<->test</->','//*'); extractValue('<->test</->','//*') NULL Warnings: -Warning 1512 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' +Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' select extractValue('<:>test</:>','//*'); extractValue('<:>test</:>','//*') test diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 012e3f3911a..1c7ac8f6dba 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -38,4 +38,5 @@ ndb_binlog_discover : bug#21806 2006-08-24 ndb_autodiscover3 : bug#21806 flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin +mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results diff --git a/mysql-test/t/federated_server.test b/mysql-test/t/federated_server.test new file mode 100644 index 00000000000..3e47d9bc95d --- /dev/null +++ b/mysql-test/t/federated_server.test @@ -0,0 +1,110 @@ +# WL #3031 This test tests the new servers table as well as +# if federated can utilise the servers table +# should work with embedded server after mysqltest is fixed +-- source include/not_embedded.inc +source include/federated.inc; + +connection slave; +create database first_db; +create database second_db; + +use first_db; + +DROP TABLE IF EXISTS first_db.t1; +CREATE TABLE first_db.t1 ( + `id` int(20) NOT NULL, + `name` varchar(64) NOT NULL default '' + ) + DEFAULT CHARSET=latin1; + +use second_db; +DROP TABLE IF EXISTS second_db.t1; +CREATE TABLE second_db.t1 ( + `id` int(20) NOT NULL, + `name` varchar(64) NOT NULL default '' + ) + DEFAULT CHARSET=latin1; + +connection master; + +drop server if exists 'server_one'; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create server 'server_one' foreign data wrapper 'mysql' options + (HOST '127.0.0.1', + DATABASE 'first_db', + USER 'root', + PASSWORD '', + PORT $SLAVE_MYPORT, + SOCKET '', + OWNER 'root'); + +drop server if exists 'server_two'; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create server 'server_two' foreign data wrapper 'mysql' options + (HOST '127.0.0.1', + DATABASE 'second_db', + USER 'root', + PASSWORD '', + PORT $SLAVE_MYPORT, + SOCKET '', + OWNER 'root'); + +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval select * from mysql.servers; + +DROP TABLE IF EXISTS federated.old; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CREATE TABLE federated.old ( + `id` int(20) NOT NULL, + `name` varchar(64) NOT NULL default '' + ) + ENGINE="FEDERATED" DEFAULT CHARSET=latin1 + CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/first_db/t1'; + +INSERT INTO federated.old (id, name) values (1, 'federated.old url'); + +SELECT * FROM federated.old; + +DROP TABLE IF EXISTS federated.old2; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CREATE TABLE federated.old2 ( + `id` int(20) NOT NULL, + `name` varchar(64) NOT NULL default '' + ) + ENGINE="FEDERATED" DEFAULT CHARSET=latin1 + CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/second_db/t1'; + +INSERT INTO federated.old2 (id, name) values (1, 'federated.old2 url'); + +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( + `id` int(20) NOT NULL, + `name` varchar(64) NOT NULL default '' + ) + ENGINE="FEDERATED" DEFAULT CHARSET=latin1 + CONNECTION='server_one'; + +INSERT INTO federated.t1 (id, name) values (1, 'server_one, new scheme'); + +SELECT * FROM federated.t1; + +ALTER SERVER 'server_one' options(DATABASE 'second_db'); + +flush tables; + +INSERT INTO federated.t1 (id, name) values (1, 'server_two, new scheme'); +SELECT * FROM federated.t1; + +drop table federated.t1; + +drop server 'server_one'; +drop server 'server_two'; +select * from mysql.servers; + +connection slave; +drop table first_db.t1; +drop table second_db.t1; +drop database first_db; +drop database second_db; + +source include/federated_cleanup.inc; diff --git a/mysql-test/t/system_mysql_db_fix30020.test b/mysql-test/t/system_mysql_db_fix30020.test index 6188aebb9f5..8220034b288 100644 --- a/mysql-test/t/system_mysql_db_fix30020.test +++ b/mysql-test/t/system_mysql_db_fix30020.test @@ -96,7 +96,7 @@ INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N',' -- disable_query_log DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, -procs_priv, help_category, help_keyword, help_relation, help_topic, proc, +procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index; diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test index 00bd37979c4..7d909754824 100644 --- a/mysql-test/t/system_mysql_db_fix40123.test +++ b/mysql-test/t/system_mysql_db_fix40123.test @@ -69,7 +69,7 @@ CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, -- disable_query_log # Drop all tables created by this test -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index; -- enable_query_log diff --git a/mysql-test/t/system_mysql_db_fix50030.test b/mysql-test/t/system_mysql_db_fix50030.test index 41ae3bec4de..b4e0ed65242 100644 --- a/mysql-test/t/system_mysql_db_fix50030.test +++ b/mysql-test/t/system_mysql_db_fix50030.test @@ -59,6 +59,9 @@ CREATE TABLE proc ( db char(64) collate utf8_bin DEFAULT '' NOT CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges'; +CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table'; + +INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root'); # Run the mysql_fix_privilege_tables.sql using "mysql --force" --exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/system_mysql_db_fix50030.log 2>&1 @@ -72,7 +75,7 @@ CREATE TABLE procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char( -- disable_query_log # Drop all tables created by this test -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index; -- enable_query_log |