From 44dd303c476a881235acc7e5e76c601ef46d96bb Mon Sep 17 00:00:00 2001 From: "igor@rurik.mysql.com" <> Date: Wed, 2 Nov 2005 22:13:10 -0800 Subject: [PATCH] Post review fixes. --- mysql-test/r/view.result | 2 +- mysql-test/t/view.test | 2 +- sql/share/errmsg.txt | 2 +- sql/sql_table.cc | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index cd35cf4382f..07627c9078b 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2323,7 +2323,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where DROP VIEW v1,v2; DROP TABLE t1,t2,t3; -CREATE TABLE t1(id INT) ENGINE=MyISAM; +CREATE TABLE t1(id INT); CREATE VIEW v1 AS SELECT id FROM t1; OPTIMIZE TABLE v1; Table Op Msg_type Msg_text diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 2a941027d63..db77982e3eb 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -2193,7 +2193,7 @@ DROP TABLE t1,t2,t3; # Bug #14540: OPTIMIZE, ANALYZE, REPAIR applied to not a view # -CREATE TABLE t1(id INT) ENGINE=MyISAM; +CREATE TABLE t1(id INT); CREATE VIEW v1 AS SELECT id FROM t1; OPTIMIZE TABLE v1; diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 0174a1ef98e..24e1d4b6b81 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5421,5 +5421,5 @@ ER_NO_REFERENCED_ROW_2 23000 eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)" ER_SP_BAD_VAR_SHADOW 42000 eng "Variable '%-.64s' must be quoted with `...`, or renamed" -ER_CHECK_NOT_BASE_TABLE 4200 +ER_CHECK_NOT_BASE_TABLE 42000 eng "You cannot apply %s to a view" diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 80b337e61d5..bc604537139 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2326,11 +2326,11 @@ send_result_message: case HA_ADMIN_NOT_BASE_TABLE: { - char buf[ERRMSGSIZE+20]; - uint length=my_snprintf(buf, ERRMSGSIZE, - ER(ER_CHECK_NOT_BASE_TABLE), operator_name); - protocol->store("note", 4, system_charset_info); - protocol->store(buf, length, system_charset_info); + char buf[ERRMSGSIZE+20]; + uint length= my_snprintf(buf, ERRMSGSIZE, + ER(ER_CHECK_NOT_BASE_TABLE), operator_name); + protocol->store("note", 4, system_charset_info); + protocol->store(buf, length, system_charset_info); } break; @@ -2442,7 +2442,7 @@ send_result_message: { pthread_mutex_lock(&LOCK_open); remove_table_from_cache(thd, table->table->s->db, - table->table->s->table_name, RTFC_NO_FLAG); + table->table->s->table_name, RTFC_NO_FLAG); pthread_mutex_unlock(&LOCK_open); /* Something may be modified, that's why we have to invalidate cache */ query_cache_invalidate3(thd, table->table, 0);