From d3a10ec6efdf8a257935a8f6161ca83d5538ce6b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Mon, 16 Feb 2009 08:38:15 -0300 Subject: Bug#41077: Warning contains wrong future version Substitute all references of MySQL version "5.2" to "6.0" in deprecation warning messages.Deprecated constructs are being removed in the 6.0 tree. --- sql/sql_table.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index aa2a5739f17..f0059e7a95b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4639,7 +4639,7 @@ err: bool mysql_backup_table(THD* thd, TABLE_LIST* table_list) { DBUG_ENTER("mysql_backup_table"); - WARN_DEPRECATED(thd, "5.2", "BACKUP TABLE", + WARN_DEPRECATED(thd, "6.0", "BACKUP TABLE", "MySQL Administrator (mysqldump, mysql)"); DBUG_RETURN(mysql_admin_table(thd, table_list, 0, "backup", TL_READ, 0, 0, 0, 0, @@ -4650,7 +4650,7 @@ bool mysql_backup_table(THD* thd, TABLE_LIST* table_list) bool mysql_restore_table(THD* thd, TABLE_LIST* table_list) { DBUG_ENTER("mysql_restore_table"); - WARN_DEPRECATED(thd, "5.2", "RESTORE TABLE", + WARN_DEPRECATED(thd, "6.0", "RESTORE TABLE", "MySQL Administrator (mysqldump, mysql)"); DBUG_RETURN(mysql_admin_table(thd, table_list, 0, "restore", TL_WRITE, 1, 1, 0, -- cgit v1.2.1 From 85cc17d3cd2a7ae926ed58adbb0446b9a2b09ed2 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 18 Feb 2009 21:10:19 +0100 Subject: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed error message to show that it is partitioning that does not support foreign keys yet. Changed spelling from British english to American english. mysql-test/r/partition.result: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. mysql-test/r/partition_mgm_err.result: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. mysql-test/t/partition.test: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Added test for verifying error message sql/share/errmsg.txt: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. sql/sql_table.cc: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Using a better error message. --- sql/sql_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index aa2a5739f17..e72aa3ca8f3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3321,7 +3321,7 @@ bool mysql_create_table_no_lock(THD *thd, if (key->type == Key::FOREIGN_KEY && !part_info->is_auto_partitioned) { - my_error(ER_CANNOT_ADD_FOREIGN, MYF(0)); + my_error(ER_FOREIGN_KEY_ON_PARTITIONED, MYF(0)); goto err; } } -- cgit v1.2.1 From 97b68934bca29ab88f63d3887071248c0c602a82 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Fri, 27 Feb 2009 16:11:15 +0200 Subject: Recommit for merging and pushing --- sql/sql_table.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index eefe2a5596e..ff7f874ffcb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2314,7 +2314,12 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, view_checksum(thd, table) == HA_ADMIN_WRONG_CHECKSUM) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM)); - result_code= HA_ADMIN_CORRUPT; + if (thd->net.last_errno == ER_NO_SUCH_TABLE) + /* A missing table is just issued as a failed command */ + result_code= HA_ADMIN_FAILED; + else + /* Default failure code is corrupt table */ + result_code= HA_ADMIN_CORRUPT; goto send_result; } -- cgit v1.2.1 From f08d47b4f3e5780cc56c6ab76599c5a4b6a1e3e6 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Thu, 5 Mar 2009 09:41:00 +0100 Subject: Addendum to previous patch for Bug#29458. A number of system errnos when opening a table are masked as ER_FILE_NOT_FOUND. This patch handles this as "Operation failed" as well. --- sql/sql_table.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index e06f951d525..60714348d03 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4298,7 +4298,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM)); if (thd->main_da.is_error() && - thd->main_da.sql_errno() == ER_NO_SUCH_TABLE) + (thd->main_da.sql_errno() == ER_NO_SUCH_TABLE || + thd->main_da.sql_errno() == ER_FILE_NOT_FOUND)) /* A missing table is just issued as a failed command */ result_code= HA_ADMIN_FAILED; else -- cgit v1.2.1