List:Commits« Previous MessageNext Message »
From:igor Date:May 28 2006 6:57am
Subject:bk commit into 4.1 tree (igor:1.2488) BUG#17873
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of igor. When igor does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2488 06/05/27 23:57:33 igor@stripped +33 -0
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/sql_base.cc
    1.270 06/05/27 23:57:28 igor@stripped +1 -1
    Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
    refers to a column name.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/ukrainian/errmsg.txt
    1.96 06/05/27 23:57:28 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/swedish/errmsg.txt
    1.136 06/05/27 23:57:28 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/spanish/errmsg.txt
    1.136 06/05/27 23:57:28 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/slovak/errmsg.txt
    1.135 06/05/27 23:57:28 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/serbian/errmsg.txt
    1.82 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/russian/errmsg.txt
    1.130 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/romanian/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/portuguese/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/polish/errmsg.txt
    1.134 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/norwegian/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/norwegian-ny/errmsg.txt
    1.134 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/korean/errmsg.txt
    1.134 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/japanese/errmsg.txt
    1.132 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/japanese-sjis/errmsg.txt
    1.4 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/italian/errmsg.txt
    1.140 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/hungarian/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/greek/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/german/errmsg.txt
    1.130 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/french/errmsg.txt
    1.135 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/estonian/errmsg.txt
    1.134 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/english/errmsg.txt
    1.150 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/dutch/errmsg.txt
    1.136 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/danish/errmsg.txt
    1.132 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  sql/share/czech/errmsg.txt
    1.136 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  mysql-test/t/select.test
    1.55 06/05/27 23:57:27 igor@stripped +17 -2
    Added a test case for bug #17873.

  mysql-test/t/explain.test
    1.9 06/05/27 23:57:27 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  mysql-test/r/select.result
    1.72 06/05/27 23:57:27 igor@stripped +12 -2
    Added a test case for bug #17873.

  mysql-test/r/preload.result
    1.8 06/05/27 23:57:26 igor@stripped +1 -1
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  mysql-test/r/key_cache.result
    1.16 06/05/27 23:57:26 igor@stripped +1 -1
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  mysql-test/r/explain.result
    1.16 06/05/27 23:57:26 igor@stripped +2 -2
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  include/sql_state.h
    1.13 06/05/27 23:57:26 igor@stripped +1 -0
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

  include/mysqld_error.h
    1.108 06/05/27 23:57:26 igor@stripped +1 -0
    Fixed bug #17873.
    Added a new error message ER_INDEX_DOES_NOT_EXIST.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	igor
# Host:	rurik.mysql.com
# Root:	/home/igor/dev/mysql-4.1-0

--- 1.107/include/mysqld_error.h	2004-11-10 14:59:53 -08:00
+++ 1.108/include/mysqld_error.h	2006-05-27 23:57:26 -07:00
@@ -319,4 +319,5 @@
 #define ER_INVALID_CHARACTER_STRING 1300
 #define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301
 #define ER_CONFLICTING_DECLARATIONS 1302
+#define ER_INDEX_DOES_NOT_EXIST 1303
 #define ER_ERROR_MESSAGES 303

