Loading dbug/dbug.c +24 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ * all copies and derivative works. Thank you. * * * * The author makes no warranty of any kind with respect to this * * product and explicitly disclaims any implied warranties of mer- * * product and explicitly disclaims any implied warranties of mer- *ct_lex.table_list.first=0; thd->lex.selec * chantability or fitness for any particular purpose. * * * ****************************************************************************** Loading Loading @@ -58,7 +59,7 @@ * seismo!bpa!sjuvax!bbanerje * * Michael Widenius: * DBUG_DUMP - To dump a pice of memory. * DBUG_DUMP - To dump a block of memory. * PUSH_FLAG "O" - To be used insted of "o" if we don't * want flushing (for slow systems) * PUSH_FLAG "A" - as 'O', but we will append to the out file instead Loading Loading @@ -705,9 +706,15 @@ char ***_sframep_ __attribute__((unused))) if (!_no_db_) { int save_errno=errno; /* Sasha: the test below is so we could call functions with DBUG_ENTER before my_thread_init(). I needed this because I suspected corruption of a block allocated by my_thread_init() itself, so I wanted to use my_malloc()/my_free() in my_thread_init()/my_thread_end() */ if (!(state=code_state())) return; if (!init_done) _db_push_ (_DBUG_START_CONDITION_); state=code_state(); *_sfunc_ = state->func; *_sfile_ = state->file; Loading Loading @@ -787,10 +794,10 @@ uint *_slevel_) if (!_no_db_) { int save_errno=errno; if (!(state=code_state())) return; if (!init_done) _db_push_ (""); if (!(state=code_state())) return; /* Only happens at end of program */ if (stack->flags & (TRACE_ON | DEBUG_ON | PROFILE_ON)) { if (!state->locked) Loading Loading @@ -855,6 +862,9 @@ uint _line_, const char *keyword) { CODE_STATE *state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!state) return; state->u_line = _line_; state->u_keyword = (char*) keyword; } Loading Loading @@ -890,7 +900,9 @@ void _db_doprnt_ (const char *format,...) { va_list args; CODE_STATE *state; state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return; va_start(args,format); Loading Loading @@ -942,7 +954,9 @@ uint length) int pos; char dbuff[90]; CODE_STATE *state; state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return; if (_db_keyword_ ((char*) keyword)) { Loading Loading @@ -1224,7 +1238,9 @@ const char *keyword) if (!init_done) _db_push_ (""); state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return FALSE; result = FALSE; if (DEBUGGING && state->level <= stack -> maxdepth && Loading include/my_sys.h +4 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,10 @@ extern int NEAR my_errno; /* Last error in mysys */ #define NORMAL_SAFEMALLOC sf_malloc_quick=0 extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; extern ulonglong safemalloc_mem_limit; /* keep track of shutdown,signal, and main threads so that my_end() will not report errors with them */ extern pthread_t shutdown_th, main_th,signal_th; #define CALLER_INFO_PROTO , const char *sFile, uint uLine #define CALLER_INFO , __FILE__, __LINE__ #define ORIG_CALLER_INFO , sFile, uLine Loading mysql-test/r/multi_update.result +27 −0 Original line number Diff line number Diff line Loading @@ -2,7 +2,34 @@ drop table if exists t1,t2,t3; create table t1(id1 int not null auto_increment primary key, t char(12)); create table t2(id2 int not null, t char(12)); create table t3(id3 int not null, t char(12), index(id3)); select count(*) from t1 where id1 > 95; count(*) 5 select count(*) from t2 where id2 > 95; count(*) 25 select count(*) from t3 where id3 > 95; count(*) 250 update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 90; select count(*) from t1 where t = "aaa"; count(*) 10 select count(*) from t1 where id1 > 90; count(*) 10 select count(*) from t2 where t = "bbb"; count(*) 10 select count(*) from t2 where id2 > 90; count(*) 50 select count(*) from t3 where t = "cc"; count(*) 500 select count(*) from t3 where id3 > 90; count(*) 500 delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 95; check table t1, t2, t3; Table Op Msg_type Msg_text Loading mysql-test/r/rpl000015.result +3 −3 Original line number Diff line number Diff line Loading @@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo change master to master_host='127.0.0.1'; 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 127.0.0.1 test MASTER_PORT 60 4 slave-relay-bin.001 4 No No 0 0 0 127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; 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 127.0.0.1 root MASTER_PORT 60 4 slave-relay-bin.001 4 No No 0 0 0 127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 slave start; 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 127.0.0.1 root MASTER_PORT 60 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 127.0.0.1 root MASTER_PORT 7 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 drop table if exists t1; create table t1 (n int); insert into t1 values (10),(45),(90); Loading mysql-test/t/multi_update.test +11 −0 Original line number Diff line number Diff line Loading @@ -29,7 +29,18 @@ while ($1) dec $1; } enable_query_log; select count(*) from t1 where id1 > 95; select count(*) from t2 where id2 > 95; select count(*) from t3 where id3 > 95; update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 90; select count(*) from t1 where t = "aaa"; select count(*) from t1 where id1 > 90; select count(*) from t2 where t = "bbb"; select count(*) from t2 where id2 > 90; select count(*) from t3 where t = "cc"; select count(*) from t3 where id3 > 90; delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 95; check table t1, t2, t3; Loading Loading
dbug/dbug.c +24 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ * all copies and derivative works. Thank you. * * * * The author makes no warranty of any kind with respect to this * * product and explicitly disclaims any implied warranties of mer- * * product and explicitly disclaims any implied warranties of mer- *ct_lex.table_list.first=0; thd->lex.selec * chantability or fitness for any particular purpose. * * * ****************************************************************************** Loading Loading @@ -58,7 +59,7 @@ * seismo!bpa!sjuvax!bbanerje * * Michael Widenius: * DBUG_DUMP - To dump a pice of memory. * DBUG_DUMP - To dump a block of memory. * PUSH_FLAG "O" - To be used insted of "o" if we don't * want flushing (for slow systems) * PUSH_FLAG "A" - as 'O', but we will append to the out file instead Loading Loading @@ -705,9 +706,15 @@ char ***_sframep_ __attribute__((unused))) if (!_no_db_) { int save_errno=errno; /* Sasha: the test below is so we could call functions with DBUG_ENTER before my_thread_init(). I needed this because I suspected corruption of a block allocated by my_thread_init() itself, so I wanted to use my_malloc()/my_free() in my_thread_init()/my_thread_end() */ if (!(state=code_state())) return; if (!init_done) _db_push_ (_DBUG_START_CONDITION_); state=code_state(); *_sfunc_ = state->func; *_sfile_ = state->file; Loading Loading @@ -787,10 +794,10 @@ uint *_slevel_) if (!_no_db_) { int save_errno=errno; if (!(state=code_state())) return; if (!init_done) _db_push_ (""); if (!(state=code_state())) return; /* Only happens at end of program */ if (stack->flags & (TRACE_ON | DEBUG_ON | PROFILE_ON)) { if (!state->locked) Loading Loading @@ -855,6 +862,9 @@ uint _line_, const char *keyword) { CODE_STATE *state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!state) return; state->u_line = _line_; state->u_keyword = (char*) keyword; } Loading Loading @@ -890,7 +900,9 @@ void _db_doprnt_ (const char *format,...) { va_list args; CODE_STATE *state; state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return; va_start(args,format); Loading Loading @@ -942,7 +954,9 @@ uint length) int pos; char dbuff[90]; CODE_STATE *state; state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return; if (_db_keyword_ ((char*) keyword)) { Loading Loading @@ -1224,7 +1238,9 @@ const char *keyword) if (!init_done) _db_push_ (""); state=code_state(); /* Sasha: pre-my_thread_init() safety */ if (!(state=code_state())) return FALSE; result = FALSE; if (DEBUGGING && state->level <= stack -> maxdepth && Loading
include/my_sys.h +4 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,10 @@ extern int NEAR my_errno; /* Last error in mysys */ #define NORMAL_SAFEMALLOC sf_malloc_quick=0 extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; extern ulonglong safemalloc_mem_limit; /* keep track of shutdown,signal, and main threads so that my_end() will not report errors with them */ extern pthread_t shutdown_th, main_th,signal_th; #define CALLER_INFO_PROTO , const char *sFile, uint uLine #define CALLER_INFO , __FILE__, __LINE__ #define ORIG_CALLER_INFO , sFile, uLine Loading
mysql-test/r/multi_update.result +27 −0 Original line number Diff line number Diff line Loading @@ -2,7 +2,34 @@ drop table if exists t1,t2,t3; create table t1(id1 int not null auto_increment primary key, t char(12)); create table t2(id2 int not null, t char(12)); create table t3(id3 int not null, t char(12), index(id3)); select count(*) from t1 where id1 > 95; count(*) 5 select count(*) from t2 where id2 > 95; count(*) 25 select count(*) from t3 where id3 > 95; count(*) 250 update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 90; select count(*) from t1 where t = "aaa"; count(*) 10 select count(*) from t1 where id1 > 90; count(*) 10 select count(*) from t2 where t = "bbb"; count(*) 10 select count(*) from t2 where id2 > 90; count(*) 50 select count(*) from t3 where t = "cc"; count(*) 500 select count(*) from t3 where id3 > 90; count(*) 500 delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 95; check table t1, t2, t3; Table Op Msg_type Msg_text Loading
mysql-test/r/rpl000015.result +3 −3 Original line number Diff line number Diff line Loading @@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo change master to master_host='127.0.0.1'; 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 127.0.0.1 test MASTER_PORT 60 4 slave-relay-bin.001 4 No No 0 0 0 127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; 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 127.0.0.1 root MASTER_PORT 60 4 slave-relay-bin.001 4 No No 0 0 0 127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 slave start; 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 127.0.0.1 root MASTER_PORT 60 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 127.0.0.1 root MASTER_PORT 7 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 drop table if exists t1; create table t1 (n int); insert into t1 values (10),(45),(90); Loading
mysql-test/t/multi_update.test +11 −0 Original line number Diff line number Diff line Loading @@ -29,7 +29,18 @@ while ($1) dec $1; } enable_query_log; select count(*) from t1 where id1 > 95; select count(*) from t2 where id2 > 95; select count(*) from t3 where id3 > 95; update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 90; select count(*) from t1 where t = "aaa"; select count(*) from t1 where id1 > 90; select count(*) from t2 where t = "bbb"; select count(*) from t2 where id2 > 90; select count(*) from t3 where t = "cc"; select count(*) from t3 where id3 > 90; delete t1.*, t2.*, t3.* from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3 and t1.id1 > 95; check table t1, t2, t3; Loading