mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
addresses #1711
remove index_next_same for ha_tokudb, implementation in handler.cc is what we want. This fixes the issue. git-svn-id: file:///svn/mysql/tokudb-engine/src@11432 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
9208dec584
commit
95b01027b4
2 changed files with 0 additions and 45 deletions
|
@ -3341,50 +3341,6 @@ cleanup:
|
|||
TOKUDB_DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
//
|
||||
// Reads the next row matching to the key, on success, advances cursor
|
||||
// Parameters:
|
||||
// [out] buf - buffer for the next row, in MySQL format
|
||||
// [in] key - key value
|
||||
// keylen - length of key
|
||||
// Returns:
|
||||
// 0 on success
|
||||
// HA_ERR_END_OF_FILE if not found
|
||||
// error otherwise
|
||||
//
|
||||
int ha_tokudb::index_next_same(uchar * buf, const uchar * key, uint keylen) {
|
||||
TOKUDB_DBUG_ENTER("ha_tokudb::index_next_same %p", this);
|
||||
int error;
|
||||
struct smart_dbt_info info;
|
||||
HANDLE_INVALID_CURSOR();
|
||||
|
||||
statistic_increment(table->in_use->status_var.ha_read_next_count, &LOCK_status);
|
||||
info.ha = this;
|
||||
info.buf = buf;
|
||||
info.keynr = active_index;
|
||||
/* QQQ NEXT_DUP on nodup returns EINVAL for tokudb */
|
||||
if (keylen == table->key_info[active_index].key_length &&
|
||||
!(table->key_info[active_index].flags & HA_NOSAME) &&
|
||||
!(table->key_info[active_index].flags & HA_END_SPACE_KEY)) {
|
||||
|
||||
u_int32_t flags = SET_READ_FLAG(0);
|
||||
error = handle_cursor_error(cursor->c_getf_next_dup(cursor, flags, SMART_DBT_CALLBACK, &info),HA_ERR_END_OF_FILE,active_index);
|
||||
if (!error && !key_read && active_index != primary_key && !(table->key_info[active_index].flags & HA_CLUSTERING)) {
|
||||
error = read_full_row(buf);
|
||||
}
|
||||
} else {
|
||||
u_int32_t flags = SET_READ_FLAG(0);
|
||||
error = handle_cursor_error(cursor->c_getf_next(cursor, flags, SMART_DBT_CALLBACK, &info),HA_ERR_END_OF_FILE,active_index);
|
||||
if (!error && !key_read && active_index != primary_key && !(table->key_info[active_index].flags & HA_CLUSTERING)) {
|
||||
error = read_full_row(buf);
|
||||
}
|
||||
if (!error &&::key_cmp_if_same(table, key, active_index, keylen))
|
||||
error = HA_ERR_END_OF_FILE;
|
||||
}
|
||||
cleanup:
|
||||
TOKUDB_DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
//
|
||||
// Reads the previous row from the active index (cursor) into buf, and advances cursor
|
||||
// Parameters:
|
||||
|
|
|
@ -341,7 +341,6 @@ public:
|
|||
int index_read_last(uchar * buf, const uchar * key, uint key_len);
|
||||
#endif
|
||||
int index_next(uchar * buf);
|
||||
int index_next_same(uchar * buf, const uchar * key, uint keylen);
|
||||
int index_prev(uchar * buf);
|
||||
int index_first(uchar * buf);
|
||||
int index_last(uchar * buf);
|
||||
|
|
Loading…
Reference in a new issue