Commit efcbc63a authored by marko's avatar marko

branches/zip: row_scan_and_check_index(): Add some comments on

prebuilt->index_usable, as suggested by Michael.
parent ab7803b0
...@@ -3944,6 +3944,10 @@ row_scan_and_check_index( ...@@ -3944,6 +3944,10 @@ row_scan_and_check_index(
*n_rows = 0; *n_rows = 0;
if (!row_merge_is_index_usable(prebuilt->trx, index)) { if (!row_merge_is_index_usable(prebuilt->trx, index)) {
/* A newly created index may lack some delete-marked
records that may exist in the read view of
prebuilt->trx. Thus, such indexes must not be
accessed by consistent read. */
return(is_ok); return(is_ok);
} }
...@@ -3954,6 +3958,7 @@ row_scan_and_check_index( ...@@ -3954,6 +3958,7 @@ row_scan_and_check_index(
in scanning the index entries */ in scanning the index entries */
prebuilt->index = index; prebuilt->index = index;
/* row_merge_is_index_usable() was already checked above. */
prebuilt->index_usable = TRUE; prebuilt->index_usable = TRUE;
prebuilt->sql_stat_start = TRUE; prebuilt->sql_stat_start = TRUE;
prebuilt->template_type = ROW_MYSQL_DUMMY_TEMPLATE; prebuilt->template_type = ROW_MYSQL_DUMMY_TEMPLATE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment