mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 03:05:33 +02:00
Fixed bug with INSERT .. SET db_name.tbl_name.col_name=''
This commit is contained in:
parent
b42ca98d34
commit
32aac8dcee
3 changed files with 17 additions and 1 deletions
6
mysql-test/r/insert_set.result
Normal file
6
mysql-test/r/insert_set.result
Normal file
|
|
@ -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;
|
||||||
10
mysql-test/t/insert_set.test
Normal file
10
mysql-test/t/insert_set.test
Normal file
|
|
@ -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;
|
||||||
|
|
@ -1608,7 +1608,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
|
||||||
for (; tables ; tables=tables->next)
|
for (; tables ; tables=tables->next)
|
||||||
{
|
{
|
||||||
if (!strcmp(tables->name,table_name) &&
|
if (!strcmp(tables->name,table_name) &&
|
||||||
(!db || !strcmp(db,tables->db)))
|
(!db || !tables->db || !strcmp(db,tables->db)))
|
||||||
{
|
{
|
||||||
found_table=1;
|
found_table=1;
|
||||||
Field *find=find_field_in_table(thd,tables->table,name,length,
|
Field *find=find_field_in_table(thd,tables->table,name,length,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue