From 02aaf29d2f36ebfe3fb32ccda7b84b96971151b0 Mon Sep 17 00:00:00 2001 From: "salle@geopard.online.bg" <> Date: Tue, 23 Jul 2002 20:42:08 +0300 Subject: [PATCH 1/2] Fixed bug with INSERT .. SET db_name.tbl_name.col_name='' --- mysql-test/r/insert_set.result | 6 ++++++ mysql-test/t/insert_set.test | 10 ++++++++++ sql/sql_base.cc | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/insert_set.result create mode 100644 mysql-test/t/insert_set.test diff --git a/mysql-test/r/insert_set.result b/mysql-test/r/insert_set.result new file mode 100644 index 00000000000..438c2c95147 --- /dev/null +++ b/mysql-test/r/insert_set.result @@ -0,0 +1,6 @@ +drop database if exists a; +create database a; +use a; +create table b (c int); +insert into a.b set a.b.c = '1'; +drop database a; diff --git a/mysql-test/t/insert_set.test b/mysql-test/t/insert_set.test new file mode 100644 index 00000000000..41d20eaefdb --- /dev/null +++ b/mysql-test/t/insert_set.test @@ -0,0 +1,10 @@ +# +# Test of mysqld crash with fully qualified column names +# + +drop database if exists a; +create database a; +use a; +create table b (c int); +insert into a.b set a.b.c = '1'; +drop database a; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 40f6b40f9b5..d9b577a9563 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1608,7 +1608,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables) for (; tables ; tables=tables->next) { if (!strcmp(tables->name,table_name) && - (!db || !strcmp(db,tables->db))) + (!db || !tables->db || !strcmp(db,tables->db))) { found_table=1; Field *find=find_field_in_table(thd,tables->table,name,length, From 2bfd7c7357b0710abe1ce72e8aa15a4f4dcd2966 Mon Sep 17 00:00:00 2001 From: "paul@teton.kitebird.com" <> Date: Tue, 23 Jul 2002 13:31:38 -0500 Subject: [PATCH 2/2] manual.texi change note mods, 4.0.x. --- Docs/manual.texi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 61c1961ef53..45d08f36c48 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -49838,7 +49838,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item -Fixed a bug that made the pager option in the mysql client non-functional. +Fixed a bug that made the pager option in the @code{mysql} client +non-functional. @item Added full @code{AUTO_INCREMENT} support to @code{MERGE} tables. @item @@ -49862,7 +49863,7 @@ as a synonym for bitwise @code{XOR}. Added function @code{IS_FREE_LOCK("lock_name")}. Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. @item -Removed @code{mysql_ssl_clear()}, as it was not needed. +Removed @code{mysql_ssl_clear()} from C API, as it was not needed. @item @code{DECIMAL} and @code{NUMERIC} types can now read exponential numbers. @item @@ -49881,7 +49882,7 @@ consistent dump of @code{InnoDB} tables. @item Fixed bug in @code{innodb_log_group_home_dir} in @code{SHOW VARIABLES}. @item -Fixed a bug in optimiser with merge tables when non-uniques values are +Fixed a bug in optimiser with merge tables when non-unique values are used in summing up (causing crashes). @item Fixed a bug in optimiser when a range specified makes index grouping @@ -49916,7 +49917,7 @@ Fixed bug in @code{DROP DATABASE} with symlink. @item Fixed crash in @code{REPAIR ... USE_FRM}. @item -Fixed bug in @code{EXPLAIN} with @code{LIMIT offset != 0} +Fixed bug in @code{EXPLAIN} with @code{LIMIT offset != 0}. @item Fixed bug in phrase operator @code{"..."} in boolean full-text search. @item