Loading .bzrignore +7 −3 Original line number Diff line number Diff line *.Plo *.Po *.a *.bb *.bbg Loading @@ -11,6 +13,8 @@ *.reject *.spec */*_pure_*warnings */.deps */.libs/* */.pure *~ .*.swp Loading Loading @@ -336,6 +340,7 @@ isam/test2 isam/test3 libmysql/*.c libmysql/conf_to_src libmysql/libmysql.ver libmysql/my_static.h libmysql/my_time.c libmysql/mysys_priv.h Loading Loading @@ -443,6 +448,7 @@ libmysqld/sql_insert.cc libmysqld/sql_lex.cc libmysqld/sql_list.cc libmysqld/sql_load.cc libmysqld/sql_locale.cc libmysqld/sql_manager.cc libmysqld/sql_map.cc libmysqld/sql_olap.cc Loading Loading @@ -519,6 +525,7 @@ mysql-4.1.8-win-src.zip mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz mysql-test/gmon.out mysql-test/install_test_db mysql-test/mtr mysql-test/mysql-test-run mysql-test/mysql-test-run.log mysql-test/mysql_test_run_new Loading Loading @@ -1057,6 +1064,3 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl libmysql/libmysql.ver libmysqld/sql_locale.cc mysql-test/mtr myisam/mi_packrec.c +14 −6 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ /* Functions to compressed records */ #include "myisamdef.h" #include "fulltext.h" #define IS_CHAR ((uint) 32768) /* Bit if char (not offset) in tree */ Loading Loading @@ -228,11 +228,19 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) { for (i=0 ; i < share->base.keys ; i++) { share->keyinfo[i].keylength+=(uint16) diff_length; share->keyinfo[i].minlength+=(uint16) diff_length; share->keyinfo[i].maxlength+=(uint16) diff_length; share->keyinfo[i].seg[share->keyinfo[i].keysegs].length= (uint16) rec_reflength; MI_KEYDEF *keyinfo= &share->keyinfo[i]; keyinfo->keylength+= (uint16) diff_length; keyinfo->minlength+= (uint16) diff_length; keyinfo->maxlength+= (uint16) diff_length; keyinfo->seg[keyinfo->flag & HA_FULLTEXT ? FT_SEGS : keyinfo->keysegs].length= (uint16) rec_reflength; } if (share->ft2_keyinfo.seg) { MI_KEYDEF *ft2_keyinfo= &share->ft2_keyinfo; ft2_keyinfo->keylength+= (uint16) diff_length; ft2_keyinfo->minlength+= (uint16) diff_length; ft2_keyinfo->maxlength+= (uint16) diff_length; } } Loading myisam/mi_rkey.c +34 −21 Original line number Diff line number Diff line Loading @@ -93,32 +93,45 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, myisam_read_vec[search_flag], info->s->state.key_root[inx])) { /* If we are searching for an exact key (including the data pointer) and this was added by an concurrent insert, then the result is "key not found". If we searching for a partial key (or using >, >=, < or <=) and the data is outside of the data file, we need to continue searching for the first key inside the data file */ if ((search_flag == HA_READ_KEY_EXACT) && (info->lastpos >= info->state->data_file_length)) if (info->lastpos >= info->state->data_file_length && (search_flag != HA_READ_KEY_EXACT || last_used_keyseg != keyinfo->seg + keyinfo->keysegs)) { my_errno= HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; } else while (info->lastpos >= info->state->data_file_length) do { uint not_used[2]; /* Skip rows that are inserted by other threads since we got a lock Note that this can only happen if we are not searching after an exact key, because the keys are sorted according to position full length exact key, because the keys are sorted according to position */ if (_mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length, myisam_readnext_vec[search_flag], info->s->state.key_root[inx])) break; /* Check that the found key does still match the search. _mi_search_next() delivers the next key regardless of its value. */ if (search_flag == HA_READ_KEY_EXACT && ha_key_cmp(keyinfo->seg, key_buff, info->lastkey, use_key_length, SEARCH_FIND, not_used)) { my_errno= HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; break; } } while (info->lastpos >= info->state->data_file_length); } } } if (share->concurrent_insert) rw_unlock(&share->key_root_lock[inx]); Loading myisam/mi_test_all.res +35 −35 Original line number Diff line number Diff line Loading @@ -5,46 +5,46 @@ myisamchk: MyISAM file test2 myisamchk: warning: Datafile is almost full, 65532 of 65534 used MyISAM-table 'test2' is usable but should be fixed Commands Used count Errors Recover errors open 17 0 0 write 850 0 0 update 85 0 0 delete 850 0 0 close 17 0 0 extra 102 0 0 Total 1921 0 0 open 7 0 0 write 350 0 0 update 35 0 0 delete 350 0 0 close 7 0 0 extra 42 0 0 Total 791 0 0 Commands Used count Errors Recover errors open 18 0 0 write 900 0 0 update 90 0 0 delete 900 0 0 close 18 0 0 extra 108 0 0 Total 2034 0 0 open 8 0 0 write 400 0 0 update 40 0 0 delete 400 0 0 close 8 0 0 extra 48 0 0 Total 904 0 0 real 0m1.054s user 0m0.410s sys 0m0.640s real 0m0.221s user 0m0.120s sys 0m0.100s real 0m1.077s user 0m0.550s sys 0m0.530s real 0m0.222s user 0m0.140s sys 0m0.084s real 0m1.100s user 0m0.420s sys 0m0.680s real 0m0.232s user 0m0.112s sys 0m0.120s real 0m0.783s user 0m0.590s sys 0m0.200s real 0m0.163s user 0m0.116s sys 0m0.036s real 0m0.764s user 0m0.560s sys 0m0.210s real 0m0.159s user 0m0.136s sys 0m0.020s real 0m0.699s user 0m0.570s sys 0m0.130s real 0m0.147s user 0m0.132s sys 0m0.016s real 0m0.991s user 0m0.630s sys 0m0.350s real 0m0.211s user 0m0.124s sys 0m0.088s myisam/mi_test_all.sh +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ myisamchk$suffix -se test1 # check of myisampack / myisamchk myisampack$suffix --force -s test1 myisamchk$suffix -es test1 # Ignore error for index file myisamchk$suffix -es test1 2>&1 >& /dev/null myisamchk$suffix -rqs test1 myisamchk$suffix -es test1 myisamchk$suffix -rs test1 Loading Loading
.bzrignore +7 −3 Original line number Diff line number Diff line *.Plo *.Po *.a *.bb *.bbg Loading @@ -11,6 +13,8 @@ *.reject *.spec */*_pure_*warnings */.deps */.libs/* */.pure *~ .*.swp Loading Loading @@ -336,6 +340,7 @@ isam/test2 isam/test3 libmysql/*.c libmysql/conf_to_src libmysql/libmysql.ver libmysql/my_static.h libmysql/my_time.c libmysql/mysys_priv.h Loading Loading @@ -443,6 +448,7 @@ libmysqld/sql_insert.cc libmysqld/sql_lex.cc libmysqld/sql_list.cc libmysqld/sql_load.cc libmysqld/sql_locale.cc libmysqld/sql_manager.cc libmysqld/sql_map.cc libmysqld/sql_olap.cc Loading Loading @@ -519,6 +525,7 @@ mysql-4.1.8-win-src.zip mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz mysql-test/gmon.out mysql-test/install_test_db mysql-test/mtr mysql-test/mysql-test-run mysql-test/mysql-test-run.log mysql-test/mysql_test_run_new Loading Loading @@ -1057,6 +1064,3 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl libmysql/libmysql.ver libmysqld/sql_locale.cc mysql-test/mtr
myisam/mi_packrec.c +14 −6 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ /* Functions to compressed records */ #include "myisamdef.h" #include "fulltext.h" #define IS_CHAR ((uint) 32768) /* Bit if char (not offset) in tree */ Loading Loading @@ -228,11 +228,19 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) { for (i=0 ; i < share->base.keys ; i++) { share->keyinfo[i].keylength+=(uint16) diff_length; share->keyinfo[i].minlength+=(uint16) diff_length; share->keyinfo[i].maxlength+=(uint16) diff_length; share->keyinfo[i].seg[share->keyinfo[i].keysegs].length= (uint16) rec_reflength; MI_KEYDEF *keyinfo= &share->keyinfo[i]; keyinfo->keylength+= (uint16) diff_length; keyinfo->minlength+= (uint16) diff_length; keyinfo->maxlength+= (uint16) diff_length; keyinfo->seg[keyinfo->flag & HA_FULLTEXT ? FT_SEGS : keyinfo->keysegs].length= (uint16) rec_reflength; } if (share->ft2_keyinfo.seg) { MI_KEYDEF *ft2_keyinfo= &share->ft2_keyinfo; ft2_keyinfo->keylength+= (uint16) diff_length; ft2_keyinfo->minlength+= (uint16) diff_length; ft2_keyinfo->maxlength+= (uint16) diff_length; } } Loading
myisam/mi_rkey.c +34 −21 Original line number Diff line number Diff line Loading @@ -93,32 +93,45 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, myisam_read_vec[search_flag], info->s->state.key_root[inx])) { /* If we are searching for an exact key (including the data pointer) and this was added by an concurrent insert, then the result is "key not found". If we searching for a partial key (or using >, >=, < or <=) and the data is outside of the data file, we need to continue searching for the first key inside the data file */ if ((search_flag == HA_READ_KEY_EXACT) && (info->lastpos >= info->state->data_file_length)) if (info->lastpos >= info->state->data_file_length && (search_flag != HA_READ_KEY_EXACT || last_used_keyseg != keyinfo->seg + keyinfo->keysegs)) { my_errno= HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; } else while (info->lastpos >= info->state->data_file_length) do { uint not_used[2]; /* Skip rows that are inserted by other threads since we got a lock Note that this can only happen if we are not searching after an exact key, because the keys are sorted according to position full length exact key, because the keys are sorted according to position */ if (_mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length, myisam_readnext_vec[search_flag], info->s->state.key_root[inx])) break; /* Check that the found key does still match the search. _mi_search_next() delivers the next key regardless of its value. */ if (search_flag == HA_READ_KEY_EXACT && ha_key_cmp(keyinfo->seg, key_buff, info->lastkey, use_key_length, SEARCH_FIND, not_used)) { my_errno= HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; break; } } while (info->lastpos >= info->state->data_file_length); } } } if (share->concurrent_insert) rw_unlock(&share->key_root_lock[inx]); Loading
myisam/mi_test_all.res +35 −35 Original line number Diff line number Diff line Loading @@ -5,46 +5,46 @@ myisamchk: MyISAM file test2 myisamchk: warning: Datafile is almost full, 65532 of 65534 used MyISAM-table 'test2' is usable but should be fixed Commands Used count Errors Recover errors open 17 0 0 write 850 0 0 update 85 0 0 delete 850 0 0 close 17 0 0 extra 102 0 0 Total 1921 0 0 open 7 0 0 write 350 0 0 update 35 0 0 delete 350 0 0 close 7 0 0 extra 42 0 0 Total 791 0 0 Commands Used count Errors Recover errors open 18 0 0 write 900 0 0 update 90 0 0 delete 900 0 0 close 18 0 0 extra 108 0 0 Total 2034 0 0 open 8 0 0 write 400 0 0 update 40 0 0 delete 400 0 0 close 8 0 0 extra 48 0 0 Total 904 0 0 real 0m1.054s user 0m0.410s sys 0m0.640s real 0m0.221s user 0m0.120s sys 0m0.100s real 0m1.077s user 0m0.550s sys 0m0.530s real 0m0.222s user 0m0.140s sys 0m0.084s real 0m1.100s user 0m0.420s sys 0m0.680s real 0m0.232s user 0m0.112s sys 0m0.120s real 0m0.783s user 0m0.590s sys 0m0.200s real 0m0.163s user 0m0.116s sys 0m0.036s real 0m0.764s user 0m0.560s sys 0m0.210s real 0m0.159s user 0m0.136s sys 0m0.020s real 0m0.699s user 0m0.570s sys 0m0.130s real 0m0.147s user 0m0.132s sys 0m0.016s real 0m0.991s user 0m0.630s sys 0m0.350s real 0m0.211s user 0m0.124s sys 0m0.088s
myisam/mi_test_all.sh +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ myisamchk$suffix -se test1 # check of myisampack / myisamchk myisampack$suffix --force -s test1 myisamchk$suffix -es test1 # Ignore error for index file myisamchk$suffix -es test1 2>&1 >& /dev/null myisamchk$suffix -rqs test1 myisamchk$suffix -es test1 myisamchk$suffix -rs test1 Loading