--- 1.135/sql/share/czech/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.136/sql/share/czech/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -330,5 +330,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.131/sql/share/danish/errmsg.txt	2005-05-14 06:28:51 -07:00
+++ 1.132/sql/share/danish/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -321,5 +321,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.135/sql/share/dutch/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.136/sql/share/dutch/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -330,5 +330,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.149/sql/share/english/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.150/sql/share/english/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.133/sql/share/estonian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.134/sql/share/estonian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -323,5 +323,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/french/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/french/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.129/sql/share/german/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.130/sql/share/german/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -331,5 +331,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/greek/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/greek/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/hungarian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/hungarian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -323,5 +323,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.139/sql/share/italian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.140/sql/share/italian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.131/sql/share/japanese/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.132/sql/share/japanese/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -322,5 +322,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.133/sql/share/korean/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.134/sql/share/korean/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.133/sql/share/norwegian-ny/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.134/sql/share/norwegian-ny/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -320,5 +320,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/norwegian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/norwegian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -320,5 +320,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.133/sql/share/polish/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.134/sql/share/polish/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -323,5 +323,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/portuguese/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/portuguese/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -320,5 +320,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/romanian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/romanian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -323,5 +323,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.129/sql/share/russian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.130/sql/share/russian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -323,5 +323,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.134/sql/share/slovak/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.135/sql/share/slovak/errmsg.txt	2006-05-27 23:57:28 -07:00
@@ -326,5 +326,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.135/sql/share/spanish/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.136/sql/share/spanish/errmsg.txt	2006-05-27 23:57:28 -07:00
@@ -322,5 +322,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.135/sql/share/swedish/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.136/sql/share/swedish/errmsg.txt	2006-05-27 23:57:28 -07:00
@@ -318,5 +318,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.269/sql/sql_base.cc	2006-05-12 11:34:27 -07:00
+++ 1.270/sql/sql_base.cc	2006-05-27 23:57:28 -07:00
@@ -2633,7 +2633,7 @@
     if ((pos= find_type(&table->keynames, name->ptr(), name->length(), 1)) <=
 	0)
     {
-      my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
+      my_error(ER_INDEX_DOES_NOT_EXIST, MYF(0), name->c_ptr(),
 	       table->real_name);
       map->set_all();
       return 1;

--- 1.81/sql/share/serbian/errmsg.txt	2005-05-13 15:28:05 -07:00
+++ 1.82/sql/share/serbian/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -311,5 +311,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.3/sql/share/japanese-sjis/errmsg.txt	2005-05-08 10:12:27 -07:00
+++ 1.4/sql/share/japanese-sjis/errmsg.txt	2006-05-27 23:57:27 -07:00
@@ -322,5 +322,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.7/mysql-test/r/preload.result	2005-02-11 15:05:05 -08:00
+++ 1.8/mysql-test/r/preload.result	2006-05-27 23:57:26 -07:00
@@ -158,7 +158,7 @@
 load index into cache t3 key (b), t2 key (c) ;
 Table	Op	Msg_type	Msg_text
 test.t3	preload_keys	error	Table 'test.t3' doesn't exist
-test.t2	preload_keys	error	Key column 'c' doesn't exist in table
+test.t2	preload_keys	error	Index 'c' is not defined for table 't2'
 test.t2	preload_keys	status	Operation failed
 show status like "key_read%";
 Variable_name	Value

--- 1.15/mysql-test/r/explain.result	2004-05-14 01:08:18 -07:00
+++ 1.16/mysql-test/r/explain.result	2006-05-27 23:57:26 -07:00
@@ -24,9 +24,9 @@
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	const	str	str	11	const	1	
 explain select * from t1 use key (str,str,foo) where str="foo";
-ERROR 42000: Key column 'foo' doesn't exist in table
+ERROR 42000: Index 'foo' is not defined for table 't1'
 explain select * from t1 ignore key (str,str,foo) where str="foo";
-ERROR 42000: Key column 'foo' doesn't exist in table
+ERROR 42000: Index 'foo' is not defined for table 't1'
 drop table t1;
 explain select 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra

--- 1.71/mysql-test/r/select.result	2005-11-24 08:15:05 -08:00
+++ 1.72/mysql-test/r/select.result	2006-05-27 23:57:27 -07:00
@@ -143,9 +143,9 @@
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	ref	fld3	fld3	30	const	1	Using where; Using index
 explain select fld3 from t2 ignore index (fld3,not_used);
-ERROR 42000: Key column 'not_used' doesn't exist in table
+ERROR 42000: Index 'not_used' is not defined for table 't2'
 explain select fld3 from t2 use index (not_used);
-ERROR 42000: Key column 'not_used' doesn't exist in table
+ERROR 42000: Index 'not_used' is not defined for table 't2'
 select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
 fld3
 honeysuckle
@@ -2714,3 +2714,13 @@
 f1	f2
 1	1
 drop table t1,t2;
+CREATE TABLE t1 (a int, INDEX idx(a));
+INSERT INTO t1 VALUES (2), (3), (1);
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (idx);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (a);
+ERROR 42000: Index 'a' is not defined for table 't1'
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+ERROR 42000: Index 'a' is not defined for table 't1'
+DROP TABLE t1;

--- 1.8/mysql-test/t/explain.test	2005-07-27 17:21:41 -07:00
+++ 1.9/mysql-test/t/explain.test	2006-05-27 23:57:27 -07:00
@@ -15,9 +15,9 @@
 explain select * from t1 use key (str,str) where str="foo";
 
 #The following should give errors
---error 1072
+--error 1303
 explain select * from t1 use key (str,str,foo) where str="foo";
---error 1072
+--error 1303
 explain select * from t1 ignore key (str,str,foo) where str="foo";
 drop table t1;
 

--- 1.54/mysql-test/t/select.test	2005-11-24 08:14:52 -08:00
+++ 1.55/mysql-test/t/select.test	2006-05-27 23:57:27 -07:00
@@ -1295,9 +1295,9 @@
 # The next should give an error
 #
 
--- error 1072
+-- error 1303
 explain select fld3 from t2 ignore index (fld3,not_used);
--- error 1072
+-- error 1303
 explain select fld3 from t2 use index (not_used);
 
 #
@@ -2247,5 +2247,20 @@
 insert into t2 values(1,1);
 select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2)); 
 drop table t1,t2;
