diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
commit | 76f0b94bb0b2994d639353530c5b251d0f1a204b (patch) | |
tree | 9ed50628aac34f89a37637bab2fc4915b86b5eb4 /storage/myisam/mi_key.c | |
parent | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff) | |
parent | 5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff) | |
download | mariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz |
merge with 5.3
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
Diffstat (limited to 'storage/myisam/mi_key.c')
-rw-r--r-- | storage/myisam/mi_key.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c index f64a602e2be..e51534b3180 100644 --- a/storage/myisam/mi_key.c +++ b/storage/myisam/mi_key.c @@ -509,15 +509,26 @@ int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf) ICP_OUT_OF_RANGE Index condition is not satisfied, end the scan. */ -int mi_check_index_cond(register MI_INFO *info, uint keynr, uchar *record) +ICP_RESULT mi_check_index_cond(register MI_INFO *info, uint keynr, + uchar *record) { + ICP_RESULT res; if (_mi_put_key_in_record(info, keynr, FALSE, record)) { + /* Impossible case; Can only happen if bug in code */ mi_print_error(info->s, HA_ERR_CRASHED); - my_errno=HA_ERR_CRASHED; - return ICP_ERROR; + info->lastpos= HA_OFFSET_ERROR; /* No active record */ + my_errno= HA_ERR_CRASHED; + res= ICP_ERROR; } - return info->index_cond_func(info->index_cond_func_arg); + else if ((res= info->index_cond_func(info->index_cond_func_arg)) == + ICP_OUT_OF_RANGE) + { + /* We got beyond the end of scanned range */ + info->lastpos= HA_OFFSET_ERROR; /* No active record */ + my_errno= HA_ERR_END_OF_FILE; + } + return res; } /* |