Loading myisammrg/mymrgdef.h +5 −3 Original line number Diff line number Diff line Loading @@ -30,3 +30,5 @@ extern pthread_mutex_t THR_LOCK_open; int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag); int _myrg_finish_scan(MYRG_INFO *info, int inx, enum ha_rkey_function type); MYRG_TABLE *_myrg_find_table(MYRG_INFO *info, ulonglong pos); myisammrg/myrg_info.c +5 −3 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag) MYRG_TABLE *current_table; DBUG_ENTER("myrg_status"); _myrg_find_table(info, HA_OFFSET_ERROR); if (!(current_table = info->current_table) && info->open_tables != info->end_table) current_table = info->open_tables; Loading myisammrg/myrg_rrnd.c +12 −14 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ #include "mymrgdef.h" static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos); /* If filepos == HA_OFFSET_ERROR, read next Returns same as mi_rrnd: Loading Loading @@ -80,8 +78,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos) isam_info->lastinx= (uint) -1; } } info->current_table=find_table(info->open_tables, info->end_table-1,filepos); info->current_table=_myrg_find_table(info,filepos); isam_info=info->current_table->table; isam_info->update&= HA_STATE_CHANGED; return ((*isam_info->s->read_rnd) Loading @@ -93,18 +90,19 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos) /* Find which table to use according to file-pos */ static MYRG_TABLE *find_table(MYRG_TABLE *start, MYRG_TABLE *end, ulonglong pos) MYRG_TABLE *_myrg_find_table(MYRG_INFO *info, ulonglong pos) { MYRG_TABLE *mid; MYRG_TABLE *t; info->records=info->del=info->data_file_length=0; while (start != end) for (t=info->open_tables ; t < info->end_table ; t++) { mid=start+((uint) (end-start)+1)/2; if (mid->file_offset > pos) end=mid-1; else start=mid; t->file_offset=info->data_file_length; if (pos < t->file_offset) return t-1; info->data_file_length+=t->table->state->data_file_length; info->records+=t->table->state->records; info->del+=t->table->state->del; } return start; return t-1; } mysql-test/mysql-test-run +3 −3 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ echo_pass () { prompt_user () { echo $1 read read not_used } echo_fail () { Loading Loading @@ -285,7 +285,7 @@ start_slave() --master-connect-retry=1 \ --master-host=127.0.0.1 \ --master-port=$MASTER_MYPORT \ --core-file \ --core-file --log-bin --log-slave-updates \ --basedir=$CWD \ --datadir=$SLAVE_MYDDIR \ --pid-file=$SLAVE_MYPID \ Loading Loading @@ -363,7 +363,7 @@ run_testcase () tname=`$ECHO $tname | $CUT -d . -f 1` master_opt_file=$TESTDIR/$tname-master.opt slave_opt_file=$TESTDIR/$tname-slave.opt SKIP_SLAVE=`$EXPR \( match $tname rpl \) = 0` SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0` if [ -f $master_opt_file ] ; then Loading mysql-test/r/3.23/mrg000001.dummy.result 0 → 100644 +1 −0 Original line number Diff line number Diff line incr othr Loading
myisammrg/mymrgdef.h +5 −3 Original line number Diff line number Diff line Loading @@ -30,3 +30,5 @@ extern pthread_mutex_t THR_LOCK_open; int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag); int _myrg_finish_scan(MYRG_INFO *info, int inx, enum ha_rkey_function type); MYRG_TABLE *_myrg_find_table(MYRG_INFO *info, ulonglong pos);
myisammrg/myrg_info.c +5 −3 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag) MYRG_TABLE *current_table; DBUG_ENTER("myrg_status"); _myrg_find_table(info, HA_OFFSET_ERROR); if (!(current_table = info->current_table) && info->open_tables != info->end_table) current_table = info->open_tables; Loading
myisammrg/myrg_rrnd.c +12 −14 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ #include "mymrgdef.h" static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos); /* If filepos == HA_OFFSET_ERROR, read next Returns same as mi_rrnd: Loading Loading @@ -80,8 +78,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos) isam_info->lastinx= (uint) -1; } } info->current_table=find_table(info->open_tables, info->end_table-1,filepos); info->current_table=_myrg_find_table(info,filepos); isam_info=info->current_table->table; isam_info->update&= HA_STATE_CHANGED; return ((*isam_info->s->read_rnd) Loading @@ -93,18 +90,19 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos) /* Find which table to use according to file-pos */ static MYRG_TABLE *find_table(MYRG_TABLE *start, MYRG_TABLE *end, ulonglong pos) MYRG_TABLE *_myrg_find_table(MYRG_INFO *info, ulonglong pos) { MYRG_TABLE *mid; MYRG_TABLE *t; info->records=info->del=info->data_file_length=0; while (start != end) for (t=info->open_tables ; t < info->end_table ; t++) { mid=start+((uint) (end-start)+1)/2; if (mid->file_offset > pos) end=mid-1; else start=mid; t->file_offset=info->data_file_length; if (pos < t->file_offset) return t-1; info->data_file_length+=t->table->state->data_file_length; info->records+=t->table->state->records; info->del+=t->table->state->del; } return start; return t-1; }
mysql-test/mysql-test-run +3 −3 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ echo_pass () { prompt_user () { echo $1 read read not_used } echo_fail () { Loading Loading @@ -285,7 +285,7 @@ start_slave() --master-connect-retry=1 \ --master-host=127.0.0.1 \ --master-port=$MASTER_MYPORT \ --core-file \ --core-file --log-bin --log-slave-updates \ --basedir=$CWD \ --datadir=$SLAVE_MYDDIR \ --pid-file=$SLAVE_MYPID \ Loading Loading @@ -363,7 +363,7 @@ run_testcase () tname=`$ECHO $tname | $CUT -d . -f 1` master_opt_file=$TESTDIR/$tname-master.opt slave_opt_file=$TESTDIR/$tname-slave.opt SKIP_SLAVE=`$EXPR \( match $tname rpl \) = 0` SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0` if [ -f $master_opt_file ] ; then Loading
mysql-test/r/3.23/mrg000001.dummy.result 0 → 100644 +1 −0 Original line number Diff line number Diff line incr othr