====================================== BEGIN PREPARE ======================================(gdb) echo
|
(gdb) c
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d79dd0, thd=0x3557470, reference=0x3d7c8e0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d79ef0 "val2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb) c
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d78240, thd=0x3557470, reference=0x3d78400) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d78238 "val2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d77ca8 "v2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7a550, thd=0x3557470, reference=0x3d7a810) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d7a548 "id2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7c5d0, thd=0x3557470, reference=0x3d7c8b0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d7c6f0 "id1v1"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d7c870 "t1"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7a668, thd=0x3557470, reference=0x3d7a818) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d7a660 "id1v1"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d7a4f0 "v1"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d79c90, thd=0x3557470, reference=0x3d7c8d0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d79db0 "id2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d784c8, thd=0x3557470, reference=0x3d78678) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d784c0 "id2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d77ca8 "v2"
|
(gdb)
|
Continuing.
|
C-c C-c
|
Program received signal SIGINT, Interrupt.
|
0x00007f2060f93f7d in poll () from /lib/x86_64-linux-gnu/libc.so.6
|
|
|
====================================== BEGIN EXEC ======================================(gdb) echo
|
(gdb) c
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d79dd0, thd=0x3557470, reference=0x3d7c8e0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d79ef0 "val2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb) c
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d78240, thd=0x3557470, reference=0x3d78400) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d78238 "val2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d77ca8 "v2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d79c90, thd=0x3557470, reference=0x3d7c8d0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d79db0 "id2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d784c8, thd=0x3557470, reference=0x3d78678) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d784c0 "id2v2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d77ca8 "v2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7a550, thd=0x3557470, reference=0x3d7a810) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d7a548 "id2"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d79f30 "t2"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7c5d0, thd=0x3557470, reference=0x3d7c8b0) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = false
|
3: item_name->m_str = 0x3d7c6f0 "id1v1"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d7c870 "t1"
|
(gdb)
|
Continuing.
|
|
Breakpoint 1, Item_field::fix_fields (this=0x3d7a668, thd=0x3557470, reference=0x3d7a818) at /home/tsk/mprog/src/mysql-server/sql/item.cc:5441
|
8: context->select_lex->master->master = (SELECT_LEX *) 0x0
|
7: cached_table->select_lex->master->master = (SELECT_LEX *) 0x0
|
5: cached_table->select_lex = (st_select_lex *) 0x3d77378
|
4: (from_field == view_ref_found) = true
|
3: item_name->m_str = 0x3d7a660 "id1v1"
|
2: (cached_table->select_lex == context->select_lex) = true
|
1: cached_table->alias = 0x3d7a4f0 "v1"
|
(gdb)
|
Continuing.
|
#Test case that fails with --ps-protocol
drop database if exists test;
create database test;
use test;
create table t1 (id1 int primary key, val1 varchar(20));
insert into t1 values (1, 'test1');
create table t2 (id2 int primary key, val2 varchar(20));
insert into t2 values (1, 'test2');
create algorithm=merge view v1 as select id1 as id1v1, val1 as val1v1 from t1;
create algorithm=merge view v2 as
select t2.id2 as id2v2, t2.val2 as val2v2
from t2, v1
where t2.id2 = v1.id1v1;
– The crash query
prepare stmt1 from "update v2 set val2v2 = 'test19' where 1 = id2v2";
execute stmt1;
– A similar select that works
prepare stmt2 from "select val2v2 from v2 where val2v2 = 'test19' and 1 = id2v2";
execute stmt2;