summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_user_variables.result
diff options
context:
space:
mode:
authorguilhem@gbichot2 <>2003-10-02 10:31:37 +0200
committerguilhem@gbichot2 <>2003-10-02 10:31:37 +0200
commit2f11e5d1d310f333e4b0e870015afd588981b8ba (patch)
tree81ba46a9411ef17d25f44f30495eb85c66acf75f /mysql-test/r/rpl_user_variables.result
parente274bfb148d776b7d841c6250cc72ad73ca15c51 (diff)
downloadmariadb-git-2f11e5d1d310f333e4b0e870015afd588981b8ba.tar.gz
fix for BUG#1331: "Unexistent user variable is not replicated".
When an update query is to be written to the binlog, and it reads unset user variables (example: INSERT INTO t VALUEs(@a) where @a does not exist), we create the variable like if it had been set with SET before, and we loop (i.e. we redo the steps of logging, now that the variable exists).
Diffstat (limited to 'mysql-test/r/rpl_user_variables.result')
-rw-r--r--mysql-test/r/rpl_user_variables.result50
1 files changed, 42 insertions, 8 deletions
diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result
index b715b750b68..71147772ac4 100644
--- a/mysql-test/r/rpl_user_variables.result
+++ b/mysql-test/r/rpl_user_variables.result
@@ -21,6 +21,7 @@ set @q:='abc';
insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'));
set @a:=5;
insert into t1 values (@a),(@a);
+insert into t1 values (@a),(@a),(@a*5);
select * from t1;
n
12345678901234
@@ -45,6 +46,36 @@ abcn1
abcn1n2
5
5
+NULL
+NULL
+NULL
+select * from t1;
+n
+12345678901234
+-12345678901234
+0
+-1
+12.5
+-12.5
+This is a test
+
+abc'def
+abc\def
+abc'def
+NULL
+NULL
+0
+1
+2
+5
+abc
+abcn1
+abcn1n2
+5
+5
+NULL
+NULL
+NULL
show binlog events from 141;
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.000001 141 User var 2 141 @i1=12345678901234
@@ -63,13 +94,16 @@ slave-bin.000001 719 User var 2 719 @s5='abc'def'
slave-bin.000001 761 Query 1 761 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
slave-bin.000001 851 User var 2 851 @n1=NULL
slave-bin.000001 877 Query 1 877 use `test`; insert into t1 values (@n1)
-slave-bin.000001 939 Query 1 939 use `test`; insert into t1 values (@n2)
-slave-bin.000001 1001 Query 1 1001 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
-slave-bin.000001 1089 User var 2 1089 @a=2
-slave-bin.000001 1131 Query 1 1131 use `test`; insert into t1 values (@a+(@b:=@a+1))
-slave-bin.000001 1203 User var 2 1203 @q='abc'
-slave-bin.000001 1240 Query 1 1240 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
-slave-bin.000001 1344 User var 2 1344 @a=5
-slave-bin.000001 1386 Query 1 1386 use `test`; insert into t1 values (@a),(@a)
+slave-bin.000001 939 User var 2 939 @n2=NULL
+slave-bin.000001 965 Query 1 965 use `test`; insert into t1 values (@n2)
+slave-bin.000001 1027 Query 1 1027 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
+slave-bin.000001 1115 User var 2 1115 @a=2
+slave-bin.000001 1157 Query 1 1157 use `test`; insert into t1 values (@a+(@b:=@a+1))
+slave-bin.000001 1229 User var 2 1229 @q='abc'
+slave-bin.000001 1266 Query 1 1266 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
+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)
drop table t1;
stop slave;