diff options
author | mleich@mysql.com <> | 2004-09-20 13:10:47 +0200 |
---|---|---|
committer | mleich@mysql.com <> | 2004-09-20 13:10:47 +0200 |
commit | 51d42739b9b0d1327ea0f508a2df3894bdbbd1d8 (patch) | |
tree | 2bdf2cce8e53e10f0de059705d1680f4a9a2915d /mysql-test/include | |
parent | 4230eae8575cd495167d5be99c0fae744673a8b5 (diff) | |
download | mariadb-git-51d42739b9b0d1327ea0f508a2df3894bdbbd1d8.tar.gz |
These modifications were part of WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
They are separated from the other WL#1856 stuff, because they improve the behaviour of the current tests.
Make the result sets (order of rows) more predictable by using ORDER BY.
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/ps_modify.inc | 14 | ||||
-rw-r--r-- | mysql-test/include/ps_modify1.inc | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc index 04c5cbaad6b..ba7ccefdd98 100644 --- a/mysql-test/include/ps_modify.inc +++ b/mysql-test/include/ps_modify.inc @@ -110,10 +110,10 @@ select a,b from t1 where a=@arg00; set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; -select a,b from t1; +select a,b from t1 order by a; set @arg00=0; execute stmt1 using @arg01, @arg00; -select a,b from t1; +select a,b from t1 order by a; ## update with subquery and several parameters set @arg00=23; @@ -134,7 +134,7 @@ prepare stmt1 from 'update t1 set a=? where b=? and a not in (select ? from t2 where b = ? or a = ?)'; execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -select a,b from t1 ; +select a,b from t1 order by a; drop table t2 ; ## update with parameters in limit @@ -202,7 +202,7 @@ set @arg01=1 ; prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' on duplicate key update a=a + ?, b=concat(b,''modified'') '; execute stmt1 using @arg00, @arg01; -select * from t1; +select * from t1 order by a; set @arg00=81 ; set @arg01=1 ; --error 1062 @@ -221,17 +221,17 @@ set @updated="updated" ; insert into t1 values(1000,'x1000_1') ; insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) on duplicate key update a = a + @100, b = concat(b,@updated) ; -select a,b from t1 where a >= 1000 ; +select a,b from t1 where a >= 1000 order by a ; delete from t1 where a >= 1000 ; insert into t1 values(1000,'x1000_1') ; prepare stmt1 from ' insert into t1 values(?,?),(?,?) on duplicate key update a = a + ?, b = concat(b,?) '; execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 ; +select a,b from t1 where a >= 1000 order by a ; delete from t1 where a >= 1000 ; insert into t1 values(1000,'x1000_1') ; execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 ; +select a,b from t1 where a >= 1000 order by a ; delete from t1 where a >= 1000 ; ## replace diff --git a/mysql-test/include/ps_modify1.inc b/mysql-test/include/ps_modify1.inc index 0b192a52625..da3bea80669 100644 --- a/mysql-test/include/ps_modify1.inc +++ b/mysql-test/include/ps_modify1.inc @@ -45,19 +45,19 @@ set @duplicate='duplicate ' ; set @1000=1000 ; set @5=5 ; -select a,b from t1 where a < 5 ; +select a,b from t1 where a < 5 order by a ; --enable_info insert into t1 select a + @1000, concat(@duplicate,b) from t1 where a < @5 ; --disable_info -select a,b from t1 where a >= 1000 ; +select a,b from t1 where a >= 1000 order by a ; delete from t1 where a >= 1000 ; prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 where a < ? ' ; --enable_info execute stmt1 using @1000, @duplicate, @5; --disable_info -select a,b from t1 where a >= 1000 ; +select a,b from t1 where a >= 1000 order by a ; delete from t1 where a >= 1000 ; set @float=1.00; @@ -78,7 +78,7 @@ select b, a + @100 from t1 where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b from t1); --disable_info -select a,b from t2; +select a,b from t2 order by a ; delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) select ?, sum(first.a) @@ -93,5 +93,5 @@ select b, a + ? from t1 --enable_info execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; --disable_info -select a,b from t2; +select a,b from t2 order by a ; drop table t2; |