mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
bd1c2d65c4
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,...
84 lines
3.1 KiB
Text
84 lines
3.1 KiB
Text
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;
|
|
Could not initialize master info structure, check permisions on master.info
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
|
Could not initialize master info
|
|
reset slave;
|
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
|
|
reset master;
|
|
slave start;
|
|
create temporary table temp_table (a char(80) not null);
|
|
insert into temp_table values ("testing temporary tables");
|
|
create table t1 (s text);
|
|
insert into t1 values('Could not break slave'),('Tried hard');
|
|
show slave status;
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.001 417 slave-relay-bin.001 458 master-bin.001 Yes Yes 0 0 417 458
|
|
select * from t1;
|
|
s
|
|
Could not break slave
|
|
Tried hard
|
|
flush logs;
|
|
drop table if exists t2;
|
|
create table t2(m int not null auto_increment primary key);
|
|
insert into t2 values (34),(67),(123);
|
|
flush logs;
|
|
show master logs;
|
|
Log_name
|
|
master-bin.001
|
|
master-bin.002
|
|
master-bin.003
|
|
create table t3 select * from temp_table;
|
|
select * from t3;
|
|
a
|
|
testing temporary tables
|
|
drop table temp_table, t3;
|
|
insert into t2 values(1234);
|
|
set insert_id=1234;
|
|
insert into t2 values(NULL);
|
|
set global sql_slave_skip_counter=1;
|
|
slave start;
|
|
purge master logs to 'master-bin.003';
|
|
show master logs;
|
|
Log_name
|
|
master-bin.003
|
|
insert into t2 values (65);
|
|
show slave status;
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.003 290 slave-relay-bin.001 1073 master-bin.003 Yes Yes 0 0 290 1073
|
|
select * from t2;
|
|
m
|
|
34
|
|
65
|
|
67
|
|
123
|
|
1234
|
|
create temporary table temp_table (a char(80) not null);
|
|
insert into temp_table values ("testing temporary tables part 2");
|
|
drop table if exists t3;
|
|
create table t3 (n int);
|
|
create table t4 select * from temp_table;
|
|
show master logs;
|
|
Log_name
|
|
master-bin.003
|
|
master-bin.004
|
|
master-bin.005
|
|
master-bin.006
|
|
show master status;
|
|
File Position Binlog_do_db Binlog_ignore_db
|
|
master-bin.006 838
|
|
select * from t4;
|
|
a
|
|
testing temporary tables part 2
|
|
show slave status;
|
|
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
|
127.0.0.1 root MASTER_PORT 60 master-bin.006 838 slave-relay-bin.001 8034 master-bin.006 Yes Yes 0 0 838 8034
|
|
lock tables t3 read;
|
|
select count(*) from t3 where n >= 4;
|
|
count(*)
|
|
100
|
|
unlock tables;
|
|
drop table if exists t1,t2,t3,t4;
|