summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-11-16 20:19:10 +0200
committerunknown <monty@mashka.mysql.fi>2002-11-16 20:19:10 +0200
commitbd1c2d65c46a433e4ea53858584dc987b1b75658 (patch)
tree9cac640546f7a1615d184835e8fea1d18456e4e5 /mysql-test/r
parentffd1d3df2ab2c46225667e71ed04f2f47ecaef32 (diff)
downloadmariadb-git-bd1c2d65c46a433e4ea53858584dc987b1b75658.tar.gz
Small improvement to alloc_root
Add support for LIMIT # OFFSET # Changed lock handling: Now all locks should be stored in TABLE_LIST instead of passed to functions. Don't call query_cache_invalidate() twice in some cases mysql_change_user() now clears states to be equal to close + connect. Fixed a bug with multi-table-update and multi-table-delete when used with LOCK TABLES Fixed a bug with replicate-do and UPDATE BitKeeper/etc/ignore: added autom4te.cache/* bdb/dist/autom4te.cache/* innobase/autom4te.cache/* include/my_alloc.h: Small improvement to alloc_root libmysql/libmysql.c: Removed compiler warning myisam/mi_page.c: Better DBUG message mysql-test/r/multi_update.result: Added test with lock tables mysql-test/r/rpl_replicate_do.result: Update results mysql-test/r/rpl_rotate_logs.result: Make test independent of if t1 exists mysql-test/t/multi_update.test: Added test with lock tables mysql-test/t/rpl_rotate_logs.test: Make test independent of if t1 exists mysys/my_alloc.c: Small imprevement to alloc_root (Don't free blocks less than ALLOC_MAX_BLOCK_ROOT (4K) sql/ha_innodb.cc: More debug messages sql/ha_myisam.cc: Safety change sql/lex.h: Add support for LIMIT # OFFSET # sql/lock.cc: Added assertion sql/mysql_priv.h: Change of lock handling sql/mysqld.cc: Added function clear_error_messages() sql/sql_base.cc: Change lock handling by open_ltable() and open_and_lock_tables() sql/sql_class.cc: Split THD::THD to two functions Move some code from cleanup() to ~THD:THD Add THD::change_user() sql/sql_class.h: Prototype changes in class THD sql/sql_delete.cc: Remove locking argument from mysql_delete() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. sql/sql_insert.cc: Remove locking argument from mysql_insert() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. Don't use bulk insert if bulk_insert_buff_size is 0 sql/sql_parse.cc: Changes to make mysql_change_user() work as close+connect Changed command statistics to use statstics_increment to get more speed Update code to handle that locks is now stored in TABLE_LIST sql/sql_update.cc: Remove locking argument from mysql_update() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. sql/sql_yacc.yy: Locking type is now stored in TABLE_LIST Added support for LIMIT # OFFSET # syntax Removed some wrong (never true) checks for SQLCOM_MULTI_UPDATE mysql-test/t/rpl_replicate_do-slave.opt: Changed tables to use t1,t2,... mysql-test/t/rpl_replicate_do.test: Changed tables to use t1,t2,...
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/multi_update.result27
-rw-r--r--mysql-test/r/rpl000007.result20
-rw-r--r--mysql-test/r/rpl_replicate_do.result28
-rw-r--r--mysql-test/r/rpl_rotate_logs.result3
4 files changed, 56 insertions, 22 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 9dff4fba825..ce3f7e90f6b 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -150,4 +150,29 @@ n n
delete t1,t2 from t2 left outer join t1 using (n);
select * from t2 left outer join t1 using (n);
n n
-drop table if exists t1,t2 ;
+drop table t1,t2 ;
+create table t1 (n int(10) not null primary key, d int(10));
+create table t2 (n int(10) not null primary key, d int(10));
+insert into t1 values(1,1);
+insert into t2 values(1,10),(2,20);
+LOCK TABLES t1 write, t2 read;
+DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n;
+Table 't2' was locked with a READ lock and can't be updated
+UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
+Table 't2' was locked with a READ lock and can't be updated
+UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
+Table 't2' was locked with a READ lock and can't be updated
+unlock tables;
+LOCK TABLES t1 write, t2 write;
+UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
+select * from t1;
+n d
+1 10
+DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n;
+select * from t1;
+n d
+select * from t2;
+n d
+2 20
+unlock tables;
+drop table t1,t2;
diff --git a/mysql-test/r/rpl000007.result b/mysql-test/r/rpl000007.result
deleted file mode 100644
index c2823bf1203..00000000000
--- a/mysql-test/r/rpl000007.result
+++ /dev/null
@@ -1,20 +0,0 @@
-slave stop;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-slave start;
-drop table if exists foo;
-create table foo (n int);
-insert into foo values(4);
-drop table if exists foo;
-create table foo (s char(20));
-load data infile '../../std_data/words.dat' into table foo;
-insert into foo values('five');
-drop table if exists bar;
-create table bar (m int);
-insert into bar values(15);
-select foo.n,bar.m from foo,bar;
-n m
-4 15
-drop table if exists bar,foo;
diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result
new file mode 100644
index 00000000000..372d8c07f64
--- /dev/null
+++ b/mysql-test/r/rpl_replicate_do.result
@@ -0,0 +1,28 @@
+slave stop;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+slave start;
+drop table if exists t11;
+drop table if exists t11;
+create table t2 (n int);
+insert into t2 values(4);
+create table t2 (s char(20));
+load data infile '../../std_data/words.dat' into table t2;
+insert into t2 values('five');
+create table t1 (m int);
+insert into t1 values(15),(16),(17);
+update t1 set m=20 where m=16;
+delete from t1 where m=17;
+create table t11 select * from t1;
+select * from t1;
+m
+15
+20
+select * from t2;
+n
+4
+select * from t11;
+Table 'test.t11' doesn't exist
+drop table if exists t1,t2,t3,t11;
diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result
index 63d5b0b63e1..741c53fe52b 100644
--- a/mysql-test/r/rpl_rotate_logs.result
+++ b/mysql-test/r/rpl_rotate_logs.result
@@ -1,3 +1,5 @@
+drop table if exists t1, t2, t3, t4;
+drop table if exists t1, t2, t3, t4;
slave start;
Could not initialize master info structure, check permisions on master.info
slave start;
@@ -8,7 +10,6 @@ reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
reset master;
slave start;
-drop table if exists t1, t2, t3, t4;
create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables");
create table t1 (s text);