diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-09-05 16:08:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-10-01 23:38:26 +0200 |
commit | 74a552d5dc74fb54bc9256887cd957a3754bb70c (patch) | |
tree | f6d8499beb7b7f5d8317123e214716b5a5d19252 | |
parent | fe0ff580009a5d5bdb853224568a7eaaf147f060 (diff) | |
download | mariadb-git-74a552d5dc74fb54bc9256887cd957a3754bb70c.tar.gz |
cleanup: remove table->status from some engines
from engines that we don't need to merge from
a third-party repository on a regular basis
-rw-r--r-- | sql/ha_partition.cc | 3 | ||||
-rw-r--r-- | storage/archive/ha_archive.cc | 2 | ||||
-rw-r--r-- | storage/connect/ha_connect.cc | 3 | ||||
-rw-r--r-- | storage/federated/ha_federated.cc | 7 | ||||
-rw-r--r-- | storage/federatedx/ha_federatedx.cc | 8 | ||||
-rw-r--r-- | storage/heap/ha_heap.cc | 9 | ||||
-rw-r--r-- | storage/maria/ha_maria.cc | 11 | ||||
-rw-r--r-- | storage/myisammrg/ha_myisammrg.cc | 10 | ||||
-rw-r--r-- | storage/oqgraph/ha_oqgraph.cc | 5 |
9 files changed, 0 insertions, 58 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 23af3825756..15cbb03978e 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4953,7 +4953,6 @@ int ha_partition::rnd_next(uchar *buf) end: m_part_spec.start_part= NO_CURRENT_PART_ID; end_dont_reset_start_part: - table->status= STATUS_NOT_FOUND; DBUG_RETURN(result); } @@ -5857,7 +5856,6 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag) key not found. */ DBUG_PRINT("info", ("scan with no partition to scan")); - table->status= STATUS_NOT_FOUND; DBUG_RETURN(HA_ERR_END_OF_FILE); } if (m_part_spec.start_part == m_part_spec.end_part) @@ -5882,7 +5880,6 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag) if (start_part == MY_BIT_NONE) { DBUG_PRINT("info", ("scan with no partition to scan")); - table->status= STATUS_NOT_FOUND; DBUG_RETURN(HA_ERR_END_OF_FILE); } if (start_part > m_part_spec.start_part) diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 6c308e7eef1..6a866491d7c 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -1376,8 +1376,6 @@ int ha_archive::rnd_next(uchar *buf) current_position= aztell(&archive); rc= get_row(&archive, buf); - table->status=rc ? STATUS_NOT_FOUND: 0; - end: DBUG_RETURN(rc); } diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index ff15b27ca50..a6cd67b5f97 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -2527,7 +2527,6 @@ int ha_connect::ReadIndexed(uchar *buf, OPVAL op, const uchar *key, uint key_len if (xtrace > 1) htrc("ReadIndexed: op=%d rc=%d\n", op, rc); - table->status= (rc == RC_OK) ? 0 : STATUS_NOT_FOUND; return rc; } // end of ReadIndexed @@ -2638,7 +2637,6 @@ int ha_connect::index_first(uchar *buf) else if (indexing < 0) rc= HA_ERR_INTERNAL_ERROR; else if (CntRewindTable(xp->g, tdbp)) { - table->status= STATUS_NOT_FOUND; rc= HA_ERR_INTERNAL_ERROR; } else rc= rnd_next(buf); @@ -2833,7 +2831,6 @@ int ha_connect::rnd_next(uchar *buf) xp->fnd= xp->nfd= 0; } // endif nrd - table->status= (!rc) ? 0 : STATUS_NOT_FOUND; DBUG_RETURN(rc); } // end of rnd_next diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 4608aedd129..11687c63374 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -2388,9 +2388,7 @@ int ha_federated::index_read_idx(uchar *buf, uint index, const uchar *key, RESULT 0 ok In this case *result will contain the result set - table->status == 0 # error In this case *result will contain 0 - table->status == STATUS_NOT_FOUND */ int ha_federated::index_read_idx_with_result_set(uchar *buf, uint index, @@ -2444,13 +2442,11 @@ int ha_federated::index_read_idx_with_result_set(uchar *buf, uint index, mysql_free_result(*result); results.elements--; *result= 0; - table->status= STATUS_NOT_FOUND; DBUG_RETURN(retval); } DBUG_RETURN(0); error: - table->status= STATUS_NOT_FOUND; my_error(retval, MYF(0), error_buffer); DBUG_RETURN(retval); } @@ -2523,7 +2519,6 @@ int ha_federated::read_range_first(const key_range *start_key, DBUG_RETURN(retval); error: - table->status= STATUS_NOT_FOUND; DBUG_RETURN(retval); } @@ -2684,8 +2679,6 @@ int ha_federated::read_next(uchar *buf, MYSQL_RES *result) MYSQL_ROW row; DBUG_ENTER("ha_federated::read_next"); - table->status= STATUS_NOT_FOUND; // For easier return - /* Save current data cursor position. */ current_position= result->data_cursor; diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 8d41ca2d1b3..86d470bdfc9 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -2554,9 +2554,7 @@ int ha_federatedx::index_read_idx(uchar *buf, uint index, const uchar *key, RESULT 0 ok In this case *result will contain the result set - table->status == 0 # error In this case *result will contain 0 - table->status == STATUS_NOT_FOUND */ int ha_federatedx::index_read_idx_with_result_set(uchar *buf, uint index, @@ -2613,11 +2611,9 @@ int ha_federatedx::index_read_idx_with_result_set(uchar *buf, uint index, insert_dynamic(&results, (uchar*) result); *result= 0; - table->status= STATUS_NOT_FOUND; DBUG_RETURN(retval); error: - table->status= STATUS_NOT_FOUND; my_error(retval, MYF(0), error_buffer); DBUG_RETURN(retval); } @@ -2698,7 +2694,6 @@ int ha_federatedx::read_range_first(const key_range *start_key, DBUG_RETURN(retval); error: - table->status= STATUS_NOT_FOUND; DBUG_RETURN(retval); } @@ -2903,8 +2898,6 @@ int ha_federatedx::read_next(uchar *buf, FEDERATEDX_IO_RESULT *result) FEDERATEDX_IO_ROW *row; DBUG_ENTER("ha_federatedx::read_next"); - table->status= STATUS_NOT_FOUND; // For easier return - if ((retval= txn->acquire(share, TRUE, &io))) DBUG_RETURN(retval); @@ -2989,7 +2982,6 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos) DBUG_RETURN(retval); error: - table->status= STATUS_NOT_FOUND; DBUG_RETURN(retval); } diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 5631d60a10a..28f306b3e5c 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -290,7 +290,6 @@ int ha_heap::index_read_map(uchar *buf, const uchar *key, { DBUG_ASSERT(inited==INDEX); int error = heap_rkey(file,buf,active_index, key, keypart_map, find_flag); - table->status = error ? STATUS_NOT_FOUND : 0; return error; } @@ -300,7 +299,6 @@ int ha_heap::index_read_last_map(uchar *buf, const uchar *key, DBUG_ASSERT(inited==INDEX); int error= heap_rkey(file, buf, active_index, key, keypart_map, HA_READ_PREFIX_LAST); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -309,7 +307,6 @@ int ha_heap::index_read_idx_map(uchar *buf, uint index, const uchar *key, enum ha_rkey_function find_flag) { int error = heap_rkey(file, buf, index, key, keypart_map, find_flag); - table->status = error ? STATUS_NOT_FOUND : 0; return error; } @@ -317,7 +314,6 @@ int ha_heap::index_next(uchar * buf) { DBUG_ASSERT(inited==INDEX); int error=heap_rnext(file,buf); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -325,7 +321,6 @@ int ha_heap::index_prev(uchar * buf) { DBUG_ASSERT(inited==INDEX); int error=heap_rprev(file,buf); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -333,7 +328,6 @@ int ha_heap::index_first(uchar * buf) { DBUG_ASSERT(inited==INDEX); int error=heap_rfirst(file, buf, active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -341,7 +335,6 @@ int ha_heap::index_last(uchar * buf) { DBUG_ASSERT(inited==INDEX); int error=heap_rlast(file, buf, active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -353,7 +346,6 @@ int ha_heap::rnd_init(bool scan) int ha_heap::rnd_next(uchar *buf) { int error=heap_scan(file, buf); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -363,7 +355,6 @@ int ha_heap::rnd_pos(uchar * buf, uchar *pos) HEAP_PTR heap_position; memcpy(&heap_position, pos, sizeof(HEAP_PTR)); error=heap_rrnd(file, buf, heap_position); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index de901ba3b7b..713a31b2ddf 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2287,7 +2287,6 @@ int ha_maria::index_read_map(uchar * buf, const uchar * key, { DBUG_ASSERT(inited == INDEX); int error= maria_rkey(file, buf, active_index, key, keypart_map, find_flag); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2305,7 +2304,6 @@ int ha_maria::index_read_idx_map(uchar * buf, uint index, const uchar * key, error= maria_rkey(file, buf, index, key, keypart_map, find_flag); ma_set_index_cond_func(file, NULL, 0); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2317,7 +2315,6 @@ int ha_maria::index_read_last_map(uchar * buf, const uchar * key, DBUG_ASSERT(inited == INDEX); int error= maria_rkey(file, buf, active_index, key, keypart_map, HA_READ_PREFIX_LAST); - table->status= error ? STATUS_NOT_FOUND : 0; DBUG_RETURN(error); } @@ -2326,7 +2323,6 @@ int ha_maria::index_next(uchar * buf) { DBUG_ASSERT(inited == INDEX); int error= maria_rnext(file, buf, active_index); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2335,7 +2331,6 @@ int ha_maria::index_prev(uchar * buf) { DBUG_ASSERT(inited == INDEX); int error= maria_rprev(file, buf, active_index); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2344,7 +2339,6 @@ int ha_maria::index_first(uchar * buf) { DBUG_ASSERT(inited == INDEX); int error= maria_rfirst(file, buf, active_index); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2353,7 +2347,6 @@ int ha_maria::index_last(uchar * buf) { DBUG_ASSERT(inited == INDEX); int error= maria_rlast(file, buf, active_index); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2372,7 +2365,6 @@ int ha_maria::index_next_same(uchar * buf, { error= maria_rnext_same(file,buf); } while (error == HA_ERR_RECORD_DELETED); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2416,7 +2408,6 @@ int ha_maria::rnd_end() int ha_maria::rnd_next(uchar *buf) { int error= maria_scan(file, buf); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -2439,7 +2430,6 @@ int ha_maria::restart_rnd_next(uchar *buf) int ha_maria::rnd_pos(uchar *buf, uchar *pos) { int error= maria_rrnd(file, buf, my_get_ptr(pos, ref_length)); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } @@ -3189,7 +3179,6 @@ int ha_maria::ft_read(uchar * buf) error= ft_handler->please->read_next(ft_handler, (char*) buf); - table->status= error ? STATUS_NOT_FOUND : 0; return error; } diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 191ccd5ed89..3c151818457 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -1121,7 +1121,6 @@ int ha_myisammrg::index_read_map(uchar * buf, const uchar * key, { DBUG_ASSERT(this->file->children_attached); int error=myrg_rkey(file,buf,active_index, key, keypart_map, find_flag); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1131,7 +1130,6 @@ int ha_myisammrg::index_read_idx_map(uchar * buf, uint index, const uchar * key, { DBUG_ASSERT(this->file->children_attached); int error=myrg_rkey(file,buf,index, key, keypart_map, find_flag); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1141,7 +1139,6 @@ int ha_myisammrg::index_read_last_map(uchar *buf, const uchar *key, DBUG_ASSERT(this->file->children_attached); int error=myrg_rkey(file,buf,active_index, key, keypart_map, HA_READ_PREFIX_LAST); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1149,7 +1146,6 @@ int ha_myisammrg::index_next(uchar * buf) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rnext(file,buf,active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1157,7 +1153,6 @@ int ha_myisammrg::index_prev(uchar * buf) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rprev(file,buf, active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1165,7 +1160,6 @@ int ha_myisammrg::index_first(uchar * buf) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rfirst(file, buf, active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1173,7 +1167,6 @@ int ha_myisammrg::index_last(uchar * buf) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rlast(file, buf, active_index); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1187,7 +1180,6 @@ int ha_myisammrg::index_next_same(uchar * buf, { error= myrg_rnext_same(file,buf); } while (error == HA_ERR_RECORD_DELETED); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1203,7 +1195,6 @@ int ha_myisammrg::rnd_next(uchar *buf) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } @@ -1212,7 +1203,6 @@ int ha_myisammrg::rnd_pos(uchar * buf, uchar *pos) { DBUG_ASSERT(this->file->children_attached); int error=myrg_rrnd(file, buf, my_get_ptr(pos,ref_length)); - table->status=error ? STATUS_NOT_FOUND: 0; return error; } diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 085fd3d73a0..6294b0dc35b 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -822,7 +822,6 @@ int ha_oqgraph::index_next_same(byte *buf, const byte *key, uint key_len) DBUG_ASSERT(inited==INDEX); if (!(res= graph->fetch_row(row))) res= fill_record(buf, row); - table->status= res ? STATUS_NOT_FOUND : 0; return error_code(res); } @@ -914,7 +913,6 @@ int ha_oqgraph::index_read_idx(byte * buf, uint index, const byte * key, if (!parse_latch_string_to_legacy_int(latchFieldValue, latch)) { // Invalid, so warn & fail push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WRONG_ARGUMENTS, ER(ER_WRONG_ARGUMENTS), "OQGRAPH latch"); - table->status = STATUS_NOT_FOUND; if (ptrdiff) /* fixes debug build assert - should be a tidier way to do this */ { field[0]->move_field_offset(-ptrdiff); @@ -970,7 +968,6 @@ int ha_oqgraph::index_read_idx(byte * buf, uint index, const byte * key, if (!res && !(res= graph->fetch_row(row))) { res= fill_record(buf, row); } - table->status = res ? STATUS_NOT_FOUND : 0; return error_code(res); } @@ -1075,7 +1072,6 @@ int ha_oqgraph::rnd_next(byte *buf) if (!(res= graph->fetch_row(row))) res= fill_record(buf, row); - table->status= res ? STATUS_NOT_FOUND: 0; return error_code(res); } @@ -1085,7 +1081,6 @@ int ha_oqgraph::rnd_pos(byte * buf, byte *pos) open_query::row row; if (!(res= graph->fetch_row(row, pos))) res= fill_record(buf, row); - table->status=res ? STATUS_NOT_FOUND: 0; return error_code(res); } |