summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-05-27 23:57:33 -0700
committerunknown <igor@rurik.mysql.com>2006-05-27 23:57:33 -0700
commit42104b2efd34b8cb74f3308660652edcf653c1f4 (patch)
treeb79720aa64490cd88ed6b40aa30a5fd6ca4d822f /mysql-test/t/select.test
parentc12d80151a6010e8dbb7138af09675749516dc15 (diff)
downloadmariadb-git-42104b2efd34b8cb74f3308660652edcf653c1f4.tar.gz
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. include/mysqld_error.h: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. include/sql_state.h: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. mysql-test/r/explain.result: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. mysql-test/r/key_cache.result: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. mysql-test/r/preload.result: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. mysql-test/r/select.result: Added a test case for bug #17873. mysql-test/t/explain.test: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. mysql-test/t/select.test: Added a test case for bug #17873. sql/share/czech/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/danish/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/dutch/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/english/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/estonian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/french/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/german/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/greek/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/hungarian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/italian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/japanese-sjis/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/japanese/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/korean/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/norwegian-ny/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/norwegian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/polish/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/portuguese/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/romanian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/russian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/serbian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/slovak/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/spanish/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/swedish/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST. sql/share/ukrainian/errmsg.txt: Fixed bug #17873. Added a new error message ER_INDEX_DOES_NOT_EXIST.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test19
1 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 996d5854854..90d54e59b61 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1295,9 +1295,9 @@ explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
# 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);
#
@@ -2248,4 +2248,19 @@ 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