1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00

Bug#19136: Crashing log-bin and uninitialized user variables in a derived table

The reason of the bug is in that `get_var_with_binlog' performs missed
assingment of
the variables as side-effect. Doing that it eventually calls
`free_underlaid_joins' to pass as an argument `thd->lex->select_lex' of the lex
which belongs to the user query, not 
to one which is emulated i.e SET @var1:=NULL.


`get_var_with_binlog' is refined to supply a temporary lex to sql_set_variables's stack.
This commit is contained in:
aelkin@mysql.com
2006-05-05 11:21:21 +03:00
parent 57ff78b5fe
commit 8c57924a6a
3 changed files with 17 additions and 0 deletions

View File

@@ -105,5 +105,6 @@ slave-bin.000001 1370 User var 2 1370 @`a`=5
slave-bin.000001 1412 Query 1 1412 use `test`; insert into t1 values (@a),(@a)
slave-bin.000001 1478 User var 2 1478 @`a`=NULL
slave-bin.000001 1503 Query 1 1503 use `test`; insert into t1 values (@a),(@a),(@a*5)
insert into t1 select * FROM (select @var1 union select @var2) AS t2;
drop table t1;
stop slave;