diff options
author | unknown <monty@mysql.com> | 2004-12-31 03:47:56 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-12-31 03:47:56 +0200 |
commit | 45199f545cafb15687b4aae4d127d552a8dcf27a (patch) | |
tree | dd3c89af5e01f80d9172adc65e8df542cd91cb5b /myisam/mi_search.c | |
parent | 12a215b0833d9aa688ba16fe56eb3411a83e7d4f (diff) | |
download | mariadb-git-45199f545cafb15687b4aae4d127d552a8dcf27a.tar.gz |
After merge fixes
Cleanup of mi_print_error() handling
Deleted 'merge' directory
BitKeeper/deleted/.del-mrg_close.c~1fa9230422daa62a:
Delete: merge/mrg_close.c
BitKeeper/deleted/.del-mrg_create.c~b747c8ec2b801f6:
Delete: merge/mrg_create.c
BitKeeper/deleted/.del-mrg_delete.c~38b4156885bb4537:
Delete: merge/mrg_delete.c
BitKeeper/deleted/.del-mrg_extra.c~7eb6181e1761907e:
Delete: merge/mrg_extra.c
BitKeeper/deleted/.del-mrg_info.c~37728e7238cc5a11:
Delete: merge/mrg_info.c
BitKeeper/deleted/.del-mrg_locking.c~112756a2d581e1d0:
Delete: merge/mrg_locking.c
BitKeeper/deleted/.del-mrg_open.c~6e1d5c8bfa62a519:
Delete: merge/mrg_open.c
BitKeeper/deleted/.del-mrg_panic.c~e204e43cd6d55406:
Delete: merge/mrg_panic.c
BitKeeper/deleted/.del-mrg_rrnd.c~6087c3dd7ecb77:
Delete: merge/mrg_rrnd.c
BitKeeper/deleted/.del-mrg_rsame.c~3e8ed4be2a0952b1:
Delete: merge/mrg_rsame.c
BitKeeper/deleted/.del-mrg_static.c~75a4b78a165dbd0:
Delete: merge/mrg_static.c
BitKeeper/deleted/.del-mrg_update.c~4110a4f1fbf1ab45:
Delete: merge/mrg_update.c
BitKeeper/deleted/.del-Makefile.am~41238af048e60515:
Delete: merge/Makefile.am
BitKeeper/deleted/.del-make-ccc~4f1acbfc127e25d5:
Delete: merge/make-ccc
BitKeeper/deleted/.del-mrg_def.h~a10557d12a87ef1c:
Delete: merge/mrg_def.h
BitKeeper/deleted/.del-.cvsignore~2f287ba794db3da7:
Delete: merge/.cvsignore
include/myisam.h:
Added 'share' to st_mi_keydef' to not have to pass 'st_myisam_info' to functions
myisam/ft_static.c:
Removed compiler warning
myisam/mi_delete.c:
Cleanup of mi_print_error() handling
Break if get_key() return 0
Don't test for HA_ERR_CRASHED; Print errors when my_errno is set
myisam/mi_extra.c:
Cleanup of mi_print_error() handling
myisam/mi_key.c:
Cleanup of mi_print_error() handling
myisam/mi_keycache.c:
Cleanup of mi_print_error() handling
myisam/mi_locking.c:
Cleanup of mi_print_error() handling
myisam/mi_open.c:
Added 'my_isam_share' to MI_KEYDEF
myisam/mi_page.c:
Cleanup of mi_print_error() handling
myisam/mi_range.c:
get_key() calls mi_print_error() if needed
myisam/mi_rkey.c:
Cleanup of mi_print_error() handling
myisam/mi_search.c:
Cleanup of mi_print_error() handling
Break if get_key() return 0
Don't test for HA_ERR_CRASHED; Print errors when my_errno is set
myisam/mi_update.c:
Cleanup of mi_print_error() handling
myisam/mi_write.c:
Cleanup of mi_print_error() handling
Break if get_key() return 0
Don't test for HA_ERR_CRASHED; Print errors when my_errno is set
myisam/myisamdef.h:
Cleanup of mi_print_error() handling
mysql-test/r/grant.result:
Update results after merge
mysql-test/r/timezone2.result:
Update results after merge
mysql-test/t/grant.test:
New error numbers
mysql-test/t/timezone2.test:
New error numbers
sql/item_func.cc:
Remove duplicate include file
sql/sql_acl.cc:
Remove warnings from valgrind
sql/tztime.cc:
Print wrong timezone names to log
Diffstat (limited to 'myisam/mi_search.c')
-rw-r--r-- | myisam/mi_search.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/myisam/mi_search.c b/myisam/mi_search.c index f252719d29c..0c82a4c4502 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -159,10 +159,9 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); + err: DBUG_PRINT("exit",("Error: %d",my_errno)); - if (my_errno == HA_ERR_CRASHED) - mi_print_error(info, HA_ERR_CRASHED); info->lastpos= HA_OFFSET_ERROR; info->page_changed=1; DBUG_RETURN (-1); @@ -236,7 +235,7 @@ int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff); if (length == 0 || page > end) { - mi_print_error(info, HA_ERR_CRASHED); + mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error",("Found wrong key: length: %u page: %p end: %p", length, page, end)); @@ -383,7 +382,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, if (page > end) { - mi_print_error(info, HA_ERR_CRASHED); + mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error",("Found wrong key: length: %u page: %p end: %p", length, page, end)); @@ -752,6 +751,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, { if (length > (uint) keyseg->length) { + mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Error */ } @@ -767,6 +767,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, ("Found too long null packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key",(char*) *page_pos,16); + mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; } @@ -823,6 +824,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, DBUG_PRINT("error",("Found too long packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key",(char*) *page_pos,16); + mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Error */ } @@ -878,6 +880,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, DBUG_PRINT("error",("Found too long binary packed key: %u of %u at %p", length, keyinfo->maxlength, *page_pos)); DBUG_DUMP("key",(char*) *page_pos,16); + mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Wrong key */ } @@ -939,6 +942,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, if (from_end != page_end) { DBUG_PRINT("error",("Error when unpacking key")); + mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Error */ } @@ -973,7 +977,7 @@ uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { - mi_print_error(info, HA_ERR_CRASHED); + mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } @@ -1011,7 +1015,7 @@ static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { - mi_print_error(info, HA_ERR_CRASHED); + mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(1); } @@ -1052,7 +1056,7 @@ uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, if (*return_key_length == 0) { DBUG_PRINT("error",("Couldn't find last key: page: %p", page)); - mi_print_error(info, HA_ERR_CRASHED); + mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } @@ -1185,11 +1189,7 @@ int _mi_search_next(register MI_INFO *info, register MI_KEYDEF *keyinfo, memcpy(lastkey,key,key_length); if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag, &info->int_keypos,lastkey))) - { - if (my_errno == HA_ERR_CRASHED) - mi_print_error(info, HA_ERR_CRASHED); DBUG_RETURN(-1); - } } else /* Previous key */ { @@ -1248,9 +1248,9 @@ int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo, } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page, - info->lastkey)) && - (my_errno == HA_ERR_CRASHED)) - mi_print_error(info, HA_ERR_CRASHED); + info->lastkey))) + DBUG_RETURN(-1); /* Crashed */ + info->int_keypos=page; info->int_maxpos=info->buff+mi_getint(info->buff)-1; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; |