summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/manual.texi9
-rw-r--r--mysql-test/r/insert_set.result6
-rw-r--r--mysql-test/t/insert_set.test10
-rw-r--r--sql/sql_base.cc2
4 files changed, 22 insertions, 5 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 7c8dbf139c8..6c2e1bb051d 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -50157,7 +50157,8 @@ Renamed some sql variables, but old names will still work until 5.0.
@item
Removed not used variable @code{query_buffer_size}.
@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
@@ -50181,7 +50182,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
@@ -50200,7 +50201,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
@@ -50235,7 +50236,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
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 29cc925218f..f4538fefbea 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,