summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/Makefile.am14
-rwxr-xr-x[-rw-r--r--]extra/yassl/include/openssl/generate_prefix_files.pl0
-rw-r--r--mysql-test/r/compress.result4
-rw-r--r--mysql-test/r/explain.result4
-rw-r--r--mysql-test/r/select.result14
-rw-r--r--mysql-test/r/view.result2
-rw-r--r--mysql-test/t/select.test19
-rw-r--r--mysql-test/t/view.test2
-rw-r--r--scripts/make_sharedlib_distribution.sh6
-rw-r--r--scripts/make_win_src_distribution.sh1
-rw-r--r--sql/sql_base.cc3
-rw-r--r--sql/sql_parse.cc2
12 files changed, 50 insertions, 21 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index 4d8d95d19ed..ff97243815a 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -83,13 +83,13 @@ link_sources:
for f in $(sql_src) ; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
- done;
- for f in $(strings_src) ; do \
- rm -f $(srcdir)/$$f; \
- @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
- done;
- -rm -f $(srcdir)/my_user.c;
- @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c
+ done; \
+ for f in $(strings_src) ; do \
+ rm -f $(srcdir)/$$f; \
+ @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
+ done; \
+ rm -f $(srcdir)/my_user.c; \
+ @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
# Don't update the files from bitkeeper
diff --git a/extra/yassl/include/openssl/generate_prefix_files.pl b/extra/yassl/include/openssl/generate_prefix_files.pl
index b921ee11e9a..b921ee11e9a 100644..100755
--- a/extra/yassl/include/openssl/generate_prefix_files.pl
+++ b/extra/yassl/include/openssl/generate_prefix_files.pl
diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result
index 691bd56474b..cce66fd84ef 100644
--- a/mysql-test/r/compress.result
+++ b/mysql-test/r/compress.result
@@ -145,9 +145,9 @@ explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
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 'not_used' doesn't exist in table 't2'
+ERROR HY000: Key 'not_used' doesn't exist in table 't2'
explain select fld3 from t2 use index (not_used);
-ERROR 42000: Key 'not_used' doesn't exist in table 't2'
+ERROR HY000: Key 'not_used' doesn't exist in table 't2'
select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
fld3
honeysuckle
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result
index e0d9f5131b4..3bd7b2ccc15 100644
--- a/mysql-test/r/explain.result
+++ b/mysql-test/r/explain.result
@@ -24,9 +24,9 @@ explain select * from t1 use key (str,str) where str="foo";
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 'foo' doesn't exist in table 't1'
+ERROR HY000: Key 'foo' doesn't exist in table 't1'
explain select * from t1 ignore key (str,str,foo) where str="foo";
-ERROR 42000: Key 'foo' doesn't exist in table 't1'
+ERROR HY000: Key 'foo' doesn't exist in table 't1'
drop table t1;
explain select 1;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 63693db56aa..8b187efff6f 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -144,9 +144,9 @@ explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
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 'not_used' doesn't exist in table 't2'
+ERROR HY000: Key 'not_used' doesn't exist in table 't2'
explain select fld3 from t2 use index (not_used);
-ERROR 42000: Key 'not_used' doesn't exist in table 't2'
+ERROR HY000: Key 'not_used' doesn't exist in table 't2'
select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
fld3
honeysuckle
@@ -2716,6 +2716,16 @@ select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 fro
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 HY000: Key 'a' doesn't exist in table 't1'
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+ERROR HY000: Key 'a' doesn't exist in table 't1'
+DROP TABLE t1;
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 9fabb0ad2d8..ece597b93b7 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -614,7 +614,7 @@ drop table t1;
create table t1 (a int, b int);
create view v1 as select a, sum(b) from t1 group by a;
select b from v1 use index (some_index) where b=1;
-ERROR 42000: Key 'some_index' doesn't exist in table 'v1'
+ERROR HY000: Key 'some_index' doesn't exist in table 'v1'
drop view v1;
drop table t1;
create table t1 (col1 char(5),col2 char(5));
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 69b80bf0243..8cd15463c62 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1296,9 +1296,9 @@ explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
# The next should give an error
#
---error 1176
+-- error 1176
explain select fld3 from t2 ignore index (fld3,not_used);
---error 1176
+-- error 1176
explain select fld3 from t2 use index (not_used);
#
@@ -2264,6 +2264,21 @@ 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 1176
+EXPLAIN SELECT * FROM t1 IGNORE INDEX (a);
+--error 1176
+EXPLAIN SELECT * FROM t1 FORCE INDEX (a);
+
+DROP TABLE t1;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index e1b4e6067db..0db97f6d4af 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -516,7 +516,7 @@ drop table t1;
#
create table t1 (a int, b int);
create view v1 as select a, sum(b) from t1 group by a;
---error 1176
+-- error 1176
select b from v1 use index (some_index) where b=1;
drop view v1;
drop table t1;
diff --git a/scripts/make_sharedlib_distribution.sh b/scripts/make_sharedlib_distribution.sh
index fbc945e445a..c475d0e14a4 100644
--- a/scripts/make_sharedlib_distribution.sh
+++ b/scripts/make_sharedlib_distribution.sh
@@ -45,9 +45,11 @@ fi
mkdir -p $BASE/lib
for i in \
- libmysql/.libs/libmysqlclient.s{l,o}* \
+ libmysql/.libs/libmysqlclient.so* \
+ libmysql/.libs/libmysqlclient.sl* \
libmysql/.libs/libmysqlclient*.dylib \
- libmysql_r/.libs/libmysqlclient_r.s{l,o}* \
+ libmysql_r/.libs/libmysqlclient_r.so* \
+ libmysql_r/.libs/libmysqlclient_r.sl* \
libmysql_r/.libs/libmysqlclient_r*.dylib
do
if [ -f $i ]
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index b070e30c5c7..6883719cbe4 100644
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -343,6 +343,7 @@ mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
find $BASE \( -name "*.cnf" -o -name "*.ini" \
-o -name COPYING -o -name ChangeLog -o -name EXCEPTIONS-CLIENT \
-o -name "INSTALL*" -o -name LICENSE -o -name "README*" \
+ -o -name "*.dsp" -o -name "*.dsw" \
-o -name "*.vcproj" -o -name "*.sln" \) -type f -print \
| while read v
do
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 47c55228adc..2298de7eeb5 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5343,6 +5343,7 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
table_list= table_list->next_leaf, tablenr++)
{
TABLE *table= table_list->table;
+ table->pos_in_table_list= table_list;
if (first_select_table &&
table_list->top_table() == first_select_table)
{
@@ -5488,7 +5489,7 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table,
0)
{
my_error(ER_KEY_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
- table->alias);
+ table->pos_in_table_list->alias);
map->set_all();
return 1;
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a055a8df82d..7419c419b56 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2020,7 +2020,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
uptime,
(int) thread_count, (ulong) thd->query_id,
current_global_status_var.long_query_count,
- current_global_status_var.opened_tables, refresh_version, cached_open_tables(),
+ current_global_status_var.opened_tables, refresh_version, cached_tables(),
(uptime ? (ulonglong2double(thd->query_id) / (double) uptime) :
(double) 0));
#ifdef SAFEMALLOC