Commit c65479d0 authored by unknown's avatar unknown

Post-merge fixes.


mysql-test/r/federated.result:
  A post-merge fix.
mysql-test/r/show_check.result:
  A post-merge fix.
sql/log_event.cc:
  Remove rewrite_db (it's refactored in 5.1 to rpl_filter)
sql/share/errmsg.txt:
  Move ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA to the end of the list.
  This breaks compatibility of errmsg.sys with 5.0 but preserves 
  compatibility with 5.1.11.
sql/sql_class.h:
  A post-merge fix.
parent 0a5f1666
...@@ -1603,7 +1603,6 @@ fld_cid fld_name fld_parentid fld_delt ...@@ -1603,7 +1603,6 @@ fld_cid fld_name fld_parentid fld_delt
5 Torkel 0 0 5 Torkel 0 0
DROP TABLE federated.t1; DROP TABLE federated.t1;
DROP TABLE federated.bug_17377_table; DROP TABLE federated.bug_17377_table;
DROP TABLE federated.t1;
drop table if exists federated.t1; drop table if exists federated.t1;
create table federated.t1 (a int, b int, c int); create table federated.t1 (a int, b int, c int);
drop table if exists federated.t1; drop table if exists federated.t1;
......
...@@ -607,6 +607,68 @@ DROP TABLE tyt2; ...@@ -607,6 +607,68 @@ DROP TABLE tyt2;
DROP TABLE urkunde; DROP TABLE urkunde;
SHOW TABLES FROM non_existing_database; SHOW TABLES FROM non_existing_database;
ERROR 42000: Unknown database 'non_existing_database' ERROR 42000: Unknown database 'non_existing_database'
End of 4.1 tests
DROP VIEW IF EXISTS v1;
DROP PROCEDURE IF EXISTS p1;
CREATE VIEW v1 AS SELECT 1;
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE 1;
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_cache 1 AS `1`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_NO_CACHE 1;
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache 1 AS `1`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select now() AS `NOW()`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_cache now() AS `NOW()`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_NO_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_NO_CACHE SQL_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()`
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE SQL_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()`
DROP VIEW v1;
CREATE PROCEDURE p1()
BEGIN
SET @s= 'CREATE VIEW v1 AS SELECT SQL_CACHE 1';
PREPARE stmt FROM @s;
EXECUTE stmt;
DROP PREPARE stmt;
END |
CALL p1();
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_cache 1 AS `1`
DROP PROCEDURE p1;
DROP VIEW v1;
End of 5.0 tests.
SHOW AUTHORS; SHOW AUTHORS;
create database mysqltest; create database mysqltest;
show create database mysqltest; show create database mysqltest;
......
...@@ -1694,22 +1694,6 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) ...@@ -1694,22 +1694,6 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
static const char *rewrite_db(const char *db)
{
if (replicate_rewrite_db.is_empty() || db == NULL)
return db;
I_List_iterator<i_string_pair> it(replicate_rewrite_db);
i_string_pair* tmp;
while ((tmp=it++))
{
if (strcmp(tmp->key, db) == 0)
return tmp->val;
}
return db;
}
int Query_log_event::exec_event(struct st_relay_log_info* rli) int Query_log_event::exec_event(struct st_relay_log_info* rli)
{ {
return exec_event(rli, query, q_len); return exec_event(rli, query, q_len);
......
...@@ -5594,8 +5594,6 @@ ER_NON_GROUPING_FIELD_USED 42000 ...@@ -5594,8 +5594,6 @@ ER_NON_GROUPING_FIELD_USED 42000
eng "non-grouping field '%-.64s' is used in %-.64s clause" eng "non-grouping field '%-.64s' is used in %-.64s clause"
ER_TABLE_CANT_HANDLE_SPKEYS ER_TABLE_CANT_HANDLE_SPKEYS
eng "The used table type doesn't support SPATIAL indexes" eng "The used table type doesn't support SPATIAL indexes"
ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA
eng "Triggers can not be created on system tables"
ER_ILLEGAL_HA_CREATE_OPTION ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'" eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ER_PARTITION_REQUIRES_VALUES_ERROR ER_PARTITION_REQUIRES_VALUES_ERROR
...@@ -5841,3 +5839,5 @@ ER_CANT_ACTIVATE_LOG ...@@ -5841,3 +5839,5 @@ ER_CANT_ACTIVATE_LOG
eng "Cannot activate '%-.64s' log." eng "Cannot activate '%-.64s' log."
ER_RBR_NOT_AVAILABLE ER_RBR_NOT_AVAILABLE
eng "The server was not built with row-based replication" eng "The server was not built with row-based replication"
ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA
eng "Triggers can not be created on system tables"
...@@ -1586,17 +1586,10 @@ class THD :public Statement, ...@@ -1586,17 +1586,10 @@ class THD :public Statement,
if (db && new_db && db_length >= new_db_len) if (db && new_db && db_length >= new_db_len)
memcpy(db, new_db, new_db_len+1); memcpy(db, new_db, new_db_len+1);
else else
{
/* Do not reallocate memory if current chunk is big enough. */
if (db && db_length >= new_db_len)
memcpy(db, new_db, new_db_len+1);
else
{ {
x_free(db); x_free(db);
db= new_db ? my_strndup(new_db, new_db_len, MYF(MY_WME)) : NULL; db= new_db ? my_strndup(new_db, new_db_len, MYF(MY_WME)) : NULL;
} }
db_length= db ? new_db_len: 0;
}
db_length= db ? new_db_len : 0; db_length= db ? new_db_len : 0;
return new_db && !db; return new_db && !db;
} }
......
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