Loading BitKeeper/triggers/post-commit +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ then CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'` WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'` if [ "$BUG" = "" ] then Loading @@ -37,7 +38,7 @@ fi List-ID: <bk.mysql-$VERSION> From: $FROM To: $TO Subject: bk commit - $VERSION tree ($CHANGESET)$BUG Subject: bk commit - $VERSION tree ($CHANGESET)${BUG}${WL} EOF bk changes -v -r+ Loading mysql-test/include/have_ndb.inc +3 −3 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ disable_query_log; show variables like "have_ndbcluster"; enable_query_log; connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1); connection server1; #connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); #connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1); #connection server1; mysql-test/r/ndb_lock.result +35 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,38 @@ x y 2 two 3 three commit; drop table t1; create table t1 (pk integer not null primary key, u int not null, o int not null, unique(u), key(o)) engine = ndb; insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); lock tables t1 write; delete from t1 where pk = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); lock tables t1 write; delete from t1 where u = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); lock tables t1 write; delete from t1 where o = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); drop table t1; mysql-test/r/ps.result +18 −0 Original line number Diff line number Diff line Loading @@ -318,3 +318,21 @@ execute stmt; a drop table t1; deallocate prepare stmt; create table t1 (a int, b int); insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2); prepare stmt from "explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?"; set @v=5; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - NULL Impossible WHERE set @v=0; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - 4 Using where set @v=5; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - NULL Impossible WHERE drop table t1; deallocate prepare stmt; mysql-test/r/ps_10nestset.result 0 → 100644 +68 −0 Original line number Diff line number Diff line use test; drop table if exists personnel; Warnings: Note 1051 Unknown table 'personnel' create table personnel ( id INTEGER AUTO_INCREMENT PRIMARY KEY, emp CHAR(10) NOT NULL, salary DECIMAL(6,2) NOT NULL, l INTEGER NOT NULL, r INTEGER NOT NULL); prepare st_ins from 'insert into personnel set emp = ?, salary = ?, l = ?, r = ?'; set @arg_nam= 'Jerry'; set @arg_sal= 1000; set @arg_l= 1; set @arg_r= 12; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Bert'; set @arg_sal= 900; set @arg_l= 2; set @arg_r= 3; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Chuck'; set @arg_sal= 900; set @arg_l= 4; set @arg_r= 11; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Donna'; set @arg_sal= 800; set @arg_l= 5; set @arg_r= 6; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Eddie'; set @arg_sal= 700; set @arg_l= 7; set @arg_r= 8; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Fred'; set @arg_sal= 600; set @arg_l= 9; set @arg_r= 10; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; select * from personnel; id emp salary l r 1 Jerry 1000.00 1 12 2 Bert 900.00 2 3 3 Chuck 900.00 4 11 4 Donna 800.00 5 6 5 Eddie 700.00 7 8 6 Fred 600.00 9 10 prepare st_raise_base from 'update personnel set salary = salary * ( 1 + ? ) where r - l = 1'; prepare st_raise_mgr from 'update personnel set salary = salary + ? where r - l > 1'; set @arg_percent= .10; set @arg_amount= 100; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; select * from personnel; id emp salary l r 1 Jerry 1300.00 1 12 2 Bert 1197.90 2 3 3 Chuck 1200.00 4 11 4 Donna 1064.80 5 6 5 Eddie 931.70 7 8 6 Fred 798.60 9 10 drop table personnel; Loading
BitKeeper/triggers/post-commit +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ then CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'` WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'` if [ "$BUG" = "" ] then Loading @@ -37,7 +38,7 @@ fi List-ID: <bk.mysql-$VERSION> From: $FROM To: $TO Subject: bk commit - $VERSION tree ($CHANGESET)$BUG Subject: bk commit - $VERSION tree ($CHANGESET)${BUG}${WL} EOF bk changes -v -r+ Loading
mysql-test/include/have_ndb.inc +3 −3 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ disable_query_log; show variables like "have_ndbcluster"; enable_query_log; connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1); connection server1; #connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); #connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1); #connection server1;
mysql-test/r/ndb_lock.result +35 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,38 @@ x y 2 two 3 three commit; drop table t1; create table t1 (pk integer not null primary key, u int not null, o int not null, unique(u), key(o)) engine = ndb; insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); lock tables t1 write; delete from t1 where pk = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); lock tables t1 write; delete from t1 where u = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); lock tables t1 write; delete from t1 where o = 1; unlock tables; select * from t1 order by pk; pk u o 2 2 2 3 3 3 4 4 4 5 5 5 insert into t1 values (1,1,1); drop table t1;
mysql-test/r/ps.result +18 −0 Original line number Diff line number Diff line Loading @@ -318,3 +318,21 @@ execute stmt; a drop table t1; deallocate prepare stmt; create table t1 (a int, b int); insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2); prepare stmt from "explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?"; set @v=5; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - NULL Impossible WHERE set @v=0; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - 4 Using where set @v=5; execute stmt using @v; id select_type table type possible_keys key key_len ref rows Extra - - - - - - - - NULL Impossible WHERE drop table t1; deallocate prepare stmt;
mysql-test/r/ps_10nestset.result 0 → 100644 +68 −0 Original line number Diff line number Diff line use test; drop table if exists personnel; Warnings: Note 1051 Unknown table 'personnel' create table personnel ( id INTEGER AUTO_INCREMENT PRIMARY KEY, emp CHAR(10) NOT NULL, salary DECIMAL(6,2) NOT NULL, l INTEGER NOT NULL, r INTEGER NOT NULL); prepare st_ins from 'insert into personnel set emp = ?, salary = ?, l = ?, r = ?'; set @arg_nam= 'Jerry'; set @arg_sal= 1000; set @arg_l= 1; set @arg_r= 12; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Bert'; set @arg_sal= 900; set @arg_l= 2; set @arg_r= 3; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Chuck'; set @arg_sal= 900; set @arg_l= 4; set @arg_r= 11; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Donna'; set @arg_sal= 800; set @arg_l= 5; set @arg_r= 6; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Eddie'; set @arg_sal= 700; set @arg_l= 7; set @arg_r= 8; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; set @arg_nam= 'Fred'; set @arg_sal= 600; set @arg_l= 9; set @arg_r= 10; execute st_ins using @arg_nam, @arg_sal, @arg_l, @arg_r ; select * from personnel; id emp salary l r 1 Jerry 1000.00 1 12 2 Bert 900.00 2 3 3 Chuck 900.00 4 11 4 Donna 800.00 5 6 5 Eddie 700.00 7 8 6 Fred 600.00 9 10 prepare st_raise_base from 'update personnel set salary = salary * ( 1 + ? ) where r - l = 1'; prepare st_raise_mgr from 'update personnel set salary = salary + ? where r - l > 1'; set @arg_percent= .10; set @arg_amount= 100; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; execute st_raise_base using @arg_percent; execute st_raise_mgr using @arg_amount; select * from personnel; id emp salary l r 1 Jerry 1300.00 1 12 2 Bert 1197.90 2 3 3 Chuck 1200.00 4 11 4 Donna 1064.80 5 6 5 Eddie 931.70 7 8 6 Fred 798.60 9 10 drop table personnel;