+
+#
+# Bug #17873: confusing error message when IGNORE INDEX refers a column name
+#
+
+CREATE TABLE t1 (a int, INDEX idx(a));
+INSERT INTO t1 VALUES (2), (3), (1);
+
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (idx);
+--error 1303
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (a);
+--error 1303
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+
+DROP TABLE t1;
 
 # End of 4.1 tests

--- 1.95/sql/share/ukrainian/errmsg.txt	2005-05-13 14:01:36 -07:00
+++ 1.96/sql/share/ukrainian/errmsg.txt	2006-05-27 23:57:28 -07:00
@@ -324,5 +324,5 @@
 "Invalid TIMESTAMP value in column '%s' at row %ld",
 "Invalid %s character string: '%.64s'",
 "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
-"Conflicting declarations: '%s%s' and '%s%s'"
-
+"Conflicting declarations: '%s%s' and '%s%s'",
+"Index '%-.100s' is not defined for table '%-.100s'",

--- 1.15/mysql-test/r/key_cache.result	2006-04-18 20:57:27 -07:00
+++ 1.16/mysql-test/r/key_cache.result	2006-05-27 23:57:26 -07:00
@@ -191,7 +191,7 @@
 ERROR HY000: Unknown key cache 'unknown_key_cache'
 cache index t1 key (unknown_key) in keycache1;
 Table	Op	Msg_type	Msg_text
-test.t1	assign_to_keycache	error	Key column 'unknown_key' doesn't exist in table
+test.t1	assign_to_keycache	error	Index 'unknown_key' is not defined for table 't1'
 test.t1	assign_to_keycache	status	Operation failed
 select @@keycache2.key_buffer_size;
 @@keycache2.key_buffer_size

--- 1.12/include/sql_state.h	2004-06-12 12:36:52 -07:00
+++ 1.13/include/sql_state.h	2006-05-27 23:57:26 -07:00
@@ -162,3 +162,4 @@
 ER_WRONG_NAME_FOR_INDEX,        "42000", "",
 ER_WRONG_NAME_FOR_CATALOG,      "42000", "",
 ER_UNKNOWN_STORAGE_ENGINE,      "42000", "",
+ER_INDEX_DOES_NOT_EXIST,        "42000", "",
Thread
bk commit into 4.1 tree (igor:1.2488) BUG#17873igor28 May