diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 4e21e3c2a1a4..895a4f624893 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -813,6 +813,7 @@ enum enum_commands { Q_DISABLE_DEPRECATE_EOF, Q_ENABLE_CLIENT_INTERACTIVE, Q_RESET_CONNECTION, + Q_OUTPUT, /* redirect output to a file */ Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Q_COMMENT_WITH_COMMAND, @@ -930,6 +931,7 @@ const char *command_names[]= "disable_deprecate_eof", "enable_client_interactive", "resetconnection", + "output", 0 }; @@ -974,6 +976,7 @@ struct st_command my_bool abort_on_error, used_replace; struct st_expected_errors expected_errors; char require_file[FN_REFLEN]; + char output_file[FN_REFLEN]; enum enum_commands type; }; @@ -1066,6 +1069,9 @@ void free_replace_regex(); /* Used by sleep */ void check_eol_junk_line(const char *eol); +static void var_set(const char *var_name, const char *var_name_end, + const char *var_val, const char *var_val_end); + void free_all_replace(){ free_replace(); free_replace_regex(); @@ -1737,8 +1743,7 @@ void handle_command_error(struct st_command *command, uint error) { DBUG_PRINT("info", ("command \"%.*s\" failed with expected error: %d", command->first_word_len, command->query, error)); - revert_properties(); - DBUG_VOID_RETURN; + goto end; } if (command->expected_errors.count > 0) die("command \"%.*s\" failed with wrong error: %d. my_errno=%d", @@ -1752,6 +1757,16 @@ void handle_command_error(struct st_command *command, uint error) command->first_word_len, command->query, command->expected_errors.err[0].code.errnum); } +end: + // Save error code + { + const char var_name[]= "__error"; + char buf[10]; + int err_len= snprintf(buf, 10, "%u", error); + buf[err_len > 9 ? 9 : err_len]= '0'; + var_set(var_name, var_name + 7, buf, buf + err_len); + } + revert_properties(); DBUG_VOID_RETURN; } @@ -3908,6 +3923,14 @@ void do_exec(struct st_command *command) die("command \"%s\" succeeded - should have failed with errno %d...", command->first_argument, command->expected_errors.err[0].code.errnum); } + // Save error code + { + const char var_name[]= "__error"; + char buf[10]; + int err_len= snprintf(buf, 10, "%u", error); + buf[err_len > 9 ? 9 : err_len]= '0'; + var_set(var_name, var_name + 7, buf, buf + err_len); + } dynstr_free(&ds_cmd); DBUG_VOID_RETURN; @@ -9055,7 +9078,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) Create a temporary dynamic string to contain the output from this query. */ - if (command->require_file[0]) + if (command->require_file[0] || command->output_file[0]) { init_dynamic_string(&ds_result, "", 1024, 1024); ds= &ds_result; @@ -9240,6 +9263,13 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) check_require(ds, command->require_file); } + if (command->output_file[0]) + { + /* An output file was specified for _this_ query */ + str_to_file2(command->output_file, ds_result.str, ds_result.length, false); + command->output_file[0]= 0; + } + if (ds == &ds_result) dynstr_free(&ds_result); DBUG_VOID_RETURN; @@ -9663,9 +9693,11 @@ int main(int argc, char **argv) my_bool q_send_flag= 0, abort_flag= 0; uint command_executed= 0, last_command_executed= 0; char save_file[FN_REFLEN]; + char output_file[FN_REFLEN]; MY_INIT(argv[0]); save_file[0]= 0; + output_file[0]= 0; TMPDIR[0]= 0; init_signal_handling(); @@ -10084,6 +10116,11 @@ int main(int argc, char **argv) strmake(command->require_file, save_file, sizeof(save_file) - 1); *save_file= 0; } + if (*output_file) + { + strmake(command->output_file, output_file, sizeof(output_file) - 1); + *output_file= 0; + } run_query(cur_con, command, flags); display_opt_trace(cur_con, command, flags); command_executed++; @@ -10314,6 +10351,19 @@ int main(int argc, char **argv) break; case Q_ENABLE_CLIENT_INTERACTIVE: enable_client_interactive = TRUE; + break; + case Q_OUTPUT: + { + static DYNAMIC_STRING ds_to_file; + const struct command_arg output_file_args[] = + {{ "to_file", ARG_STRING, TRUE, &ds_to_file, "Output filename" }}; + check_command_args(command, command->first_argument, + output_file_args, 1, ' '); + strmake(output_file, ds_to_file.str, FN_REFLEN); + dynstr_free(&ds_to_file); + break; + } + default: processed= 0; break; diff --git a/mysql-test/suite/rocksdb/include/bypass_create_table.inc b/mysql-test/suite/rocksdb/include/bypass_create_table.inc index 233635b369e4..dd6c23ae269b 100644 --- a/mysql-test/suite/rocksdb/include/bypass_create_table.inc +++ b/mysql-test/suite/rocksdb/include/bypass_create_table.inc @@ -181,6 +181,25 @@ CREATE TABLE `link_table5` ( ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); @@ -188,7 +207,36 @@ insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); + + +CREATE TABLE `link_table5_rev` ( + `id1` bigint(20) unsigned NOT NULL DEFAULT '0', + `id1_type` int(10) unsigned NOT NULL DEFAULT '0', + `id2` bigint(20) unsigned NOT NULL DEFAULT '0', + `id2_type` int(10) unsigned NOT NULL DEFAULT '0', + `link_type` bigint(20) unsigned NOT NULL DEFAULT '0', + `visibility` tinyint(3) NOT NULL DEFAULT '0', + `data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', + `time` int(10) unsigned NOT NULL DEFAULT '0', + `version` bigint(20) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; CREATE TABLE `link_table3` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0', diff --git a/mysql-test/suite/rocksdb/include/verify_bypass_query.inc b/mysql-test/suite/rocksdb/include/verify_bypass_query.inc new file mode 100644 index 000000000000..b513ccb95bb8 --- /dev/null +++ b/mysql-test/suite/rocksdb/include/verify_bypass_query.inc @@ -0,0 +1,101 @@ +# Run bypass query and print rows being read +# This is needed to make sure bypass query read exactly the right amount of +# rows and avoid performance regression +# +# Parameters +# $bypass_query +# Bypass query to run + +--disable_query_log +SELECT @@rocksdb_select_bypass_policy INTO @__rocksdb_select_bypass_policy; +SET GLOBAL rocksdb_select_bypass_policy=2; + +SELECT variable_value INTO @bypass_rows_read_0 FROM +information_schema.global_status WHERE +variable_name="rocksdb_rows_read"; +SELECT variable_value INTO @bypass_rows_sent_0 FROM +information_schema.global_status WHERE +variable_name="rows_sent"; +SELECT variable_value INTO @bypass_executed_0 FROM +information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; + +--echo ========== Verifying Bypass Query ========== +--echo WITH BYPASS: + +--enable_query_log +--output $MYSQL_TMP_DIR/bypass_query_rows +--eval $bypass_query +--disable_query_log +--cat_file $MYSQL_TMP_DIR/bypass_query_rows + +SELECT variable_value INTO @bypass_rows_read_1 FROM +information_schema.global_status WHERE +variable_name="rocksdb_rows_read"; +SELECT variable_value INTO @bypass_rows_sent_1 FROM +information_schema.global_status WHERE +variable_name="rows_sent"; +SELECT variable_value INTO @bypass_executed_1 FROM +information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; + +--let rows_read_bypass=`SELECT @bypass_rows_read_1 - @bypass_rows_read_0` +SELECT @bypass_rows_read_1 - @bypass_rows_read_0 AS ROWS_READ; + +--let $assert_cond= @bypass_executed_1 - @bypass_executed_0 = 1 +--let $assert_text = Verify executed in bypass +--source include/assert.inc + +SELECT variable_value INTO @bypass_rows_read_2 FROM +information_schema.global_status WHERE +variable_name="rocksdb_rows_read"; +SELECT variable_value INTO @bypass_rows_sent_2 FROM +information_schema.global_status WHERE +variable_name="rows_sent"; +SELECT variable_value INTO @bypass_executed_2 FROM +information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; + +--echo WITHOUT BYPASS: +SET GLOBAL rocksdb_select_bypass_policy=0; + +--enable_query_log +--output $MYSQL_TMP_DIR/regular_query_rows +--eval $bypass_query +--disable_query_log +--cat_file $MYSQL_TMP_DIR/regular_query_rows + +--diff_files $MYSQL_TMP_DIR/bypass_query_rows $MYSQL_TMP_DIR/regular_query_rows +--remove_file $MYSQL_TMP_DIR/bypass_query_rows +--remove_file $MYSQL_TMP_DIR/regular_query_rows + +SELECT variable_value INTO @bypass_rows_read_3 FROM +information_schema.global_status WHERE +variable_name="rocksdb_rows_read"; +SELECT variable_value INTO @bypass_rows_sent_3 FROM +information_schema.global_status WHERE +variable_name="rows_sent"; +SELECT variable_value INTO @bypass_executed_3 FROM +information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; + +--let $assert_cond= @bypass_executed_3 - @bypass_executed_2 = 0 +--let $assert_text = Verify not executed in bypass +--source include/assert.inc + +--let rows_read_no_bypass=`SELECT @bypass_rows_read_3 - @bypass_rows_read_2` +# This doesn't seem to be stable outside bypass +# SELECT @bypass_rows_read_3 - @bypass_rows_read_2 AS ROWS_READ; + +SET GLOBAL rocksdb_select_bypass_policy=@__rocksdb_select_bypass_policy; + +let $assert_cond= @bypass_rows_sent_3 - @bypass_rows_sent_2 = + @bypass_rows_sent_1 - @bypass_rows_sent_0; +--let $assert_text = Verify bypass and regular query return same number of rows +--source include/assert.inc + +--let $assert_cond= $ROWS_READ_BYPASS <= $ROWS_READ_NO_BYPASS; +--let $assert_text = Verify bypass reads no more than regular query +--source include/assert.inc + +--enable_query_log diff --git a/mysql-test/suite/rocksdb/r/bypass_select_basic.result b/mysql-test/suite/rocksdb/r/bypass_select_basic.result index 987ba3f4bf43..bdcb4409fe5a 100644 --- a/mysql-test/suite/rocksdb/r/bypass_select_basic.result +++ b/mysql-test/suite/rocksdb/r/bypass_select_basic.result @@ -152,6 +152,25 @@ CREATE TABLE `link_table5` ( PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); @@ -159,6 +178,33 @@ insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; CREATE TABLE `link_table3` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0', `id1_type` int(10) unsigned NOT NULL DEFAULT '0', @@ -645,38 +691,94 @@ SELECT @bypass_executed_new - @bypass_executed_old; 5 SELECT @bypass_rows_read_new - @bypass_rows_read_old; @bypass_rows_read_new - @bypass_rows_read_old -23 +22 SELECT @bypass_rows_read_stat_new - @bypass_rows_read_stat_old; @bypass_rows_read_stat_new - @bypass_rows_read_stat_old -23 +22 SELECT @bypass_queries_point_new - @bypass_queries_point_old; @bypass_queries_point_new - @bypass_queries_point_old 0 SELECT @bypass_queries_range_new - @bypass_queries_range_old; @bypass_queries_range_new - @bypass_queries_range_old -5 +4 SELECT @bypass_rows_sent_new - @bypass_rows_sent_old; @bypass_rows_sent_new - @bypass_rows_sent_old 22 # Point query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2=2 AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2=2 AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2, 3, 4) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 1 3 1 2 a11 125 1 4 1 2 a11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2 IN (2, 3, 4) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2 IN (2) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1 IN (1) AND id2 IN (2) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1) AND id2 IN (2) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1, 2) AND id2 IN (2, 3, 4) AND link_type=3; id1 id2 id1_type id2_type data version @@ -686,21 +788,86 @@ id1 id2 id1_type id2_type data version 2 2 1 2 a10 125 2 3 1 2 a11 125 2 4 1 2 a11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1 IN (1, 2) AND id2 IN (2, 3, 4) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query # Prefix range query with SK +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 +ORDER BY TIME DESC LIMIT 10; +id1 id2 link_type visibility data time version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME DESC LIMIT 10; id1 id2 link_type visibility data time version 1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME ASC LIMIT 10; id1 id2 link_type visibility data time version 1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 +ORDER BY TIME ASC LIMIT 10; +id1 id2 link_type visibility data time version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with SK with limits +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -714,6 +881,11 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -727,6 +899,28 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -737,17 +931,65 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1; id1 id2 link_type visibility data time version 1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0; id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -761,6 +1003,42 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,10; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,5; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -771,17 +1049,67 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,1; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0,1; id1 id2 link_type visibility data time version 1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; id1 id2 link_type visibility data time version +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,0; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,10; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -794,6 +1122,25 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,5; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -804,17 +1151,63 @@ id1 id2 link_type visibility data time version 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,1; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,1; id1 id2 link_type visibility data time version 1 9 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,0; +id1 id2 link_type visibility data time version +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,10; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -823,6 +1216,11 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -831,38 +1229,157 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,5; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,1; id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,1; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,0; +id1 id2 link_type visibility data time version +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,10; id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,10; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,5; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,5; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,1; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,1; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,0; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with PK +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +id1 id2 link_type +1 10 3 +1 9 3 +1 8 3 +1 7 3 +1 6 3 +1 5 3 +1 4 3 +1 3 3 +1 2 3 +1 1 3 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; id1 id2 link_type @@ -876,6 +1393,11 @@ id1 id2 link_type 1 3 3 1 2 3 1 1 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; id1 id2 link_type @@ -889,7 +1411,29 @@ id1 id2 link_type 1 8 3 1 9 3 1 10 3 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +id1 id2 link_type +1 1 3 +1 2 3 +1 3 3 +1 4 3 +1 5 3 +1 6 3 +1 7 3 +1 8 3 +1 9 3 +1 10 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with PK + value +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; @@ -904,6 +1448,29 @@ id1 id2 link_type visibility data time version 1 3 3 4 a11 11 125 1 2 3 3 a10 10 125 1 1 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 5 3 3 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 2 3 3 a10 10 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; @@ -918,6 +1485,27 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 9 3 4 a14 14 125 1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +id1 id2 link_type visibility data time version +1 1 3 4 a10 10 125 +1 2 3 3 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 5 3 3 a12 12 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Transaction BEGIN; SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table @@ -1029,6 +1617,8 @@ id1 SELECT /*+ bypass */ id1 FROM link_table where link_type="3" AND id1=NULL; id1 # Full table scan +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1_type=1; id1 id2 id1_type id2_type data version @@ -1082,57 +1672,221 @@ id1 id2 id1_type id2_type data version 9 7 1 2 012 125 9 8 1 2 01 125 9 9 1 2 0 125 +ROWS_READ +50 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1_type=1; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +1 6 1 2 a12 125 +1 7 1 2 a12 125 +1 8 1 2 a13 125 +1 9 1 2 a14 125 +1 10 1 2 a15 125 +2 1 1 2 a10 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +2 5 1 2 a12 125 +2 6 1 2 a12 125 +2 7 1 2 a12 125 +2 8 1 2 a13 125 +2 9 1 2 a14 125 +2 10 1 2 a15 125 +3 1 1 2 a15 125 +3 2 1 2 a14 125 +3 3 1 2 a13 125 +3 4 1 2 a12 125 +3 5 1 2 a12 125 +3 6 1 2 a12 125 +3 7 1 2 a11 125 +3 8 1 2 a11 125 +3 9 1 2 a10 125 +3 10 1 2 a10 125 +2 1 1 2 a10 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +2 5 1 2 a12 125 +2 6 1 2 a12 125 +2 7 1 2 a12 125 +2 8 1 2 a13 125 +2 9 1 2 a14 125 +2 10 1 2 a15 125 +9 0 1 2 0123456789 125 +9 1 1 2 012345678 125 +9 2 1 2 01234567 125 +9 3 1 2 0123456 125 +9 4 1 2 012345 125 +9 5 1 2 01234 125 +9 6 1 2 0123 125 +9 7 1 2 012 125 +9 8 1 2 01 125 +9 9 1 2 0 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] MultiGet select @@rocksdb_select_bypass_multiget_min into @save_rocksdb_select_bypass_multiget_min; set global rocksdb_select_bypass_multiget_min=0; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1) and link_type=3; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table WHERE id1=1 and id2 IN (1) and link_type=3; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3 ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3 ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] BEGIN; +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] ROLLBACK; BEGIN; UPDATE link_table set data="cde" WHERE id1=1 and id2=2 and link_type = 3; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 cde 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 cde 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] ROLLBACK; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] set global rocksdb_select_bypass_multiget_min= @save_rocksdb_select_bypass_multiget_min; # SHOW PROCESSLIST and KILL @@ -1158,6 +1912,7 @@ DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table6; DROP TABLE link_table4; SELECT @@rocksdb_select_bypass_policy; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_basic_bloom.result b/mysql-test/suite/rocksdb/r/bypass_select_basic_bloom.result index 987ba3f4bf43..bdcb4409fe5a 100644 --- a/mysql-test/suite/rocksdb/r/bypass_select_basic_bloom.result +++ b/mysql-test/suite/rocksdb/r/bypass_select_basic_bloom.result @@ -152,6 +152,25 @@ CREATE TABLE `link_table5` ( PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); @@ -159,6 +178,33 @@ insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; CREATE TABLE `link_table3` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0', `id1_type` int(10) unsigned NOT NULL DEFAULT '0', @@ -645,38 +691,94 @@ SELECT @bypass_executed_new - @bypass_executed_old; 5 SELECT @bypass_rows_read_new - @bypass_rows_read_old; @bypass_rows_read_new - @bypass_rows_read_old -23 +22 SELECT @bypass_rows_read_stat_new - @bypass_rows_read_stat_old; @bypass_rows_read_stat_new - @bypass_rows_read_stat_old -23 +22 SELECT @bypass_queries_point_new - @bypass_queries_point_old; @bypass_queries_point_new - @bypass_queries_point_old 0 SELECT @bypass_queries_range_new - @bypass_queries_range_old; @bypass_queries_range_new - @bypass_queries_range_old -5 +4 SELECT @bypass_rows_sent_new - @bypass_rows_sent_old; @bypass_rows_sent_new - @bypass_rows_sent_old 22 # Point query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2=2 AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2=2 AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2, 3, 4) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 1 3 1 2 a11 125 1 4 1 2 a11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2 IN (2, 3, 4) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1=1 AND id2 IN (2) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1 IN (1) AND id2 IN (2) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1) AND id2 IN (2) AND link_type=3; id1 id2 id1_type id2_type data version 1 2 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1, 2) AND id2 IN (2, 3, 4) AND link_type=3; id1 id2 id1_type id2_type data version @@ -686,21 +788,86 @@ id1 id2 id1_type id2_type data version 2 2 1 2 a10 125 2 3 1 2 a11 125 2 4 1 2 a11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1 IN (1, 2) AND id2 IN (2, 3, 4) AND link_type=3; +id1 id2 id1_type id2_type data version +1 2 1 2 a10 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query # Prefix range query with SK +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 +ORDER BY TIME DESC LIMIT 10; +id1 id2 link_type visibility data time version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME DESC LIMIT 10; id1 id2 link_type visibility data time version 1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME ASC LIMIT 10; id1 id2 link_type visibility data time version 1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 +ORDER BY TIME ASC LIMIT 10; +id1 id2 link_type visibility data time version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with SK with limits +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -714,6 +881,11 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -727,6 +899,28 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -737,17 +931,65 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1; id1 id2 link_type visibility data time version 1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0; id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -761,6 +1003,42 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,10; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,5; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -771,17 +1049,67 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 0,1; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0,1; id1 id2 link_type visibility data time version 1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; id1 id2 link_type visibility data time version +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,0; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,10; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -794,6 +1122,25 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,5; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -804,17 +1151,63 @@ id1 id2 link_type visibility data time version 1 7 3 4 a12 12 125 1 6 3 4 a12 12 125 1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,1; +id1 id2 link_type visibility data time version +1 9 3 4 a14 14 125 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,1; id1 id2 link_type visibility data time version 1 9 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 1,0; +id1 id2 link_type visibility data time version +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,10; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -823,6 +1216,11 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 @@ -831,38 +1229,157 @@ id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 1 3 3 4 a11 11 125 1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,5; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,1; id1 id2 link_type visibility data time version 1 4 3 4 a11 11 125 +ROWS_READ +6 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,1; +id1 id2 link_type visibility data time version +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 5,0; +id1 id2 link_type visibility data time version +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,10; id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,10; +id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,5; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,5; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,1; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,1; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 +ORDER BY TIME DESC LIMIT 10,0; +id1 id2 link_type visibility data time version +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,0; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with PK +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +id1 id2 link_type +1 10 3 +1 9 3 +1 8 3 +1 7 3 +1 6 3 +1 5 3 +1 4 3 +1 3 3 +1 2 3 +1 1 3 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; id1 id2 link_type @@ -876,6 +1393,11 @@ id1 id2 link_type 1 3 3 1 2 3 1 1 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; id1 id2 link_type @@ -889,7 +1411,29 @@ id1 id2 link_type 1 8 3 1 9 3 1 10 3 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +id1 id2 link_type +1 1 3 +1 2 3 +1 3 3 +1 4 3 +1 5 3 +1 6 3 +1 7 3 +1 8 3 +1 9 3 +1 10 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Prefix range query with PK + value +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; @@ -904,6 +1448,29 @@ id1 id2 link_type visibility data time version 1 3 3 4 a11 11 125 1 2 3 3 a10 10 125 1 1 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +id1 id2 link_type visibility data time version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 5 3 3 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 2 3 3 a10 10 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; @@ -918,6 +1485,27 @@ id1 id2 link_type visibility data time version 1 8 3 4 a13 13 125 1 9 3 4 a14 14 125 1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (PRIMARY) +WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +id1 id2 link_type visibility data time version +1 1 3 4 a10 10 125 +1 2 3 3 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 5 3 3 a12 12 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Transaction BEGIN; SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table @@ -1029,6 +1617,8 @@ id1 SELECT /*+ bypass */ id1 FROM link_table where link_type="3" AND id1=NULL; id1 # Full table scan +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1_type=1; id1 id2 id1_type id2_type data version @@ -1082,57 +1672,221 @@ id1 id2 id1_type id2_type data version 9 7 1 2 012 125 9 8 1 2 01 125 9 9 1 2 0 125 +ROWS_READ +50 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table +WHERE id1_type=1; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +1 6 1 2 a12 125 +1 7 1 2 a12 125 +1 8 1 2 a13 125 +1 9 1 2 a14 125 +1 10 1 2 a15 125 +2 1 1 2 a10 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +2 5 1 2 a12 125 +2 6 1 2 a12 125 +2 7 1 2 a12 125 +2 8 1 2 a13 125 +2 9 1 2 a14 125 +2 10 1 2 a15 125 +3 1 1 2 a15 125 +3 2 1 2 a14 125 +3 3 1 2 a13 125 +3 4 1 2 a12 125 +3 5 1 2 a12 125 +3 6 1 2 a12 125 +3 7 1 2 a11 125 +3 8 1 2 a11 125 +3 9 1 2 a10 125 +3 10 1 2 a10 125 +2 1 1 2 a10 125 +2 2 1 2 a10 125 +2 3 1 2 a11 125 +2 4 1 2 a11 125 +2 5 1 2 a12 125 +2 6 1 2 a12 125 +2 7 1 2 a12 125 +2 8 1 2 a13 125 +2 9 1 2 a14 125 +2 10 1 2 a15 125 +9 0 1 2 0123456789 125 +9 1 1 2 012345678 125 +9 2 1 2 01234567 125 +9 3 1 2 0123456 125 +9 4 1 2 012345 125 +9 5 1 2 01234 125 +9 6 1 2 0123 125 +9 7 1 2 012 125 +9 8 1 2 01 125 +9 9 1 2 0 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] MultiGet select @@rocksdb_select_bypass_multiget_min into @save_rocksdb_select_bypass_multiget_min; set global rocksdb_select_bypass_multiget_min=0; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1) and link_type=3; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table WHERE id1=1 and id2 IN (1) and link_type=3; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3 ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3 ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] BEGIN; +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] ROLLBACK; BEGIN; UPDATE link_table set data="cde" WHERE id1=1 and id2=2 and link_type = 3; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 cde 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 cde 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] ROLLBACK; +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +id1 id2 id1_type id2_type data version +1 1 1 2 a10 125 +1 2 1 2 bcd 125 +1 3 1 2 a11 125 +1 4 1 2 a11 125 +1 5 1 2 a12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; id1 id2 id1_type id2_type data version 1 1 1 2 a10 125 1 2 1 2 bcd 125 1 3 1 2 a11 125 1 4 1 2 a11 125 1 5 1 2 a12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] set global rocksdb_select_bypass_multiget_min= @save_rocksdb_select_bypass_multiget_min; # SHOW PROCESSLIST and KILL @@ -1158,6 +1912,7 @@ DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table6; DROP TABLE link_table4; SELECT @@rocksdb_select_bypass_policy; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_range_pk.result b/mysql-test/suite/rocksdb/r/bypass_select_range_pk.result new file mode 100644 index 000000000000..489b71ca2bbb --- /dev/null +++ b/mysql-test/suite/rocksdb/r/bypass_select_range_pk.result @@ -0,0 +1,4155 @@ +CREATE TABLE `link_table` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE TABLE `link_table2` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) +COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=9; +insert into link_table values (1, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (1, 1, 2, 2, 3, 3, 'a10', 10, 125); +insert into link_table values (1, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 5, 2, 3, 3, 'a12', 12, 125); +insert into link_table values (1, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (1, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (1, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 4, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 4, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 4, 4, 'a15', 15, 125); +insert into link_table values (3, 1, 10, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 9, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 8, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 7, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 4, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 3, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (3, 1, 2, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (3, 1, 1, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (9, 1, 9, 2, 5, 6, '0 ', 10, 125); +insert into link_table values (9, 1, 8, 2, 5, 6, '01 ', 11, 125); +insert into link_table values (9, 1, 7, 2, 5, 6, '012 ', 11, 125); +insert into link_table values (9, 1, 6, 2, 5, 6, '0123 ', 12, 125); +insert into link_table values (9, 1, 5, 2, 5, 6, '01234 ', 12, 125); +insert into link_table values (9, 1, 4, 2, 5, 6, '012345 ', 12, 125); +insert into link_table values (9, 1, 3, 2, 5, 6, '0123456 ', 13, 125); +insert into link_table values (9, 1, 2, 2, 5, 6, '01234567 ', 14, 125); +insert into link_table values (9, 1, 1, 2, 5, 6, '012345678 ', 15, 125); +insert into link_table values (9, 1, 0, 2, 5, 6, '0123456789 ', 15, 125); +insert into link_table2 select * from link_table; +CREATE TABLE `id_table` ( +`id` bigint(20) NOT NULL DEFAULT '0', +`type` int(11) NOT NULL DEFAULT '0', +`row_created_time` int(11) NOT NULL DEFAULT '0', +`hash_key` varchar(255) NOT NULL DEFAULT '', +`is_deleted` tinyint(4) DEFAULT '0', +PRIMARY KEY (`id`), +KEY `type_id` (`type`,`id`) +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +KEY_BLOCK_SIZE=8; +insert into id_table values (1, 1, 10, '111', 0); +insert into id_table values (2, 1, 10, '111', 1); +insert into id_table values (3, 1, 10, '111', 0); +insert into id_table values (4, 1, 10, '111', 1); +insert into id_table values (5, 1, 10, '111', 0); +insert into id_table values (6, 1, 10, '111', 1); +insert into id_table values (7, 1, 10, '111', 0); +insert into id_table values (8, 1, 10, '111', 1); +insert into id_table values (9, 1, 10, '111', 0); +insert into id_table values (10, 1, 10, '111', 1); +CREATE TABLE `node_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +`update_time` int(10) unsigned NOT NULL DEFAULT '0', +`data` mediumtext COLLATE latin1_bin NOT NULL, +PRIMARY KEY (`type`,`id`) COMMENT 'cf_node_type_id', +KEY `id` (`id`) COMMENT 'cf_node' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into node_table values (1, 1, 1, 10, 'data'); +insert into node_table values (2, 1, 1, 10, 'data'); +insert into node_table values (3, 1, 1, 10, 'data'); +insert into node_table values (4, 1, 1, 10, 'data'); +insert into node_table values (5, 1, 1, 10, 'data'); +insert into node_table values (6, 1, 1, 10, 'data'); +insert into node_table values (7, 1, 1, 10, 'data'); +insert into node_table values (8, 1, 1, 10, 'data'); +insert into node_table values (9, 1, 1, 10, 'data'); +insert into node_table values (10, 1, 1, 10, 'data'); +CREATE TABLE `count_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`count` int(10) unsigned NOT NULL DEFAULT '0', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`id`,`link_type`) COMMENT 'cf_count_table' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into count_table values (2, 1, 1, 1, 10, 20); +insert into count_table values (3, 1, 1, 1, 10, 20); +insert into count_table values (4, 1, 1, 1, 10, 20); +insert into count_table values (5, 1, 1, 1, 10, 20); +insert into count_table values (6, 1, 1, 1, 10, 20); +insert into count_table values (7, 1, 1, 1, 10, 20); +insert into count_table values (8, 1, 1, 1, 10, 20); +insert into count_table values (9, 1, 1, 1, 10, 20); +insert into count_table values (10, 1, 1, 1, 10, 20); +CREATE TABLE `link_table5` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; +CREATE TABLE `link_table3` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table3 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table3 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table3 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table3 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table3 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table3 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table3 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +CREATE TABLE `link_table6` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`, +`data`(255)) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table6 values (1, 1, 2, 2, 1, 1, +'data12_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 3, 2, 1, 2, +'data13_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 4, 2, 1, 2, +'data14_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 5, 2, 1, 1, +'data15_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 1, 2, 1, 1, +'data21_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 2, 2, 1, 1, +'data22_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 3, 2, 1, 1, +'data32_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +CREATE TABLE `link_table4` ( +`id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +# Range query, PRIMARY KEY +# forward column family + Ascending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + Descending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# reverse column family + Ascending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# reverse column family + Descending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_range_pk_bloom.result b/mysql-test/suite/rocksdb/r/bypass_select_range_pk_bloom.result new file mode 100644 index 000000000000..489b71ca2bbb --- /dev/null +++ b/mysql-test/suite/rocksdb/r/bypass_select_range_pk_bloom.result @@ -0,0 +1,4155 @@ +CREATE TABLE `link_table` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE TABLE `link_table2` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) +COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=9; +insert into link_table values (1, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (1, 1, 2, 2, 3, 3, 'a10', 10, 125); +insert into link_table values (1, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 5, 2, 3, 3, 'a12', 12, 125); +insert into link_table values (1, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (1, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (1, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 4, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 4, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 4, 4, 'a15', 15, 125); +insert into link_table values (3, 1, 10, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 9, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 8, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 7, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 4, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 3, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (3, 1, 2, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (3, 1, 1, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (9, 1, 9, 2, 5, 6, '0 ', 10, 125); +insert into link_table values (9, 1, 8, 2, 5, 6, '01 ', 11, 125); +insert into link_table values (9, 1, 7, 2, 5, 6, '012 ', 11, 125); +insert into link_table values (9, 1, 6, 2, 5, 6, '0123 ', 12, 125); +insert into link_table values (9, 1, 5, 2, 5, 6, '01234 ', 12, 125); +insert into link_table values (9, 1, 4, 2, 5, 6, '012345 ', 12, 125); +insert into link_table values (9, 1, 3, 2, 5, 6, '0123456 ', 13, 125); +insert into link_table values (9, 1, 2, 2, 5, 6, '01234567 ', 14, 125); +insert into link_table values (9, 1, 1, 2, 5, 6, '012345678 ', 15, 125); +insert into link_table values (9, 1, 0, 2, 5, 6, '0123456789 ', 15, 125); +insert into link_table2 select * from link_table; +CREATE TABLE `id_table` ( +`id` bigint(20) NOT NULL DEFAULT '0', +`type` int(11) NOT NULL DEFAULT '0', +`row_created_time` int(11) NOT NULL DEFAULT '0', +`hash_key` varchar(255) NOT NULL DEFAULT '', +`is_deleted` tinyint(4) DEFAULT '0', +PRIMARY KEY (`id`), +KEY `type_id` (`type`,`id`) +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +KEY_BLOCK_SIZE=8; +insert into id_table values (1, 1, 10, '111', 0); +insert into id_table values (2, 1, 10, '111', 1); +insert into id_table values (3, 1, 10, '111', 0); +insert into id_table values (4, 1, 10, '111', 1); +insert into id_table values (5, 1, 10, '111', 0); +insert into id_table values (6, 1, 10, '111', 1); +insert into id_table values (7, 1, 10, '111', 0); +insert into id_table values (8, 1, 10, '111', 1); +insert into id_table values (9, 1, 10, '111', 0); +insert into id_table values (10, 1, 10, '111', 1); +CREATE TABLE `node_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +`update_time` int(10) unsigned NOT NULL DEFAULT '0', +`data` mediumtext COLLATE latin1_bin NOT NULL, +PRIMARY KEY (`type`,`id`) COMMENT 'cf_node_type_id', +KEY `id` (`id`) COMMENT 'cf_node' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into node_table values (1, 1, 1, 10, 'data'); +insert into node_table values (2, 1, 1, 10, 'data'); +insert into node_table values (3, 1, 1, 10, 'data'); +insert into node_table values (4, 1, 1, 10, 'data'); +insert into node_table values (5, 1, 1, 10, 'data'); +insert into node_table values (6, 1, 1, 10, 'data'); +insert into node_table values (7, 1, 1, 10, 'data'); +insert into node_table values (8, 1, 1, 10, 'data'); +insert into node_table values (9, 1, 1, 10, 'data'); +insert into node_table values (10, 1, 1, 10, 'data'); +CREATE TABLE `count_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`count` int(10) unsigned NOT NULL DEFAULT '0', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`id`,`link_type`) COMMENT 'cf_count_table' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into count_table values (2, 1, 1, 1, 10, 20); +insert into count_table values (3, 1, 1, 1, 10, 20); +insert into count_table values (4, 1, 1, 1, 10, 20); +insert into count_table values (5, 1, 1, 1, 10, 20); +insert into count_table values (6, 1, 1, 1, 10, 20); +insert into count_table values (7, 1, 1, 1, 10, 20); +insert into count_table values (8, 1, 1, 1, 10, 20); +insert into count_table values (9, 1, 1, 1, 10, 20); +insert into count_table values (10, 1, 1, 1, 10, 20); +CREATE TABLE `link_table5` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; +CREATE TABLE `link_table3` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table3 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table3 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table3 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table3 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table3 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table3 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table3 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +CREATE TABLE `link_table6` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`, +`data`(255)) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table6 values (1, 1, 2, 2, 1, 1, +'data12_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 3, 2, 1, 2, +'data13_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 4, 2, 1, 2, +'data14_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 5, 2, 1, 1, +'data15_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 1, 2, 1, 1, +'data21_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 2, 2, 1, 1, +'data22_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 3, 2, 1, 1, +'data32_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +CREATE TABLE `link_table4` ( +`id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +# Range query, PRIMARY KEY +# forward column family + Ascending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + Descending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# reverse column family + Ascending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 3 1 2 data13 1 1 +1 4 1 2 data14 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 ASC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +2 2 1 1 data22 1 1 +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# reverse column family + Descending +# Prefix queries +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +1 4 1 2 data14 1 1 +1 3 1 2 data13 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range queries +# > and >= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# < and <= +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Both > and < +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5_rev FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 DESC LIMIT 1000; +id1 id2 link_type visibility data TIME version +2 3 1 1 data32 1 1 +2 2 1 1 data22 1 1 +2 1 1 1 data21 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_range_sk.result b/mysql-test/suite/rocksdb/r/bypass_select_range_sk.result new file mode 100644 index 000000000000..51f1c1e4683d --- /dev/null +++ b/mysql-test/suite/rocksdb/r/bypass_select_range_sk.result @@ -0,0 +1,6671 @@ +CREATE TABLE `link_table` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE TABLE `link_table2` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) +COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=9; +insert into link_table values (1, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (1, 1, 2, 2, 3, 3, 'a10', 10, 125); +insert into link_table values (1, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 5, 2, 3, 3, 'a12', 12, 125); +insert into link_table values (1, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (1, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (1, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 4, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 4, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 4, 4, 'a15', 15, 125); +insert into link_table values (3, 1, 10, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 9, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 8, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 7, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 4, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 3, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (3, 1, 2, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (3, 1, 1, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (9, 1, 9, 2, 5, 6, '0 ', 10, 125); +insert into link_table values (9, 1, 8, 2, 5, 6, '01 ', 11, 125); +insert into link_table values (9, 1, 7, 2, 5, 6, '012 ', 11, 125); +insert into link_table values (9, 1, 6, 2, 5, 6, '0123 ', 12, 125); +insert into link_table values (9, 1, 5, 2, 5, 6, '01234 ', 12, 125); +insert into link_table values (9, 1, 4, 2, 5, 6, '012345 ', 12, 125); +insert into link_table values (9, 1, 3, 2, 5, 6, '0123456 ', 13, 125); +insert into link_table values (9, 1, 2, 2, 5, 6, '01234567 ', 14, 125); +insert into link_table values (9, 1, 1, 2, 5, 6, '012345678 ', 15, 125); +insert into link_table values (9, 1, 0, 2, 5, 6, '0123456789 ', 15, 125); +insert into link_table2 select * from link_table; +CREATE TABLE `id_table` ( +`id` bigint(20) NOT NULL DEFAULT '0', +`type` int(11) NOT NULL DEFAULT '0', +`row_created_time` int(11) NOT NULL DEFAULT '0', +`hash_key` varchar(255) NOT NULL DEFAULT '', +`is_deleted` tinyint(4) DEFAULT '0', +PRIMARY KEY (`id`), +KEY `type_id` (`type`,`id`) +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +KEY_BLOCK_SIZE=8; +insert into id_table values (1, 1, 10, '111', 0); +insert into id_table values (2, 1, 10, '111', 1); +insert into id_table values (3, 1, 10, '111', 0); +insert into id_table values (4, 1, 10, '111', 1); +insert into id_table values (5, 1, 10, '111', 0); +insert into id_table values (6, 1, 10, '111', 1); +insert into id_table values (7, 1, 10, '111', 0); +insert into id_table values (8, 1, 10, '111', 1); +insert into id_table values (9, 1, 10, '111', 0); +insert into id_table values (10, 1, 10, '111', 1); +CREATE TABLE `node_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +`update_time` int(10) unsigned NOT NULL DEFAULT '0', +`data` mediumtext COLLATE latin1_bin NOT NULL, +PRIMARY KEY (`type`,`id`) COMMENT 'cf_node_type_id', +KEY `id` (`id`) COMMENT 'cf_node' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into node_table values (1, 1, 1, 10, 'data'); +insert into node_table values (2, 1, 1, 10, 'data'); +insert into node_table values (3, 1, 1, 10, 'data'); +insert into node_table values (4, 1, 1, 10, 'data'); +insert into node_table values (5, 1, 1, 10, 'data'); +insert into node_table values (6, 1, 1, 10, 'data'); +insert into node_table values (7, 1, 1, 10, 'data'); +insert into node_table values (8, 1, 1, 10, 'data'); +insert into node_table values (9, 1, 1, 10, 'data'); +insert into node_table values (10, 1, 1, 10, 'data'); +CREATE TABLE `count_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`count` int(10) unsigned NOT NULL DEFAULT '0', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`id`,`link_type`) COMMENT 'cf_count_table' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into count_table values (2, 1, 1, 1, 10, 20); +insert into count_table values (3, 1, 1, 1, 10, 20); +insert into count_table values (4, 1, 1, 1, 10, 20); +insert into count_table values (5, 1, 1, 1, 10, 20); +insert into count_table values (6, 1, 1, 1, 10, 20); +insert into count_table values (7, 1, 1, 1, 10, 20); +insert into count_table values (8, 1, 1, 1, 10, 20); +insert into count_table values (9, 1, 1, 1, 10, 20); +insert into count_table values (10, 1, 1, 1, 10, 20); +CREATE TABLE `link_table5` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; +CREATE TABLE `link_table3` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table3 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table3 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table3 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table3 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table3 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table3 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table3 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +CREATE TABLE `link_table6` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`, +`data`(255)) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table6 values (1, 1, 2, 2, 1, 1, +'data12_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 3, 2, 1, 2, +'data13_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 4, 2, 1, 2, +'data14_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 5, 2, 1, 1, +'data15_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 1, 2, 1, 1, +'data21_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 2, 2, 1, 1, +'data22_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 3, 2, 1, 1, +'data32_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +CREATE TABLE `link_table4` ( +`id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +# Range query, SECONDARY KEY +# Reverse Column family + ascending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Reverse Column family + descending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + ascending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + descending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_range_sk_bloom.result b/mysql-test/suite/rocksdb/r/bypass_select_range_sk_bloom.result new file mode 100644 index 000000000000..51f1c1e4683d --- /dev/null +++ b/mysql-test/suite/rocksdb/r/bypass_select_range_sk_bloom.result @@ -0,0 +1,6671 @@ +CREATE TABLE `link_table` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE TABLE `link_table2` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , +`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , +`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0' , +`visibility` tinyint(3) NOT NULL DEFAULT '0' , +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , +`time` int(10) unsigned NOT NULL DEFAULT '0' , +`version` bigint(20) unsigned NOT NULL DEFAULT '0' , +PRIMARY KEY (`link_type` , `id1` , `id2`) +COMMENT 'cf_link' , +KEY `id1_type` (`id1` , `link_type` , `visibility` , `time` , `id2` , +`version` , `data`) COMMENT 'cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=9; +insert into link_table values (1, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (1, 1, 2, 2, 3, 3, 'a10', 10, 125); +insert into link_table values (1, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (1, 1, 5, 2, 3, 3, 'a12', 12, 125); +insert into link_table values (1, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (1, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (1, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (1, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (2, 1, 1, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 2, 2, 4, 4, 'a10', 10, 125); +insert into link_table values (2, 1, 3, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 4, 2, 4, 4, 'a11', 11, 125); +insert into link_table values (2, 1, 5, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 6, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 7, 2, 4, 4, 'a12', 12, 125); +insert into link_table values (2, 1, 8, 2, 4, 4, 'a13', 13, 125); +insert into link_table values (2, 1, 9, 2, 4, 4, 'a14', 14, 125); +insert into link_table values (2, 1, 10, 2, 4, 4, 'a15', 15, 125); +insert into link_table values (3, 1, 10, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 9, 2, 3, 4, 'a10', 10, 125); +insert into link_table values (3, 1, 8, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 7, 2, 3, 4, 'a11', 11, 125); +insert into link_table values (3, 1, 6, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 5, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 4, 2, 3, 4, 'a12', 12, 125); +insert into link_table values (3, 1, 3, 2, 3, 4, 'a13', 13, 125); +insert into link_table values (3, 1, 2, 2, 3, 4, 'a14', 14, 125); +insert into link_table values (3, 1, 1, 2, 3, 4, 'a15', 15, 125); +insert into link_table values (9, 1, 9, 2, 5, 6, '0 ', 10, 125); +insert into link_table values (9, 1, 8, 2, 5, 6, '01 ', 11, 125); +insert into link_table values (9, 1, 7, 2, 5, 6, '012 ', 11, 125); +insert into link_table values (9, 1, 6, 2, 5, 6, '0123 ', 12, 125); +insert into link_table values (9, 1, 5, 2, 5, 6, '01234 ', 12, 125); +insert into link_table values (9, 1, 4, 2, 5, 6, '012345 ', 12, 125); +insert into link_table values (9, 1, 3, 2, 5, 6, '0123456 ', 13, 125); +insert into link_table values (9, 1, 2, 2, 5, 6, '01234567 ', 14, 125); +insert into link_table values (9, 1, 1, 2, 5, 6, '012345678 ', 15, 125); +insert into link_table values (9, 1, 0, 2, 5, 6, '0123456789 ', 15, 125); +insert into link_table2 select * from link_table; +CREATE TABLE `id_table` ( +`id` bigint(20) NOT NULL DEFAULT '0', +`type` int(11) NOT NULL DEFAULT '0', +`row_created_time` int(11) NOT NULL DEFAULT '0', +`hash_key` varchar(255) NOT NULL DEFAULT '', +`is_deleted` tinyint(4) DEFAULT '0', +PRIMARY KEY (`id`), +KEY `type_id` (`type`,`id`) +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +KEY_BLOCK_SIZE=8; +insert into id_table values (1, 1, 10, '111', 0); +insert into id_table values (2, 1, 10, '111', 1); +insert into id_table values (3, 1, 10, '111', 0); +insert into id_table values (4, 1, 10, '111', 1); +insert into id_table values (5, 1, 10, '111', 0); +insert into id_table values (6, 1, 10, '111', 1); +insert into id_table values (7, 1, 10, '111', 0); +insert into id_table values (8, 1, 10, '111', 1); +insert into id_table values (9, 1, 10, '111', 0); +insert into id_table values (10, 1, 10, '111', 1); +CREATE TABLE `node_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +`update_time` int(10) unsigned NOT NULL DEFAULT '0', +`data` mediumtext COLLATE latin1_bin NOT NULL, +PRIMARY KEY (`type`,`id`) COMMENT 'cf_node_type_id', +KEY `id` (`id`) COMMENT 'cf_node' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into node_table values (1, 1, 1, 10, 'data'); +insert into node_table values (2, 1, 1, 10, 'data'); +insert into node_table values (3, 1, 1, 10, 'data'); +insert into node_table values (4, 1, 1, 10, 'data'); +insert into node_table values (5, 1, 1, 10, 'data'); +insert into node_table values (6, 1, 1, 10, 'data'); +insert into node_table values (7, 1, 1, 10, 'data'); +insert into node_table values (8, 1, 1, 10, 'data'); +insert into node_table values (9, 1, 1, 10, 'data'); +insert into node_table values (10, 1, 1, 10, 'data'); +CREATE TABLE `count_table` ( +`id` bigint(20) unsigned NOT NULL DEFAULT '0', +`type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`count` int(10) unsigned NOT NULL DEFAULT '0', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`id`,`link_type`) COMMENT 'cf_count_table' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into count_table values (2, 1, 1, 1, 10, 20); +insert into count_table values (3, 1, 1, 1, 10, 20); +insert into count_table values (4, 1, 1, 1, 10, 20); +insert into count_table values (5, 1, 1, 1, 10, 20); +insert into count_table values (6, 1, 1, 1, 10, 20); +insert into count_table values (7, 1, 1, 1, 10, 20); +insert into count_table values (8, 1, 1, 1, 10, 20); +insert into count_table values (9, 1, 1, 1, 10, 20); +insert into count_table values (10, 1, 1, 1, 10, 20); +CREATE TABLE `link_table5` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; +CREATE TABLE `link_table3` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table3 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table3 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table3 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table3 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table3 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table3 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table3 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +CREATE TABLE `link_table6` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(4) NOT NULL DEFAULT '0', +`data` text COLLATE latin1_bin NOT NULL, +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`, +`data`(255)) COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +insert into link_table6 values (1, 1, 2, 2, 1, 1, +'data12_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 3, 2, 1, 2, +'data13_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 4, 2, 1, 2, +'data14_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (1, 1, 5, 2, 1, 1, +'data15_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 1, 2, 1, 1, +'data21_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 2, 2, 1, 1, +'data22_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +insert into link_table6 values (2, 1, 3, 2, 1, 1, +'data32_12345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890123456789012345678901234567890123456789' + '0123456789012345678901234567890', 1, 1); +CREATE TABLE `link_table4` ( +`id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +# Range query, SECONDARY KEY +# Reverse Column family + ascending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Reverse Column family + descending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + ascending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type ASC, visibility ASC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +1 5 3 3 a12 12 125 +1 1 3 4 a10 10 125 +1 3 3 4 a11 11 125 +1 4 3 4 a11 11 125 +1 6 3 4 a12 12 125 +1 7 3 4 a12 12 125 +1 8 3 4 a13 13 125 +1 9 3 4 a14 14 125 +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 9 3 4 a10 10 125 +3 10 3 4 a10 10 125 +3 7 3 4 a11 11 125 +3 8 3 4 a11 11 125 +3 4 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 6 3 4 a12 12 125 +3 3 3 4 a13 13 125 +3 2 3 4 a14 14 125 +3 1 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# forward column family + descending +# prefix +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Range query +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 12 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 9 AND TIME <= 11 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND +TIME >= 7 AND TIME <= 8 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type DESC, visibility DESC +LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +1 10 3 4 a15 15 125 +1 9 3 4 a14 14 125 +1 8 3 4 a13 13 125 +1 7 3 4 a12 12 125 +1 6 3 4 a12 12 125 +1 4 3 4 a11 11 125 +1 3 3 4 a11 11 125 +1 1 3 4 a10 10 125 +1 5 3 3 a12 12 125 +1 2 3 3 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +7 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 15 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 10 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +ROWS_READ +8 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME >= 9 AND TIME < 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 16 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +3 1 3 4 a15 15 125 +3 2 3 4 a14 14 125 +3 3 3 4 a13 13 125 +3 6 3 4 a12 12 125 +3 5 3 4 a12 12 125 +3 4 3 4 a12 12 125 +3 8 3 4 a11 11 125 +3 7 3 4 a11 11 125 +3 10 3 4 a10 10 125 +3 9 3 4 a10 10 125 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +# Invalid range +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 10 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table2 FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND +TIME > 9 AND TIME <= 9 +ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data TIME version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_scenarios.result b/mysql-test/suite/rocksdb/r/bypass_select_scenarios.result index 5116839ebe60..d8f115c6f9f9 100644 --- a/mysql-test/suite/rocksdb/r/bypass_select_scenarios.result +++ b/mysql-test/suite/rocksdb/r/bypass_select_scenarios.result @@ -152,6 +152,25 @@ CREATE TABLE `link_table5` ( PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); @@ -159,6 +178,33 @@ insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; CREATE TABLE `link_table3` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0', `id1_type` int(10) unsigned NOT NULL DEFAULT '0', @@ -240,1788 +286,52 @@ insert into link_table6 values (2, 1, 3, 2, 1, 1, '0123456789012345678901234567890', 1, 1); CREATE TABLE `link_table4` ( `id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -`raw_key` text COLLATE latin1_bin, -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(3) NOT NULL DEFAULT '0', -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', -KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) -COMMENT 'rev:cf_link_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); -insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); -insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); -insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); -insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); -insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); -insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -always_off -select @@rocksdb_select_bypass_policy into @save_rocksdb_select_bypass_policy; -set global rocksdb_select_bypass_policy=2; -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -opt_in -SELECT variable_value into @executed_start -FROM information_schema.global_status WHERE -variable_name="rocksdb_select_bypass_executed"; -# Reverse Column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# Reverse Column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -# Range query, flag = 1 -# Ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 2 1 1 data12 1 1 -1 5 1 1 data15 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 3 1 2 data13 1 1 -1 4 1 2 data14 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -2 1 1 1 data21 1 1 -2 2 1 1 data22 1 1 -2 3 1 1 data32 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -# Dscending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 5 1 1 data15 1 1 -1 2 1 1 data12 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 4 1 2 data14 1 1 -1 3 1 2 data13 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -2 3 1 1 data32 1 1 -2 2 1 1 data22 1 1 -2 1 1 1 data21 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +select @@rocksdb_select_bypass_policy; +@@rocksdb_select_bypass_policy +always_off +select @@rocksdb_select_bypass_policy into @save_rocksdb_select_bypass_policy; +set global rocksdb_select_bypass_policy=2; +select @@rocksdb_select_bypass_policy; +@@rocksdb_select_bypass_policy +opt_in +SELECT variable_value into @executed_start +FROM information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; # Range query, binary key +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table4 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND +visibility = 1 AND time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data time version +a1 5 1 1 data15 1 1 +a1 2 1 1 data12 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND @@ -2030,6 +340,23 @@ ORDER BY time DESC, id2 DESC LIMIT 0, 1000; id1 id2 link_type visibility data time version a1 5 1 1 data15 1 1 a1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table4 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND +visibility = 1 AND time >= 0 AND time <= 4294967295 +ORDER BY time ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data time version +a1 2 1 1 data12 1 1 +a1 5 1 1 data15 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND @@ -2038,53 +365,182 @@ ORDER BY time ASC, id2 ASC LIMIT 0, 1000; id1 id2 link_type visibility data time version a1 2 1 1 data12 1 1 a1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 0 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (1, 2, 3, 4, 5) AND type = 1 +ORDER BY type, id; +id type version update_time data +1 1 1 10 data +2 1 1 10 data +3 1 1 10 data +4 1 1 10 data +5 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5) AND type = 1; +WHERE id IN (1, 2, 3, 4, 5) AND type = 1 +ORDER BY type, id; id type version update_time data 1 1 1 10 data 2 1 1 10 data 3 1 1 10 data 4 1 1 10 data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (1) AND type = 1; +id type version update_time data +1 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (1) AND type = 1; id type version update_time data 1 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id = 2 AND type = 1 +ORDER BY type, id; +id type version update_time data +2 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id = 2 AND type = 1; +WHERE id = 2 AND type = 1 +ORDER BY type, id; id type version update_time data 2 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 1 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id IN (1, 2, 3, 4, 5) +ORDER BY id; +id type row_created_time is_deleted +1 1 10 0 +2 1 10 1 +3 1 10 0 +4 1 10 1 +5 1 10 0 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5); +WHERE id IN (1, 2, 3, 4, 5) +ORDER BY id; id type row_created_time is_deleted 1 1 10 0 2 1 10 1 3 1 10 0 4 1 10 1 5 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id IN (1); +id type row_created_time is_deleted +1 1 10 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id IN (1); id type row_created_time is_deleted 1 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id = 1; +id type row_created_time is_deleted +1 1 10 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id = 1; id type row_created_time is_deleted 1 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 2 +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id, type, link_type, count, TIME, version FROM count_table WHERE id = 2 AND link_type = 1; id type link_type count TIME version 2 1 1 1 10 20 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id, type, link_type, count, TIME, version +FROM count_table +WHERE id = 2 AND link_type = 1; +id type link_type count TIME version +2 1 1 1 10 20 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Bugs found when debugging real production scenarios +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table3 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +AND time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 10000; +id1 id2 link_type visibility data time version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table3 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 @@ -2093,25 +549,113 @@ ORDER BY time DESC, id2 DESC LIMIT 0, 10000; id1 id2 link_type visibility data time version 1 5 1 1 data15 1 1 1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ data from link_table6 FORCE INDEX (id1_type) where id1=1; +data +data12_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data15_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data13_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data14_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ data from link_table6 FORCE INDEX (id1_type) where id1=1; data data12_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data15_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data13_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data14_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND +time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 500; +id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND time >= 0 AND time <= 4294967295 ORDER BY time DESC, id2 DESC LIMIT 0, 500; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 +ORDER BY time DESC, id2 DESC LIMIT 0, 500; +id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 ORDER BY time DESC, id2 DESC LIMIT 0, 500; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type FROM link_table +WHERE link_type=3 and id1 in (1, 2, 3) +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 1 2 +1 1 2 2 +1 1 3 2 +1 1 4 2 +1 1 5 2 +1 1 6 2 +1 1 7 2 +1 1 8 2 +1 1 9 2 +1 1 10 2 +2 1 1 2 +2 1 2 2 +2 1 3 2 +2 1 4 2 +2 1 5 2 +2 1 6 2 +2 1 7 2 +2 1 8 2 +2 1 9 2 +2 1 10 2 +3 1 1 2 +3 1 2 2 +3 1 3 2 +3 1 4 2 +3 1 5 2 +3 1 6 2 +3 1 7 2 +3 1 8 2 +3 1 9 2 +3 1 10 2 +ROWS_READ +30 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type FROM link_table -WHERE link_type=3 and id1 in (1, 2, 3); +WHERE link_type=3 and id1 in (1, 2, 3) +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 1 2 1 1 2 2 @@ -2143,14 +687,54 @@ id1 id1_type id2 id2_type 3 1 8 2 3 1 9 2 3 1 10 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1; +WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1 +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 1 2 2 1 1 2 3 1 1 2 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table +WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1 +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 1 2 +2 1 1 2 +3 1 1 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table +WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5) +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 3 2 +1 1 4 2 +1 1 5 2 +2 1 3 2 +2 1 4 2 +2 1 5 2 +3 1 3 2 +3 1 4 2 +3 1 5 2 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5); +WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5) +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 3 2 1 1 4 2 @@ -2161,6 +745,29 @@ id1 id1_type id2 id2_type 3 1 3 2 3 1 4 2 3 1 5 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, data, version, time +FROM link_table FORCE INDEX (id1_type) +WHERE id1=9 and link_type=5; +id1 id2 data version time +9 9 0 125 10 +9 7 012 125 11 +9 8 01 125 11 +9 4 012345 125 12 +9 5 01234 125 12 +9 6 0123 125 12 +9 3 0123456 125 13 +9 2 01234567 125 14 +9 0 0123456789 125 15 +9 1 012345678 125 15 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, data, version, time FROM link_table FORCE INDEX (id1_type) WHERE id1=9 and link_type=5; @@ -2175,11 +782,43 @@ id1 id2 data version time 9 2 01234567 125 14 9 0 0123456789 125 15 9 1 012345678 125 15 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 5, 5, 5, 5) AND type = 1; +id type version update_time data +5 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 5, 5, 5, 5) AND type = 1; id type version update_time data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 4, 3, 2, 1) AND type = 1; +id type version update_time data +1 1 1 10 data +2 1 1 10 data +3 1 1 10 data +4 1 1 10 data +5 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1; @@ -2189,6 +828,24 @@ id type version update_time data 3 1 1 10 data 4 1 1 10 data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 4, 3, 2, 1) AND type = 1 ORDER BY id DESC; +id type version update_time data +5 1 1 10 data +4 1 1 10 data +3 1 1 10 data +2 1 1 10 data +1 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1 ORDER BY id DESC; @@ -2198,38 +855,106 @@ id type version update_time data 3 1 1 10 data 2 1 1 10 data 1 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 -WHERE link_type=1 and id1=2 and id2 > 1; +WHERE link_type=1 and id1=2 and id2 >= 1; id1 id2 data time version +2 1 data21 1 1 2 2 data22 1 1 2 3 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; id1 id2 data time version 2 1 data21 1 1 2 2 data22 1 1 2 3 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Range query with PK key only +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2=1; +id2 +1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; id2 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; id2 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2=1; +id2 +1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Range query with PK key only with filters +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2 > 1; +id2 +2 +3 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 > 1; id2 2 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2 >= 1; +id2 +1 +2 +3 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; id2 1 2 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] CREATE TABLE `link_table7` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0' , `id1_type` int(10) unsigned NOT NULL DEFAULT '0' , @@ -2260,6 +985,20 @@ insert into link_table7 values (9223372036854775807, 100, 1223372036854775803, '0123456789012345678901234567890123456789012345678901234567890123456789' '0123456789012345678901234567890123456789012345678901234567890123456789' '0123456789012345678901234567890', 1234563, 9223372036854775803); +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table7 FORCE INDEX (id1_type) +WHERE link_type = 9223372036854775807 and id1 = 9223372036854775807 +and visibility = 0 ORDER BY time ASC, id2 ASC limit 0, 1000; +id1 id2 link_type visibility data time version +9223372036854775807 9223372036854775801 9223372036854775807 0 data1 1234561 9223372036854775801 +9223372036854775807 1223372036854775802 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234562 9223372036854775802 +9223372036854775807 1223372036854775803 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234563 9223372036854775803 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table7 FORCE INDEX (id1_type) WHERE link_type = 9223372036854775807 and id1 = 9223372036854775807 @@ -2268,6 +1007,9 @@ id1 id2 link_type visibility data time version 9223372036854775807 9223372036854775801 9223372036854775807 0 data1 1234561 9223372036854775801 9223372036854775807 1223372036854775802 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234562 9223372036854775802 9223372036854775807 1223372036854775803 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234563 9223372036854775803 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] DROP TABLE link_table7; CREATE TABLE `link_table8` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0' , @@ -2285,28 +1027,49 @@ COMMENT 'rev:cf_assoc_id1_type' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; insert into link_table8 values (1, 0x03030303, 1, 0, 100, 0, 'data1', 0, 0); +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table8 FORCE INDEX (PRIMARY) WHERE link_type = 100 and id1 = 1 +ORDER BY id2 ASC limit 0, 1000; +id1 id2 link_type visibility data time version +1 1 100 0 data1 0 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table8 FORCE INDEX (PRIMARY) WHERE link_type = 100 and id1 = 1 ORDER BY id2 ASC limit 0, 1000; id1 id2 link_type visibility data time version 1 1 100 0 data1 0 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] DROP TABLE link_table8; # Establish connection con1 (user=root) # Switch to connection con1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 0 -Rows_sent 0 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version FROM link_table5 FORCE INDEX (PRIMARY) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 ORDER BY id2 ASC LIMIT 1; id1 id2 link_type visibility data TIME version 1 2 1 1 data12 1 1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 1 -Rows_sent 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Switch back to default connection select @@rocksdb_select_bypass_policy; @@rocksdb_select_bypass_policy @@ -2320,13 +1083,14 @@ FROM information_schema.global_status WHERE variable_name="rocksdb_select_bypass_executed"; SELECT @executed_end-@executed_start AS ROCKSDB_SELECT_BYPASS_EXECUTED; ROCKSDB_SELECT_BYPASS_EXECUTED -128 +28 DROP TABLE count_table; DROP TABLE link_table; DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table3; DROP TABLE link_table6; DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/r/bypass_select_scenarios_bloom.result b/mysql-test/suite/rocksdb/r/bypass_select_scenarios_bloom.result index 5116839ebe60..d8f115c6f9f9 100644 --- a/mysql-test/suite/rocksdb/r/bypass_select_scenarios_bloom.result +++ b/mysql-test/suite/rocksdb/r/bypass_select_scenarios_bloom.result @@ -152,6 +152,25 @@ CREATE TABLE `link_table5` ( PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5 values (0, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 0, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 0, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 0, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 0, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 0, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 0, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 0, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 1, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); insert into link_table5 values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); insert into link_table5 values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); @@ -159,6 +178,33 @@ insert into link_table5 values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); insert into link_table5 values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); insert into link_table5 values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); insert into link_table5 values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); +insert into link_table5 values (0, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (0, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (0, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (0, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 6, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (0, 1, 7, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (1, 1, 2, 2, 2, 1, 'data12', 1, 1); +insert into link_table5 values (1, 1, 3, 2, 2, 2, 'data13', 1, 1); +insert into link_table5 values (1, 1, 4, 2, 2, 2, 'data14', 1, 1); +insert into link_table5 values (1, 1, 5, 2, 2, 1, 'data15', 1, 1); +insert into link_table5 values (2, 1, 1, 2, 2, 1, 'data21', 1, 1); +insert into link_table5 values (2, 1, 2, 2, 2, 1, 'data22', 1, 1); +insert into link_table5 values (2, 1, 3, 2, 2, 1, 'data32', 1, 1); +CREATE TABLE `link_table5_rev` ( +`id1` bigint(20) unsigned NOT NULL DEFAULT '0', +`id1_type` int(10) unsigned NOT NULL DEFAULT '0', +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'rev:cf_link' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table5_rev SELECT * FROM link_table5; CREATE TABLE `link_table3` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0', `id1_type` int(10) unsigned NOT NULL DEFAULT '0', @@ -240,1788 +286,52 @@ insert into link_table6 values (2, 1, 3, 2, 1, 1, '0123456789012345678901234567890', 1, 1); CREATE TABLE `link_table4` ( `id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -`raw_key` text COLLATE latin1_bin, -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(3) NOT NULL DEFAULT '0', -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', -KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) -COMMENT 'rev:cf_link_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); -insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); -insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); -insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); -insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); -insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); -insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -always_off -select @@rocksdb_select_bypass_policy into @save_rocksdb_select_bypass_policy; -set global rocksdb_select_bypass_policy=2; -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -opt_in -SELECT variable_value into @executed_start -FROM information_schema.global_status WHERE -variable_name="rocksdb_select_bypass_executed"; -# Reverse Column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# Reverse Column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 link_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -# Range query, flag = 1 -# Ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 2 1 1 data12 1 1 -1 5 1 1 data15 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 3 1 2 data13 1 1 -1 4 1 2 data14 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -2 1 1 1 data21 1 1 -2 2 1 1 data22 1 1 -2 3 1 1 data32 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 link_type visibility data TIME version -# Dscending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 5 1 1 data15 1 1 -1 2 1 1 data12 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -1 4 1 2 data14 1 1 -1 3 1 2 data13 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version -2 3 1 1 data32 1 1 -2 2 1 1 data22 1 1 -2 1 1 1 data21 1 1 -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 link_type visibility data TIME version +`raw_key` text COLLATE latin1_bin, +`id2` bigint(20) unsigned NOT NULL DEFAULT '0', +`id2_type` int(10) unsigned NOT NULL DEFAULT '0', +`link_type` bigint(20) unsigned NOT NULL DEFAULT '0', +`visibility` tinyint(3) NOT NULL DEFAULT '0', +`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', +`time` int(10) unsigned NOT NULL DEFAULT '0', +`version` bigint(20) unsigned NOT NULL DEFAULT '0', +PRIMARY KEY (`link_type`,`id1`,`id2`) COMMENT 'cf_link', +KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`id2`,`version`,`data`) +COMMENT 'rev:cf_link_id1_type' +) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +insert into link_table4 values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); +insert into link_table4 values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); +insert into link_table4 values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); +insert into link_table4 values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); +insert into link_table4 values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); +insert into link_table4 values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); +insert into link_table4 values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); +select @@rocksdb_select_bypass_policy; +@@rocksdb_select_bypass_policy +always_off +select @@rocksdb_select_bypass_policy into @save_rocksdb_select_bypass_policy; +set global rocksdb_select_bypass_policy=2; +select @@rocksdb_select_bypass_policy; +@@rocksdb_select_bypass_policy +opt_in +SELECT variable_value into @executed_start +FROM information_schema.global_status WHERE +variable_name="rocksdb_select_bypass_executed"; # Range query, binary key +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table4 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND +visibility = 1 AND time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 1000; +id1 id2 link_type visibility data time version +a1 5 1 1 data15 1 1 +a1 2 1 1 data12 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND @@ -2030,6 +340,23 @@ ORDER BY time DESC, id2 DESC LIMIT 0, 1000; id1 id2 link_type visibility data time version a1 5 1 1 data15 1 1 a1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table4 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND +visibility = 1 AND time >= 0 AND time <= 4294967295 +ORDER BY time ASC, id2 ASC LIMIT 0, 1000; +id1 id2 link_type visibility data time version +a1 2 1 1 data12 1 1 +a1 5 1 1 data15 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND @@ -2038,53 +365,182 @@ ORDER BY time ASC, id2 ASC LIMIT 0, 1000; id1 id2 link_type visibility data time version a1 2 1 1 data12 1 1 a1 5 1 1 data15 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 0 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (1, 2, 3, 4, 5) AND type = 1 +ORDER BY type, id; +id type version update_time data +1 1 1 10 data +2 1 1 10 data +3 1 1 10 data +4 1 1 10 data +5 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5) AND type = 1; +WHERE id IN (1, 2, 3, 4, 5) AND type = 1 +ORDER BY type, id; id type version update_time data 1 1 1 10 data 2 1 1 10 data 3 1 1 10 data 4 1 1 10 data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (1) AND type = 1; +id type version update_time data +1 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (1) AND type = 1; id type version update_time data 1 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id = 2 AND type = 1 +ORDER BY type, id; +id type version update_time data +2 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id = 2 AND type = 1; +WHERE id = 2 AND type = 1 +ORDER BY type, id; id type version update_time data 2 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 1 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id IN (1, 2, 3, 4, 5) +ORDER BY id; +id type row_created_time is_deleted +1 1 10 0 +2 1 10 1 +3 1 10 0 +4 1 10 1 +5 1 10 0 +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5); +WHERE id IN (1, 2, 3, 4, 5) +ORDER BY id; id type row_created_time is_deleted 1 1 10 0 2 1 10 1 3 1 10 0 4 1 10 1 5 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id IN (1); +id type row_created_time is_deleted +1 1 10 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id IN (1); id type row_created_time is_deleted 1 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, row_created_time, is_deleted +FROM id_table FORCE INDEX (PRIMARY) +WHERE id = 1; +id type row_created_time is_deleted +1 1 10 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id = 1; id type row_created_time is_deleted 1 1 10 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Point query, flag = 2 +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id, type, link_type, count, TIME, version FROM count_table WHERE id = 2 AND link_type = 1; id type link_type count TIME version 2 1 1 1 10 20 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id, type, link_type, count, TIME, version +FROM count_table +WHERE id = 2 AND link_type = 1; +id type link_type count TIME version +2 1 1 1 10 20 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Bugs found when debugging real production scenarios +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table3 FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +AND time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 10000; +id1 id2 link_type visibility data time version +1 5 1 1 data15 1 1 +1 2 1 1 data12 1 1 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table3 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 @@ -2093,25 +549,113 @@ ORDER BY time DESC, id2 DESC LIMIT 0, 10000; id1 id2 link_type visibility data time version 1 5 1 1 data15 1 1 1 2 1 1 data12 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ data from link_table6 FORCE INDEX (id1_type) where id1=1; +data +data12_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data15_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data13_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +data14_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +ROWS_READ +4 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ data from link_table6 FORCE INDEX (id1_type) where id1=1; data data12_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data15_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data13_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 data14_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND +time >= 0 AND time <= 4294967295 +ORDER BY time DESC, id2 DESC LIMIT 0, 500; +id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND time >= 0 AND time <= 4294967295 ORDER BY time DESC, id2 DESC LIMIT 0, 500; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table FORCE INDEX (id1_type) +WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 +ORDER BY time DESC, id2 DESC LIMIT 0, 500; +id1 id2 link_type visibility data time version +ROWS_READ +0 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 ORDER BY time DESC, id2 DESC LIMIT 0, 500; id1 id2 link_type visibility data time version +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type FROM link_table +WHERE link_type=3 and id1 in (1, 2, 3) +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 1 2 +1 1 2 2 +1 1 3 2 +1 1 4 2 +1 1 5 2 +1 1 6 2 +1 1 7 2 +1 1 8 2 +1 1 9 2 +1 1 10 2 +2 1 1 2 +2 1 2 2 +2 1 3 2 +2 1 4 2 +2 1 5 2 +2 1 6 2 +2 1 7 2 +2 1 8 2 +2 1 9 2 +2 1 10 2 +3 1 1 2 +3 1 2 2 +3 1 3 2 +3 1 4 2 +3 1 5 2 +3 1 6 2 +3 1 7 2 +3 1 8 2 +3 1 9 2 +3 1 10 2 +ROWS_READ +30 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type FROM link_table -WHERE link_type=3 and id1 in (1, 2, 3); +WHERE link_type=3 and id1 in (1, 2, 3) +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 1 2 1 1 2 2 @@ -2143,14 +687,54 @@ id1 id1_type id2 id2_type 3 1 8 2 3 1 9 2 3 1 10 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1; +WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1 +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 1 2 2 1 1 2 3 1 1 2 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table +WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1 +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 1 2 +2 1 1 2 +3 1 1 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table +WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5) +ORDER BY link_type, id1, id2; +id1 id1_type id2 id2_type +1 1 3 2 +1 1 4 2 +1 1 5 2 +2 1 3 2 +2 1 4 2 +2 1 5 2 +3 1 3 2 +3 1 4 2 +3 1 5 2 +ROWS_READ +9 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5); +WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5) +ORDER BY link_type, id1, id2; id1 id1_type id2 id2_type 1 1 3 2 1 1 4 2 @@ -2161,6 +745,29 @@ id1 id1_type id2 id2_type 3 1 3 2 3 1 4 2 3 1 5 2 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, data, version, time +FROM link_table FORCE INDEX (id1_type) +WHERE id1=9 and link_type=5; +id1 id2 data version time +9 9 0 125 10 +9 7 012 125 11 +9 8 01 125 11 +9 4 012345 125 12 +9 5 01234 125 12 +9 6 0123 125 12 +9 3 0123456 125 13 +9 2 01234567 125 14 +9 0 0123456789 125 15 +9 1 012345678 125 15 +ROWS_READ +10 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, data, version, time FROM link_table FORCE INDEX (id1_type) WHERE id1=9 and link_type=5; @@ -2175,11 +782,43 @@ id1 id2 data version time 9 2 01234567 125 14 9 0 0123456789 125 15 9 1 012345678 125 15 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 5, 5, 5, 5) AND type = 1; +id type version update_time data +5 1 1 10 data +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 5, 5, 5, 5) AND type = 1; id type version update_time data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 4, 3, 2, 1) AND type = 1; +id type version update_time data +1 1 1 10 data +2 1 1 10 data +3 1 1 10 data +4 1 1 10 data +5 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1; @@ -2189,6 +828,24 @@ id type version update_time data 3 1 1 10 data 4 1 1 10 data 5 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id, type, version, update_time, data +FROM node_table FORCE INDEX (PRIMARY) +WHERE id IN (5, 4, 3, 2, 1) AND type = 1 ORDER BY id DESC; +id type version update_time data +5 1 1 10 data +4 1 1 10 data +3 1 1 10 data +2 1 1 10 data +1 1 1 10 data +ROWS_READ +5 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1 ORDER BY id DESC; @@ -2198,38 +855,106 @@ id type version update_time data 3 1 1 10 data 2 1 1 10 data 1 1 1 10 data +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 -WHERE link_type=1 and id1=2 and id2 > 1; +WHERE link_type=1 and id1=2 and id2 >= 1; id1 id2 data time version +2 1 data21 1 1 2 2 data22 1 1 2 3 data32 1 1 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; id1 id2 data time version 2 1 data21 1 1 2 2 data22 1 1 2 3 data32 1 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Range query with PK key only +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2=1; +id2 +1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; id2 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; id2 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2=1; +id2 +1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Range query with PK key only with filters +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2 > 1; +id2 +2 +3 +ROWS_READ +2 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 > 1; id2 2 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id2 FROM link_table5 +WHERE link_type=1 and id1=2 and id2 >= 1; +id2 +1 +2 +3 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; id2 1 2 3 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] CREATE TABLE `link_table7` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0' , `id1_type` int(10) unsigned NOT NULL DEFAULT '0' , @@ -2260,6 +985,20 @@ insert into link_table7 values (9223372036854775807, 100, 1223372036854775803, '0123456789012345678901234567890123456789012345678901234567890123456789' '0123456789012345678901234567890123456789012345678901234567890123456789' '0123456789012345678901234567890', 1234563, 9223372036854775803); +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table7 FORCE INDEX (id1_type) +WHERE link_type = 9223372036854775807 and id1 = 9223372036854775807 +and visibility = 0 ORDER BY time ASC, id2 ASC limit 0, 1000; +id1 id2 link_type visibility data time version +9223372036854775807 9223372036854775801 9223372036854775807 0 data1 1234561 9223372036854775801 +9223372036854775807 1223372036854775802 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234562 9223372036854775802 +9223372036854775807 1223372036854775803 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234563 9223372036854775803 +ROWS_READ +3 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table7 FORCE INDEX (id1_type) WHERE link_type = 9223372036854775807 and id1 = 9223372036854775807 @@ -2268,6 +1007,9 @@ id1 id2 link_type visibility data time version 9223372036854775807 9223372036854775801 9223372036854775807 0 data1 1234561 9223372036854775801 9223372036854775807 1223372036854775802 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234562 9223372036854775802 9223372036854775807 1223372036854775803 9223372036854775807 0 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234563 9223372036854775803 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] DROP TABLE link_table7; CREATE TABLE `link_table8` ( `id1` bigint(20) unsigned NOT NULL DEFAULT '0' , @@ -2285,28 +1027,49 @@ COMMENT 'rev:cf_assoc_id1_type' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; insert into link_table8 values (1, 0x03030303, 1, 0, 100, 0, 'data1', 0, 0); +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version +FROM link_table8 FORCE INDEX (PRIMARY) WHERE link_type = 100 and id1 = 1 +ORDER BY id2 ASC limit 0, 1000; +id1 id2 link_type visibility data time version +1 1 100 0 data1 0 0 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table8 FORCE INDEX (PRIMARY) WHERE link_type = 100 and id1 = 1 ORDER BY id2 ASC limit 0, 1000; id1 id2 link_type visibility data time version 1 1 100 0 data1 0 0 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] DROP TABLE link_table8; # Establish connection con1 (user=root) # Switch to connection con1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 0 -Rows_sent 0 +========== Verifying Bypass Query ========== +WITH BYPASS: +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM link_table5 FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 ASC LIMIT 1; +id1 id2 link_type visibility data TIME version +1 2 1 1 data12 1 1 +ROWS_READ +1 +include/assert.inc [Verify executed in bypass] +WITHOUT BYPASS: SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version FROM link_table5 FORCE INDEX (PRIMARY) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 ORDER BY id2 ASC LIMIT 1; id1 id2 link_type visibility data TIME version 1 2 1 1 data12 1 1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 1 -Rows_sent 1 +include/assert.inc [Verify not executed in bypass] +include/assert.inc [Verify bypass and regular query return same number of rows] +include/assert.inc [Verify bypass reads no more than regular query] # Switch back to default connection select @@rocksdb_select_bypass_policy; @@rocksdb_select_bypass_policy @@ -2320,13 +1083,14 @@ FROM information_schema.global_status WHERE variable_name="rocksdb_select_bypass_executed"; SELECT @executed_end-@executed_start AS ROCKSDB_SELECT_BYPASS_EXECUTED; ROCKSDB_SELECT_BYPASS_EXECUTED -128 +28 DROP TABLE count_table; DROP TABLE link_table; DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table3; DROP TABLE link_table6; DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_basic.inc b/mysql-test/suite/rocksdb/t/bypass_select_basic.inc index 7858cbcaad83..b54c9c6b6cf2 100644 --- a/mysql-test/suite/rocksdb/t/bypass_select_basic.inc +++ b/mysql-test/suite/rocksdb/t/bypass_select_basic.inc @@ -263,148 +263,215 @@ SELECT @bypass_queries_range_new - @bypass_queries_range_old; SELECT @bypass_rows_sent_new - @bypass_rows_sent_old; --echo # Point query +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2=2 AND link_type=3; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2, 3, 4) AND link_type=3; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1=1 AND id2 IN (2) AND link_type=3; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1) AND id2 IN (2) AND link_type=3; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1 IN (1, 2) AND id2 IN (2, 3, 4) AND link_type=3; +--source ../include/verify_bypass_query.inc --echo # Prefix range query --echo # Prefix range query with SK +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME DESC LIMIT 10; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND time = 10 ORDER BY TIME ASC LIMIT 10; +--source ../include/verify_bypass_query.inc --echo # Prefix range query with SK with limits +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0,10; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0,5; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 0,1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,10; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,5; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 1,0; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,10; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,5; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 5,0; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,10; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,5; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND time >= 10 ORDER BY TIME DESC LIMIT 10,0; +--source ../include/verify_bypass_query.inc --echo # Prefix range query with PK +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +--source ../include/verify_bypass_query.inc --echo # Prefix range query with PK + value +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 DESC; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (PRIMARY) WHERE link_type=3 AND id1=1 ORDER BY id2 ASC; +--source ../include/verify_bypass_query.inc --echo # Transaction BEGIN; @@ -435,8 +502,10 @@ SELECT /*+ bypass */ id1 FROM link_table where link_type="3" AND id1=x'01'; SELECT /*+ bypass */ id1 FROM link_table where link_type="3" AND id1=NULL; --echo # Full table scan +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version FROM link_table WHERE id1_type=1; +--source ../include/verify_bypass_query.inc --echo MultiGet @@ -444,26 +513,44 @@ select @@rocksdb_select_bypass_multiget_min into @save_rocksdb_select_bypass_multiget_min; set global rocksdb_select_bypass_multiget_min=0; +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table WHERE id1=1 and id2 IN (1) and link_type=3; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3) and link_type=3 ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc BEGIN; +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc ROLLBACK; BEGIN; UPDATE link_table set data="cde" WHERE id1=1 and id2=2 and link_type = 3; +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc ROLLBACK; +let bypass_query= SELECT /*+ bypass */ id1,id2,id1_type,id2_type,data,version from link_table -WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3; +WHERE id1=1 and id2 IN (1, 2, 3, 4, 5) and link_type=3 +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc set global rocksdb_select_bypass_multiget_min= @save_rocksdb_select_bypass_multiget_min; @@ -505,6 +592,7 @@ DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table6; DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_pk.inc b/mysql-test/suite/rocksdb/t/bypass_select_range_pk.inc new file mode 100644 index 000000000000..93f910cff8b0 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_pk.inc @@ -0,0 +1,315 @@ +# Bypass range query test for PRIMARY KEY $query_table +# Parameters +# $query_order +# ASC or DESC in SELECT query +# $query_table +# Which table + +--echo # Prefix queries +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 1 AND visibility = 3 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND visibility = 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +--echo # Range queries + +--echo # > and >= +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +--echo # < and <= + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 0 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 0 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 1 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 2 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 <= 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 < 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +--echo # Both > and < + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 3 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 4 AND id2 < 3 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 < 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 <= 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 3 AND id2 < 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 3 AND id2 <= 4 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 < 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 <= 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 1 AND id2 < 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 1 AND id2 <= 5 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 <= 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 < 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 > 0 AND id2 <= 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (PRIMARY) +WHERE link_type = 1 AND id1 = 2 AND id2 >= 0 AND id2 < 6 +ORDER BY id2 $query_order LIMIT 1000; +--source ../include/verify_bypass_query.inc diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_pk.test b/mysql-test/suite/rocksdb/t/bypass_select_range_pk.test new file mode 100644 index 000000000000..81e8d1f01c7f --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_pk.test @@ -0,0 +1,34 @@ +--source include/have_rocksdb.inc +--source ../include/bypass_create_table.inc + +--echo # Range query, PRIMARY KEY +--echo # forward column family + Ascending +--let query_order=ASC +--let query_table=link_table5 +--source bypass_select_range_pk.inc + +--echo # forward column family + Descending +--let query_order=DESC +--let query_table=link_table5 +--source bypass_select_range_pk.inc + +--echo # reverse column family + Ascending +--let query_order=ASC +--let query_table=link_table5_rev +--source bypass_select_range_pk.inc + +--echo # reverse column family + Descending +--let query_order=DESC +--let query_table=link_table5_rev +--source bypass_select_range_pk.inc + +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom-master.opt b/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom-master.opt new file mode 100644 index 000000000000..81bc90b05312 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom-master.opt @@ -0,0 +1,3 @@ +--rocksdb_default_cf_options=write_buffer_size=128m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=20;level0_stop_writes_trigger=30;max_write_buffer_number=4;compression_per_level=kLZ4Compression;bottommost_compression=kZSTD;compression_opts=-14:6:0;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=0};prefix_extractor=capped:12;level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;memtable_prefix_bloom_size_ratio=0.039;max_compaction_bytes=402653184;report_bg_io_stats=true;compaction_pri=kMinOverlappingRatio;soft_pending_compaction_bytes_limit=20480000000 +--rocksdb_override_cf_options=cf_assoc={prefix_extractor=capped:28};cf_assoc_count={prefix_extractor=capped:20};rev:cf_assoc_id1_type={prefix_extractor=capped:20};cf_fbobj_type_id={prefix_extractor=capped:16};cf_assoc_disagg={prefix_extractor=capped:20};__system__={write_buffer_size=16m}; + diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom.test b/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom.test new file mode 100644 index 000000000000..81e8d1f01c7f --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_pk_bloom.test @@ -0,0 +1,34 @@ +--source include/have_rocksdb.inc +--source ../include/bypass_create_table.inc + +--echo # Range query, PRIMARY KEY +--echo # forward column family + Ascending +--let query_order=ASC +--let query_table=link_table5 +--source bypass_select_range_pk.inc + +--echo # forward column family + Descending +--let query_order=DESC +--let query_table=link_table5 +--source bypass_select_range_pk.inc + +--echo # reverse column family + Ascending +--let query_order=ASC +--let query_table=link_table5_rev +--source bypass_select_range_pk.inc + +--echo # reverse column family + Descending +--let query_order=DESC +--let query_table=link_table5_rev +--source bypass_select_range_pk.inc + +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_sk.inc b/mysql-test/suite/rocksdb/t/bypass_select_range_sk.inc new file mode 100644 index 000000000000..9181414aa8a4 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_sk.inc @@ -0,0 +1,409 @@ +# Bypass range query test for SECONDARY KEY id1_type +# Parameters +# $query_order +# ASC or DESC in SELECT query +# $query_table +# Which table + +--echo # prefix +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND + TIME >= 10 AND TIME <= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 9 AND TIME <= 12 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 9 AND TIME <= 11 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 0 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 0 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 8 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 9 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 7 AND TIME <= 8 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility $query_order LIMIT 0, 1000; + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type $query_order, visibility $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +--echo # Range query +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND + TIME >= 10 AND TIME <= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 9 AND TIME <= 12 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 9 AND TIME <= 11 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND + TIME >= 7 AND TIME <= 8 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 1 +ORDER BY visibility $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE id1 = 1 +ORDER BY link_type $query_order, visibility $query_order +LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 10 AND TIME < 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 10 AND TIME < 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 10 AND TIME <= 15 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 10 AND TIME <= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 10 AND TIME < 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 10 AND TIME < 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 10 AND TIME <= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 9 AND TIME <= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 9 AND TIME < 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME >= 9 AND TIME < 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 9 AND TIME <= 16 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +--echo # Invalid range +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 10 AND TIME <= 9 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= +SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version +FROM $query_table FORCE INDEX (id1_type) +WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND + TIME > 9 AND TIME <= 9 +ORDER BY TIME $query_order, id2 $query_order LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_sk.test b/mysql-test/suite/rocksdb/t/bypass_select_range_sk.test new file mode 100644 index 000000000000..685beff04b74 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_sk.test @@ -0,0 +1,38 @@ +--source include/have_rocksdb.inc +--source ../include/bypass_create_table.inc + +--echo # Range query, SECONDARY KEY +--echo # Reverse Column family + ascending + +--let query_order=ASC +--let query_table=link_table +--source bypass_select_range_sk.inc + +--echo # Reverse Column family + descending + +--let query_order=DESC +--let query_table=link_table +--source bypass_select_range_sk.inc + +--echo # forward column family + ascending + +--let query_order=ASC +--let query_table=link_table2 +--source bypass_select_range_sk.inc + +--echo # forward column family + descending + +--let query_order=DESC +--let query_table=link_table2 +--source bypass_select_range_sk.inc + +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom-master.opt b/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom-master.opt new file mode 100644 index 000000000000..81bc90b05312 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom-master.opt @@ -0,0 +1,3 @@ +--rocksdb_default_cf_options=write_buffer_size=128m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=20;level0_stop_writes_trigger=30;max_write_buffer_number=4;compression_per_level=kLZ4Compression;bottommost_compression=kZSTD;compression_opts=-14:6:0;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=0};prefix_extractor=capped:12;level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;memtable_prefix_bloom_size_ratio=0.039;max_compaction_bytes=402653184;report_bg_io_stats=true;compaction_pri=kMinOverlappingRatio;soft_pending_compaction_bytes_limit=20480000000 +--rocksdb_override_cf_options=cf_assoc={prefix_extractor=capped:28};cf_assoc_count={prefix_extractor=capped:20};rev:cf_assoc_id1_type={prefix_extractor=capped:20};cf_fbobj_type_id={prefix_extractor=capped:16};cf_assoc_disagg={prefix_extractor=capped:20};__system__={write_buffer_size=16m}; + diff --git a/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom.test b/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom.test new file mode 100644 index 000000000000..685beff04b74 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/bypass_select_range_sk_bloom.test @@ -0,0 +1,38 @@ +--source include/have_rocksdb.inc +--source ../include/bypass_create_table.inc + +--echo # Range query, SECONDARY KEY +--echo # Reverse Column family + ascending + +--let query_order=ASC +--let query_table=link_table +--source bypass_select_range_sk.inc + +--echo # Reverse Column family + descending + +--let query_order=DESC +--let query_table=link_table +--source bypass_select_range_sk.inc + +--echo # forward column family + ascending + +--let query_order=ASC +--let query_table=link_table2 +--source bypass_select_range_sk.inc + +--echo # forward column family + descending + +--let query_order=DESC +--let query_table=link_table2 +--source bypass_select_range_sk.inc + +DROP TABLE count_table; +DROP TABLE link_table; +DROP TABLE link_table2; +DROP TABLE id_table; +DROP TABLE node_table; +DROP TABLE link_table5; +DROP TABLE link_table5_rev; +DROP TABLE link_table3; +DROP TABLE link_table6; +DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_scenarios.inc b/mysql-test/suite/rocksdb/t/bypass_select_scenarios.inc index 42423f4693fd..64e278e8ee41 100644 --- a/mysql-test/suite/rocksdb/t/bypass_select_scenarios.inc +++ b/mysql-test/suite/rocksdb/t/bypass_select_scenarios.inc @@ -9,1150 +9,182 @@ SELECT variable_value into @executed_start FROM information_schema.global_status WHERE variable_name="rocksdb_select_bypass_executed"; -# Range query, flag = 0 ---echo # Reverse Column family + ascending - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - ---echo # Reverse Column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - ---echo # column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - ---echo # column family + descending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type DESC, visibility DESC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 3 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; - ---echo # column family + ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 3 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 AND visibility = 4 AND - TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 5 AND id1 = 1 AND visibility = 4 AND - TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE link_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - -SELECT id1, id2, link_type, visibility, data, TIME, version -FROM link_table2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY link_type ASC, visibility ASC LIMIT 0, 1000; - ---echo # Range query, flag = 1 ---echo # Ascending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 ASC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; - ---echo # Dscending -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 DESC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; - -SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version -FROM link_table5 FORCE INDEX (PRIMARY) -WHERE link_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; - --echo # Range query, binary key +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND visibility = 1 AND time >= 0 AND time <= 4294967295 ORDER BY time DESC, id2 DESC LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table4 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND visibility = 1 AND time >= 0 AND time <= 4294967295 ORDER BY time ASC, id2 ASC LIMIT 0, 1000; +--source ../include/verify_bypass_query.inc --echo # Point query, flag = 0 +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5) AND type = 1; +WHERE id IN (1, 2, 3, 4, 5) AND type = 1 +ORDER BY type, id; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (1) AND type = 1; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) -WHERE id = 2 AND type = 1; +WHERE id = 2 AND type = 1 +ORDER BY type, id; +--source ../include/verify_bypass_query.inc --echo # Point query, flag = 1 +let bypass_query= SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) -WHERE id IN (1, 2, 3, 4, 5); +WHERE id IN (1, 2, 3, 4, 5) +ORDER BY id; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id IN (1); +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id, type, row_created_time, is_deleted FROM id_table FORCE INDEX (PRIMARY) WHERE id = 1; +--source ../include/verify_bypass_query.inc --echo # Point query, flag = 2 +let bypass_query= SELECT /*+ bypass */ id, type, link_type, count, TIME, version FROM count_table WHERE id = 2 AND link_type = 1; +--source ../include/verify_bypass_query.inc --echo # Bugs found when debugging real production scenarios # pk_unpack_buf unassigned when unpack_pk=false and unpack_value=true # PinnableSlice destroyed before send_row +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table3 FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 AND time >= 0 AND time <= 4294967295 ORDER BY time DESC, id2 DESC LIMIT 0, 10000; +--source ../include/verify_bypass_query.inc # Partial keys should not be unpacked +let bypass_query= SELECT /*+ bypass */ data from link_table6 FORCE INDEX (id1_type) where id1=1; +--source ../include/verify_bypass_query.inc # time >= ONLY crashes +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND time >= 0 AND time <= 4294967295 ORDER BY time DESC, id2 DESC LIMIT 0, 500; +--source ../include/verify_bypass_query.inc +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table FORCE INDEX (id1_type) WHERE link_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 ORDER BY time DESC, id2 DESC LIMIT 0, 500; +--source ../include/verify_bypass_query.inc # IN expression multiplexing +let bypass_query= SELECT /*+ bypass */ id1, id1_type, id2, id2_type FROM link_table -WHERE link_type=3 and id1 in (1, 2, 3); +WHERE link_type=3 and id1 in (1, 2, 3) +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc # IN expression multiplexing in middle +let bypass_query= SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1; +WHERE link_type=3 and id1 IN (1, 2, 3) and id2=1 +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc # IN expression with multiple IN +let bypass_query= SELECT /*+ bypass */ id1, id1_type, id2, id2_type from link_table -WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5); +WHERE link_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5) +ORDER BY link_type, id1, id2; +--source ../include/verify_bypass_query.inc # Decoding varchar with extra padding spaces from index +let bypass_query= SELECT /*+ bypass */ id1, id2, data, version, time FROM link_table FORCE INDEX (id1_type) WHERE id1=9 and link_type=5; +--source ../include/verify_bypass_query.inc # Point query with duplicate items +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 5, 5, 5, 5) AND type = 1; +--source ../include/verify_bypass_query.inc # Point query with reverse order +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1; +--source ../include/verify_bypass_query.inc # Point query with correct order +let bypass_query= SELECT /*+ bypass */ id, type, version, update_time, data FROM node_table FORCE INDEX (PRIMARY) WHERE id IN (5, 4, 3, 2, 1) AND type = 1 ORDER BY id DESC; +--source ../include/verify_bypass_query.inc # Range query with bloom filter +let bypass_query= SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 WHERE link_type=1 and id1=2 and id2 > 1; +let bypass_query= SELECT /*+ bypass */ id1, id2, data, time, version FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; +--source ../include/verify_bypass_query.inc --echo # Range query with PK key only +let bypass_query= SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2=1; +--source ../include/verify_bypass_query.inc --echo # Range query with PK key only with filters +let bypass_query= SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 > 1; +--source ../include/verify_bypass_query.inc + +let bypass_query= SELECT /*+ bypass */ id2 FROM link_table5 WHERE link_type=1 and id1=2 and id2 >= 1; +--source ../include/verify_bypass_query.inc # Prefix query returning large rows causing reallocation m_row_buf # which lead to stale pointers in m_send_mapping.first @@ -1187,10 +219,12 @@ insert into link_table7 values (9223372036854775807, 100, 1223372036854775803, '0123456789012345678901234567890123456789012345678901234567890123456789' '0123456789012345678901234567890', 1234563, 9223372036854775803); +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table7 FORCE INDEX (id1_type) WHERE link_type = 9223372036854775807 and id1 = 9223372036854775807 and visibility = 0 ORDER BY time ASC, id2 ASC limit 0, 1000; +--source ../include/verify_bypass_query.inc DROP TABLE link_table7; @@ -1212,9 +246,11 @@ CREATE TABLE `link_table8` ( ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; insert into link_table8 values (1, 0x03030303, 1, 0, 100, 0, 'data1', 0, 0); +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, time, version FROM link_table8 FORCE INDEX (PRIMARY) WHERE link_type = 100 and id1 = 1 ORDER BY id2 ASC limit 0, 1000; +--source ../include/verify_bypass_query.inc DROP TABLE link_table8; @@ -1225,14 +261,12 @@ connect (con1,localhost,root,,); --echo # Switch to connection con1 connection con1; -SHOW STATUS LIKE 'rows_%'; - +let bypass_query= SELECT /*+ bypass */ id1, id2, link_type, visibility, data, TIME, version FROM link_table5 FORCE INDEX (PRIMARY) WHERE link_type = 1 AND id1 = 1 AND visibility = 1 ORDER BY id2 ASC LIMIT 1; - -SHOW STATUS LIKE 'rows_%'; +--source ../include/verify_bypass_query.inc --echo # Switch back to default connection connection default; @@ -1253,6 +287,7 @@ DROP TABLE link_table2; DROP TABLE id_table; DROP TABLE node_table; DROP TABLE link_table5; +DROP TABLE link_table5_rev; DROP TABLE link_table3; DROP TABLE link_table6; DROP TABLE link_table4; diff --git a/mysql-test/suite/rocksdb/t/bypass_select_scenarios.result b/mysql-test/suite/rocksdb/t/bypass_select_scenarios.result deleted file mode 100644 index ab0a1f214326..000000000000 --- a/mysql-test/suite/rocksdb/t/bypass_select_scenarios.result +++ /dev/null @@ -1,2252 +0,0 @@ -CREATE TABLE `assoc_info` ( -`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , -`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , -`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , -`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0' , -`visibility` tinyint(3) NOT NULL DEFAULT '0' , -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , -`time` int(10) unsigned NOT NULL DEFAULT '0' , -`version` bigint(20) unsigned NOT NULL DEFAULT '0' , -PRIMARY KEY (`assoc_type` , `id1` , `id2`) COMMENT 'cf_assoc' , -KEY `id1_type` (`id1` , `assoc_type` , `visibility` , `time` , `id2` , -`version` , `data`) COMMENT 'rev:cf_assoc_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 -COMMENT='Associations core storage recompression-B-JUN12'; -CREATE TABLE `assoc_info2` ( -`id1` bigint(20) unsigned NOT NULL DEFAULT '0' , -`id1_type` int(10) unsigned NOT NULL DEFAULT '0' , -`id2` bigint(20) unsigned NOT NULL DEFAULT '0' , -`id2_type` int(10) unsigned NOT NULL DEFAULT '0' , -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0' , -`visibility` tinyint(3) NOT NULL DEFAULT '0' , -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' , -`time` int(10) unsigned NOT NULL DEFAULT '0' , -`version` bigint(20) unsigned NOT NULL DEFAULT '0' , -PRIMARY KEY (`assoc_type` , `id1` , `id2`) -COMMENT 'cf_assoc' , -KEY `id1_type` (`id1` , `assoc_type` , `visibility` , `time` , `id2` , -`version` , `data`) COMMENT 'cf_assoc_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=9 -COMMENT='Associations core storage recompression-B-JUN12'; -insert into assoc_info values (1, 1, 1, 2, 3, 4, 'a10', 10, 125); -insert into assoc_info values (1, 1, 2, 2, 3, 3, 'a10', 10, 125); -insert into assoc_info values (1, 1, 3, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (1, 1, 4, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (1, 1, 5, 2, 3, 3, 'a12', 12, 125); -insert into assoc_info values (1, 1, 6, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (1, 1, 7, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (1, 1, 8, 2, 3, 4, 'a13', 13, 125); -insert into assoc_info values (1, 1, 9, 2, 3, 4, 'a14', 14, 125); -insert into assoc_info values (1, 1, 10, 2, 3, 4, 'a15', 15, 125); -insert into assoc_info values (2, 1, 1, 2, 3, 4, 'a10', 10, 125); -insert into assoc_info values (2, 1, 2, 2, 3, 4, 'a10', 10, 125); -insert into assoc_info values (2, 1, 3, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (2, 1, 4, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (2, 1, 5, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 6, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 7, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 8, 2, 3, 4, 'a13', 13, 125); -insert into assoc_info values (2, 1, 9, 2, 3, 4, 'a14', 14, 125); -insert into assoc_info values (2, 1, 10, 2, 3, 4, 'a15', 15, 125); -insert into assoc_info values (2, 1, 1, 2, 4, 4, 'a10', 10, 125); -insert into assoc_info values (2, 1, 2, 2, 4, 4, 'a10', 10, 125); -insert into assoc_info values (2, 1, 3, 2, 4, 4, 'a11', 11, 125); -insert into assoc_info values (2, 1, 4, 2, 4, 4, 'a11', 11, 125); -insert into assoc_info values (2, 1, 5, 2, 4, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 6, 2, 4, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 7, 2, 4, 4, 'a12', 12, 125); -insert into assoc_info values (2, 1, 8, 2, 4, 4, 'a13', 13, 125); -insert into assoc_info values (2, 1, 9, 2, 4, 4, 'a14', 14, 125); -insert into assoc_info values (2, 1, 10, 2, 4, 4, 'a15', 15, 125); -insert into assoc_info values (3, 1, 10, 2, 3, 4, 'a10', 10, 125); -insert into assoc_info values (3, 1, 9, 2, 3, 4, 'a10', 10, 125); -insert into assoc_info values (3, 1, 8, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (3, 1, 7, 2, 3, 4, 'a11', 11, 125); -insert into assoc_info values (3, 1, 6, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (3, 1, 5, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (3, 1, 4, 2, 3, 4, 'a12', 12, 125); -insert into assoc_info values (3, 1, 3, 2, 3, 4, 'a13', 13, 125); -insert into assoc_info values (3, 1, 2, 2, 3, 4, 'a14', 14, 125); -insert into assoc_info values (3, 1, 1, 2, 3, 4, 'a15', 15, 125); -insert into assoc_info values (9, 1, 9, 2, 5, 6, '0 ', 10, 125); -insert into assoc_info values (9, 1, 8, 2, 5, 6, '01 ', 11, 125); -insert into assoc_info values (9, 1, 7, 2, 5, 6, '012 ', 11, 125); -insert into assoc_info values (9, 1, 6, 2, 5, 6, '0123 ', 12, 125); -insert into assoc_info values (9, 1, 5, 2, 5, 6, '01234 ', 12, 125); -insert into assoc_info values (9, 1, 4, 2, 5, 6, '012345 ', 12, 125); -insert into assoc_info values (9, 1, 3, 2, 5, 6, '0123456 ', 13, 125); -insert into assoc_info values (9, 1, 2, 2, 5, 6, '01234567 ', 14, 125); -insert into assoc_info values (9, 1, 1, 2, 5, 6, '012345678 ', 15, 125); -insert into assoc_info values (9, 1, 0, 2, 5, 6, '0123456789 ', 15, 125); -insert into assoc_info2 select * from assoc_info; -CREATE TABLE `fbid` ( -`fbid` bigint(20) NOT NULL DEFAULT '0', -`fbtype` int(11) NOT NULL DEFAULT '0', -`row_created_time` int(11) NOT NULL DEFAULT '0', -`hash_key` varchar(255) NOT NULL DEFAULT '', -`is_deleted` tinyint(4) DEFAULT '0', -PRIMARY KEY (`fbid`), -KEY `type_id` (`fbtype`,`fbid`) -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED -KEY_BLOCK_SIZE=8 COMMENT='recompression A-07-12'; -insert into fbid values (1, 1, 10, '111', 0); -insert into fbid values (2, 1, 10, '111', 1); -insert into fbid values (3, 1, 10, '111', 0); -insert into fbid values (4, 1, 10, '111', 1); -insert into fbid values (5, 1, 10, '111', 0); -insert into fbid values (6, 1, 10, '111', 1); -insert into fbid values (7, 1, 10, '111', 0); -insert into fbid values (8, 1, 10, '111', 1); -insert into fbid values (9, 1, 10, '111', 0); -insert into fbid values (10, 1, 10, '111', 1); -CREATE TABLE `fbobj_user` ( -`fbid` bigint(20) unsigned NOT NULL DEFAULT '0', -`fbtype` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -`update_time` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_presence_bits` bigint(20) unsigned NOT NULL DEFAULT '0', -`apb_version` tinyint(3) unsigned NOT NULL DEFAULT '0', -`data` mediumtext COLLATE latin1_bin NOT NULL, -PRIMARY KEY (`fbtype`,`fbid`) COMMENT 'cf_fbobj_type_id', -KEY `fbid` (`fbid`) COMMENT 'cf_fbobj' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 COMMENT='recompression A-07-12'; -insert into fbobj_user values (1, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (2, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (3, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (4, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (5, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (6, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (7, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (8, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (9, 1, 1, 10, 1, 1, 'data'); -insert into fbobj_user values (10, 1, 1, 10, 1, 1, 'data'); -CREATE TABLE `assoc_count` ( -`id` bigint(20) unsigned NOT NULL DEFAULT '0', -`id_type` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`count` int(10) unsigned NOT NULL DEFAULT '0', -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`id`,`assoc_type`) COMMENT 'cf_assoc_count' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 -COMMENT='clear assoc_type 171747262870076'; -insert into assoc_count values (2, 1, 1, 1, 10, 20); -insert into assoc_count values (3, 1, 1, 1, 10, 20); -insert into assoc_count values (4, 1, 1, 1, 10, 20); -insert into assoc_count values (5, 1, 1, 1, 10, 20); -insert into assoc_count values (6, 1, 1, 1, 10, 20); -insert into assoc_count values (7, 1, 1, 1, 10, 20); -insert into assoc_count values (8, 1, 1, 1, 10, 20); -insert into assoc_count values (9, 1, 1, 1, 10, 20); -insert into assoc_count values (10, 1, 1, 1, 10, 20); -CREATE TABLE `assoc_like` ( -`id1` bigint(20) unsigned NOT NULL DEFAULT '0', -`id1_type` int(10) unsigned NOT NULL DEFAULT '0', -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(3) NOT NULL DEFAULT '0', -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`assoc_type`,`id1`,`id2`) COMMENT 'cf_assoc' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 COMMENT='recompression 2015-01-29'; -insert into assoc_like values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); -insert into assoc_like values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); -insert into assoc_like values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); -insert into assoc_like values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); -insert into assoc_like values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); -insert into assoc_like values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); -insert into assoc_like values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); -CREATE TABLE `assoc_lastN` ( -`id1` bigint(20) unsigned NOT NULL DEFAULT '0', -`id1_type` int(10) unsigned NOT NULL DEFAULT '0', -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(4) NOT NULL DEFAULT '0', -`data` text COLLATE latin1_bin NOT NULL, -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`assoc_type`,`id1`,`id2`) COMMENT 'cf_assoc', -KEY `id1_type` (`id1`,`assoc_type`,`visibility`,`time`,`id2`,`version`) -COMMENT 'rev:cf_assoc_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 COMMENT='Defrag 2017-08'; -insert into assoc_lastN values (1, 1, 2, 2, 1, 1, 'data12', 1, 1); -insert into assoc_lastN values (1, 1, 3, 2, 1, 2, 'data13', 1, 1); -insert into assoc_lastN values (1, 1, 4, 2, 1, 2, 'data14', 1, 1); -insert into assoc_lastN values (1, 1, 5, 2, 1, 1, 'data15', 1, 1); -insert into assoc_lastN values (2, 1, 1, 2, 1, 1, 'data21', 1, 1); -insert into assoc_lastN values (2, 1, 2, 2, 1, 1, 'data22', 1, 1); -insert into assoc_lastN values (2, 1, 3, 2, 1, 1, 'data32', 1, 1); -CREATE TABLE `assoc_text` ( -`id1` bigint(20) unsigned NOT NULL DEFAULT '0', -`id1_type` int(10) unsigned NOT NULL DEFAULT '0', -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(4) NOT NULL DEFAULT '0', -`data` text COLLATE latin1_bin NOT NULL, -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`assoc_type`,`id1`,`id2`) COMMENT 'cf_assoc', -KEY `id1_type` (`id1`,`assoc_type`,`visibility`,`time`,`id2`,`version`, -`data`(255)) COMMENT 'rev:cf_assoc_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -insert into assoc_text values (1, 1, 2, 2, 1, 1, -'data12_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (1, 1, 3, 2, 1, 2, -'data13_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (1, 1, 4, 2, 1, 2, -'data14_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (1, 1, 5, 2, 1, 1, -'data15_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (2, 1, 1, 2, 1, 1, -'data21_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (2, 1, 2, 2, 1, 1, -'data22_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -insert into assoc_text values (2, 1, 3, 2, 1, 1, -'data32_12345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890123456789012345678901234567890123456789' - '0123456789012345678901234567890', 1, 1); -CREATE TABLE `assoc_nc_key_info` ( -`id1` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -`raw_key` text COLLATE latin1_bin, -`id2` bigint(20) unsigned NOT NULL DEFAULT '0', -`id2_type` int(10) unsigned NOT NULL DEFAULT '0', -`assoc_type` bigint(20) unsigned NOT NULL DEFAULT '0', -`visibility` tinyint(3) NOT NULL DEFAULT '0', -`data` varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '', -`time` int(10) unsigned NOT NULL DEFAULT '0', -`version` bigint(20) unsigned NOT NULL DEFAULT '0', -PRIMARY KEY (`assoc_type`,`id1`,`id2`) COMMENT 'cf_assoc', -KEY `id1_type` (`id1`,`assoc_type`,`visibility`,`time`,`id2`,`version`,`data`) -COMMENT 'rev:cf_assoc_id1_type' -) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -insert into assoc_nc_key_info values ('a1', "rk1", 2, 2, 1, 1, 'data12', 1, 1); -insert into assoc_nc_key_info values ('a1', "rk2", 3, 2, 1, 2, 'data13', 1, 1); -insert into assoc_nc_key_info values ('a1', "rk3", 4, 2, 1, 2, 'data14', 1, 1); -insert into assoc_nc_key_info values ('a1', "rk4", 5, 2, 1, 1, 'data15', 1, 1); -insert into assoc_nc_key_info values ('b1', "rk5", 1, 2, 1, 1, 'data21', 1, 1); -insert into assoc_nc_key_info values ('b1', "rk6", 2, 2, 1, 1, 'data22', 1, 1); -insert into assoc_nc_key_info values ('b1', "rk7", 3, 2, 1, 1, 'data32', 1, 1); -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -2 -select @@rocksdb_select_bypass_policy into @save_rocksdb_select_bypass_policy; -set global rocksdb_select_bypass_policy=0; -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -0 -# Reverse Column family + ascending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# Reverse Column family + descending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 9 3 4 a10 10 125 -3 10 3 4 a10 10 125 -3 7 3 4 a11 11 125 -3 8 3 4 a11 11 125 -3 4 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 6 3 4 a12 12 125 -3 3 3 4 a13 13 125 -3 2 3 4 a14 14 125 -3 1 3 4 a15 15 125 -# column family + descending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type DESC, visibility DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -1 9 3 4 a14 14 125 -1 8 3 4 a13 13 125 -1 7 3 4 a12 12 125 -1 6 3 4 a12 12 125 -1 4 3 4 a11 11 125 -1 3 3 4 a11 11 125 -1 1 3 4 a10 10 125 -1 5 3 3 a12 12 125 -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 3 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -3 1 3 4 a15 15 125 -3 2 3 4 a14 14 125 -3 3 3 4 a13 13 125 -3 6 3 4 a12 12 125 -3 5 3 4 a12 12 125 -3 4 3 4 a12 12 125 -3 8 3 4 a11 11 125 -3 7 3 4 a11 11 125 -3 10 3 4 a10 10 125 -3 9 3 4 a10 10 125 -# column family + ascending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND TIME = 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 3 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 12 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 9 AND TIME <= 11 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 9 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 10 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME >= 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND TIME > 16 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 AND visibility = 4 AND -TIME >= 7 AND TIME <= 8 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 5 AND id1 = 1 AND visibility = 4 AND -TIME >= 10 AND TIME <= 15 -ORDER BY TIME ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE assoc_type = 3 AND id1 = 1 -ORDER BY visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -SELECT id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_info2 FORCE INDEX (id1_type) -WHERE id1 = 1 -ORDER BY assoc_type ASC, visibility ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data TIME version -1 2 3 3 a10 10 125 -1 5 3 3 a12 12 125 -1 1 3 4 a10 10 125 -1 3 3 4 a11 11 125 -1 4 3 4 a11 11 125 -1 6 3 4 a12 12 125 -1 7 3 4 a12 12 125 -1 8 3 4 a13 13 125 -1 9 3 4 a14 14 125 -1 10 3 4 a15 15 125 -# Range query, flag = 1 -# Ascending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -1 2 1 1 data12 1 1 -1 5 1 1 data15 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -1 3 1 2 data13 1 1 -1 4 1 2 data14 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -2 1 1 1 data21 1 1 -2 2 1 1 data22 1 1 -2 3 1 1 data32 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 ASC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -# Dscending -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -1 5 1 1 data15 1 1 -1 2 1 1 data12 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -1 4 1 2 data14 1 1 -1 3 1 2 data13 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 3 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 2 AND visibility = 1 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -2 3 1 1 data32 1 1 -2 2 1 1 data22 1 1 -2 1 1 1 data21 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 2 AND visibility = 2 -ORDER BY id2 DESC LIMIT 1000; -id1 id2 assoc_type visibility data TIME version -# Range query, binary key -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, time, version -FROM assoc_nc_key_info FORCE INDEX (id1_type) -WHERE assoc_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND -visibility = 1 AND time >= 0 AND time <= 4294967295 -ORDER BY time DESC, id2 DESC LIMIT 0, 1000; -id1 id2 assoc_type visibility data time version -a1 5 1 1 data15 1 1 -a1 2 1 1 data12 1 1 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, time, version -FROM assoc_nc_key_info FORCE INDEX (id1_type) -WHERE assoc_type = 1 AND id1 = "a1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" AND -visibility = 1 AND time >= 0 AND time <= 4294967295 -ORDER BY time ASC, id2 ASC LIMIT 0, 1000; -id1 id2 assoc_type visibility data time version -a1 2 1 1 data12 1 1 -a1 5 1 1 data15 1 1 -# Point query, flag = 0 -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid IN (1, 2, 3, 4, 5) AND fbtype = 1; -fbid fbtype version update_time assoc_presence_bits apb_version data -1 1 1 10 1 1 data -2 1 1 10 1 1 data -3 1 1 10 1 1 data -4 1 1 10 1 1 data -5 1 1 10 1 1 data -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid IN (1) AND fbtype = 1; -fbid fbtype version update_time assoc_presence_bits apb_version data -1 1 1 10 1 1 data -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid = 2 AND fbtype = 1; -fbid fbtype version update_time assoc_presence_bits apb_version data -2 1 1 10 1 1 data -# Point query, flag = 1 -SELECT /*+bypass*/ fbid, fbtype, row_created_time, is_deleted -FROM fbid FORCE INDEX (PRIMARY) -WHERE fbid IN (1, 2, 3, 4, 5); -fbid fbtype row_created_time is_deleted -1 1 10 0 -2 1 10 1 -3 1 10 0 -4 1 10 1 -5 1 10 0 -SELECT /*+bypass*/ fbid, fbtype, row_created_time, is_deleted -FROM fbid FORCE INDEX (PRIMARY) -WHERE fbid IN (1); -fbid fbtype row_created_time is_deleted -1 1 10 0 -SELECT /*+bypass*/ fbid, fbtype, row_created_time, is_deleted -FROM fbid FORCE INDEX (PRIMARY) -WHERE fbid = 1; -fbid fbtype row_created_time is_deleted -1 1 10 0 -# Point query, flag = 2 -SELECT /*+bypass*/ id, id_type, assoc_type, count, TIME, version -FROM assoc_count -WHERE id = 2 AND assoc_type = 1; -id id_type assoc_type count TIME version -2 1 1 1 10 20 -# Bugs found when debugging TAO -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, time, version -FROM assoc_lastN FORCE INDEX (id1_type) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 1 -AND time >= 0 AND time <= 4294967295 -ORDER BY time DESC, id2 DESC LIMIT 0, 10000; -id1 id2 assoc_type visibility data time version -1 5 1 1 data15 1 1 -1 2 1 1 data12 1 1 -SELECT /*+bypass*/ data from assoc_text FORCE INDEX (id1_type) where id1=1; -data -data12_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -data15_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -data13_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -data14_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, time, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 AND -time >= 0 AND time <= 4294967295 -ORDER BY time DESC, id2 DESC LIMIT 0, 500; -id1 id2 assoc_type visibility data time version -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, time, version -FROM assoc_info FORCE INDEX (id1_type) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 0 AND time >= 1551074583 -ORDER BY time DESC, id2 DESC LIMIT 0, 500; -id1 id2 assoc_type visibility data time version -SELECT /*+bypass*/ id1, id1_type, id2, id2_type FROM assoc_info -WHERE assoc_type=3 and id1 in (1, 2, 3); -id1 id1_type id2 id2_type -1 1 1 2 -1 1 2 2 -1 1 3 2 -1 1 4 2 -1 1 5 2 -1 1 6 2 -1 1 7 2 -1 1 8 2 -1 1 9 2 -1 1 10 2 -2 1 1 2 -2 1 2 2 -2 1 3 2 -2 1 4 2 -2 1 5 2 -2 1 6 2 -2 1 7 2 -2 1 8 2 -2 1 9 2 -2 1 10 2 -3 1 1 2 -3 1 2 2 -3 1 3 2 -3 1 4 2 -3 1 5 2 -3 1 6 2 -3 1 7 2 -3 1 8 2 -3 1 9 2 -3 1 10 2 -SELECT /*+bypass*/ id1, id1_type, id2, id2_type from assoc_info -WHERE assoc_type=3 and id1 IN (1, 2, 3) and id2=1; -id1 id1_type id2 id2_type -1 1 1 2 -2 1 1 2 -3 1 1 2 -SELECT /*+bypass*/ id1, id1_type, id2, id2_type from assoc_info -WHERE assoc_type=3 and id1 IN (1, 2, 3) and id2 IN (3, 4, 5); -id1 id1_type id2 id2_type -1 1 3 2 -1 1 4 2 -1 1 5 2 -2 1 3 2 -2 1 4 2 -2 1 5 2 -3 1 3 2 -3 1 4 2 -3 1 5 2 -SELECT /*+bypass*/ id1, id2, data, version, time -FROM assoc_info FORCE INDEX (id1_type) -WHERE id1=9 and assoc_type=5; -id1 id2 data version time -9 9 0 125 10 -9 7 012 125 11 -9 8 01 125 11 -9 4 012345 125 12 -9 5 01234 125 12 -9 6 0123 125 12 -9 3 0123456 125 13 -9 2 01234567 125 14 -9 0 0123456789 125 15 -9 1 012345678 125 15 -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid IN (5, 5, 5, 5, 5) AND fbtype = 1; -fbid fbtype version update_time assoc_presence_bits apb_version data -5 1 1 10 1 1 data -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid IN (5, 4, 3, 2, 1) AND fbtype = 1; -fbid fbtype version update_time assoc_presence_bits apb_version data -1 1 1 10 1 1 data -2 1 1 10 1 1 data -3 1 1 10 1 1 data -4 1 1 10 1 1 data -5 1 1 10 1 1 data -SELECT /*+bypass*/ fbid, fbtype, version, update_time, assoc_presence_bits, -apb_version, data -FROM fbobj_user FORCE INDEX (PRIMARY) -WHERE fbid IN (5, 4, 3, 2, 1) AND fbtype = 1 ORDER BY fbid DESC; -fbid fbtype version update_time assoc_presence_bits apb_version data -5 1 1 10 1 1 data -4 1 1 10 1 1 data -3 1 1 10 1 1 data -2 1 1 10 1 1 data -1 1 1 10 1 1 data -SELECT /*+bypass*/ id1, id2, data, time, version FROM assoc_like -WHERE assoc_type=1 and id1=2 and id2 > 1; -id1 id2 data time version -2 2 data22 1 1 -2 3 data32 1 1 -SELECT /*+bypass*/ id1, id2, data, time, version FROM assoc_like -WHERE assoc_type=1 and id1=2 and id2 >= 1; -id1 id2 data time version -2 1 data21 1 1 -2 2 data22 1 1 -2 3 data32 1 1 -# Establish connection con1 (user=root) -# Switch to connection con1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 0 -Rows_sent 0 -SELECT /*+bypass*/ id1, id2, assoc_type, visibility, data, TIME, version -FROM assoc_like FORCE INDEX (PRIMARY) -WHERE assoc_type = 1 AND id1 = 1 AND visibility = 1 -ORDER BY id2 ASC LIMIT 1; -id1 id2 assoc_type visibility data TIME version -1 2 1 1 data12 1 1 -SHOW STATUS LIKE 'rows_%'; -Variable_name Value -Rows_examined 1 -Rows_sent 1 -# Switch back to default connection -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -0 -set global rocksdb_select_bypass_policy=@save_rocksdb_select_bypass_policy; -select @@rocksdb_select_bypass_policy; -@@rocksdb_select_bypass_policy -2 -DROP TABLE assoc_count; -DROP TABLE assoc_info; -DROP TABLE assoc_info2; -DROP TABLE fbid; -DROP TABLE fbobj_user; -DROP TABLE assoc_like; -DROP TABLE assoc_lastN; -DROP TABLE assoc_text; -DROP TABLE assoc_nc_key_info; diff --git a/storage/rocksdb/nosql_access.cc b/storage/rocksdb/nosql_access.cc index 9b371274a930..9e3bca722b93 100644 --- a/storage/rocksdb/nosql_access.cc +++ b/storage/rocksdb/nosql_access.cc @@ -641,6 +641,7 @@ class select_exec { memset(reinterpret_cast(m_field_index_to_where.data()), 0xff, sizeof(m_field_index_to_where)); + m_start_inclusive = m_end_inclusive = true; } bool run(); @@ -708,14 +709,26 @@ class select_exec { }; struct key_index_tuple_writer { - Rdb_string_writer writer; // The KeyIndexTuple - uint eq_len; // Length of prefix key + Rdb_string_writer start; // Start KeyIndexTuple + uint eq_len; // Length of prefix key + Rdb_string_writer end; // End KeyIndexTuple, only used for ranges - rocksdb::Slice to_key_slice() { return writer.to_slice(); } + // Get the slice for packed key - point query only + rocksdb::Slice get_key_slice() { + DBUG_ASSERT(end.is_empty()); + return start.to_slice(); + } + + // Get the start range for packed key - range query only + rocksdb::Slice get_start_key_slice() { return start.to_slice(); } + + // Get the end range for packed key - range query only + rocksdb::Slice get_end_key_slice() { return end.to_slice(); } - rocksdb::Slice to_eq_slice() { - DBUG_ASSERT(eq_len <= writer.get_current_pos()); - return rocksdb::Slice(reinterpret_cast(writer.ptr()), eq_len); + // Return slice for prefix range query + rocksdb::Slice get_eq_slice() { + DBUG_ASSERT(eq_len <= start.get_current_pos()); + return rocksdb::Slice(reinterpret_cast(start.ptr()), eq_len); } }; @@ -732,7 +745,7 @@ class select_exec { bool run_sk_point_query(txn_wrapper *txn); bool pack_index_tuple(uint key_part_no, Rdb_string_writer *writer, const Field *field, Item *item); - bool pack_cond(uint key_part_no, const sql_cond &cond); + bool pack_cond(uint key_part_no, const sql_cond &cond, bool is_start = true); bool send_row(); bool use_bloom_filter(rocksdb::Slice eq_slice); @@ -828,6 +841,10 @@ class select_exec { // LIMIT lower bound // For LIMIT offset, row_count, this is offset uint64_t m_offset_limit; + + // Whether the range query (begin, end) is inclusive in begin/end + bool m_start_inclusive; + bool m_end_inclusive; }; bool select_exec::pack_index_tuple(uint key_part_no, Rdb_string_writer *writer, @@ -900,16 +917,21 @@ bool select_exec::pack_index_tuple(uint key_part_no, Rdb_string_writer *writer, return false; } -bool inline select_exec::pack_cond(uint key_part_no, const sql_cond &cond) { - if (likely(m_key_index_tuples.size() == 1)) { - // Optimize for the common case - if (pack_index_tuple(key_part_no, &m_key_index_tuples[0].writer, cond.field, - cond.val_item)) { - return true; +bool inline select_exec::pack_cond(uint key_part_no, const sql_cond &cond, + bool is_start) { + if (is_start) { + // Start key in range query or key in point query + for (auto &entry : m_key_index_tuples) { + if (pack_index_tuple(key_part_no, &entry.start, cond.field, + cond.val_item)) { + return true; + } } } else { - for (auto &writer : m_key_index_tuples) { - if (pack_index_tuple(key_part_no, &writer.writer, cond.field, + // End key in range query + for (auto &entry : m_key_index_tuples) { + DBUG_ASSERT(!entry.end.is_empty()); + if (pack_index_tuple(key_part_no, &entry.end, cond.field, cond.val_item)) { return true; } @@ -957,8 +979,8 @@ bool INLINE_ATTR select_exec::scan_where() { // We start with just one KeyIndexTuple to pack m_key_index_tuples.emplace_back(); - m_key_index_tuples[0].writer.reserve(m_key_def->max_storage_fmt_length()); - m_key_index_tuples[0].writer.write_uint32(m_key_def->get_index_number()); + m_key_index_tuples[0].start.reserve(m_key_def->max_storage_fmt_length()); + m_key_index_tuples[0].start.write_uint32(m_key_def->get_index_number()); // Scan the index sequentially, and pack the prefix key as we go // We stop building the the key if we see a gap, rest become filters. @@ -1023,10 +1045,11 @@ bool INLINE_ATTR select_exec::scan_where() { std::vector new_writers; new_writers.reserve(KEY_WRITER_DEFAULT_SIZE); for (uint i = 0; i < prev_size; ++i) { + DBUG_ASSERT(m_key_index_tuples[i].end.is_empty()); for (uint j = 1; j < in_elem_count; ++j) { new_writers.emplace_back(m_key_index_tuples[i]); if (pack_index_tuple(key_part_no, - &new_writers[new_writers.size() - 1].writer, + &new_writers[new_writers.size() - 1].start, cond.field, args[j])) { return true; } @@ -1043,37 +1066,46 @@ bool INLINE_ATTR select_exec::scan_where() { } // Process >, >=, <, <= - if (eq_only) { // We now start to build range query initial position // Remeber eq_len at this point - this is the prefix // However we do need to keep going for (uint i = 0; i < m_key_index_tuples.size(); ++i) { m_key_index_tuples[i].eq_len = - m_key_index_tuples[i].writer.get_current_pos(); + m_key_index_tuples[i].start.get_current_pos(); } eq_only = false; } - // >, >=, <, <= - int begin_id = -1, end_id = -1; + // Figure out (start, end) range for range query + int start_id = -1, end_id = -1; + bool start_inclusive = false, end_inclusive = false; if (cond.op_type == Item_func::GT_FUNC || cond.op_type == Item_func::GE_FUNC) { - begin_id = index_pair.first; + start_id = index_pair.first; + if (cond.op_type == Item_func::GE_FUNC) { + start_inclusive = true; + } } else { end_id = index_pair.first; + if (cond.op_type == Item_func::LE_FUNC) { + end_inclusive = true; + } } if (index_pair.second >= 0) { auto &second_cond = where_list[index_pair.second]; if (second_cond.op_type == Item_func::GT_FUNC || second_cond.op_type == Item_func::GE_FUNC) { - if (begin_id != -1) { + if (start_id != -1) { // TODO(yzha) - we have two GT/GE - choose the smaller one DBUG_ASSERT(false); return true; } else { - begin_id = index_pair.second; + start_id = index_pair.second; + if (cond.op_type == Item_func::GE_FUNC) { + start_inclusive = true; + } } } else { if (end_id != -1) { @@ -1082,29 +1114,56 @@ bool INLINE_ATTR select_exec::scan_where() { return true; } else { end_id = index_pair.second; + if (second_cond.op_type == Item_func::LE_FUNC) { + end_inclusive = true; + } } } } - // pick the initial position based on column family sorting and ordering - int initial_id; + // This ensures we always go from start -> end regardless of ordering if (m_parser.is_order_desc()) { - initial_id = end_id; - } else { - initial_id = begin_id; + std::swap(start_id, end_id); + std::swap(start_inclusive, end_inclusive); } - if (initial_id >= 0) { - if (pack_cond(key_part_no, where_list[initial_id])) { - return true; + // Process the range + if (start_id >= 0 || end_id >= 0) { + if (end_id >= 0) { + // end key should start from prefix of start key, which is + // the current value of start key before appending the condition + for (auto &entry : m_key_index_tuples) { + if (entry.end.is_empty()) { + entry.end = entry.start; + } + } + } + if (start_id >= 0) { + // Mark the where condition as processed so that they don't go into + // filters - there is no point evaluating them since we already + // accounted for them in (start, end) range + where_list_processed[start_id] = true; + m_start_inclusive = start_inclusive; + if (pack_cond(key_part_no, where_list[start_id], + true /* is_start */)) { + return true; + } + } + if (end_id >= 0) { + // Mark the where condition as processed so that they don't go into + // filters + where_list_processed[end_id] = true; + m_end_inclusive = end_inclusive; + if (pack_cond(key_part_no, where_list[end_id], false /* is_end */)) { + return true; + } } - } else { - // There is no corresponding operator to build our starting slice - // We stop building the KeyIndexTuple - all the remaining are going to - // be filters - break; } + // Either we've seen a range already or this is a unsupported operator + // We stop building the KeyIndexTuple - all the remaining are going to + // be filters + break; } else { // We stop building the KeyIndexTuple - all the remaining are going to be // filters @@ -1112,36 +1171,19 @@ bool INLINE_ATTR select_exec::scan_where() { } } - // Sort the key in index order + // Sort the key in index order to ensure the query output is also in + // correct index order if (!m_parser.is_order_desc()) { std::sort( m_key_index_tuples.begin(), m_key_index_tuples.end(), [](const key_index_tuple_writer &l, const key_index_tuple_writer &r) { - size_t l_size = l.writer.get_current_pos(); - size_t r_size = r.writer.get_current_pos(); - size_t size = std::min(l_size, r_size); - - int diff = memcmp(l.writer.ptr(), r.writer.ptr(), size); - if (diff == 0) { - return (l_size < r_size); - } - - return diff < 0; + return l.start < r.start; }); } else { std::sort( m_key_index_tuples.begin(), m_key_index_tuples.end(), [](const key_index_tuple_writer &l, const key_index_tuple_writer &r) { - size_t l_size = l.writer.get_current_pos(); - size_t r_size = r.writer.get_current_pos(); - size_t size = std::min(l_size, r_size); - - int diff = memcmp(l.writer.ptr(), r.writer.ptr(), size); - if (diff == 0) { - return (l_size >= r_size); - } - - return diff > 0; + return l.start > r.start; }); } @@ -1150,16 +1192,14 @@ bool INLINE_ATTR select_exec::scan_where() { std::unique( m_key_index_tuples.begin(), m_key_index_tuples.end(), [](const key_index_tuple_writer &l, const key_index_tuple_writer &r) { - return l.writer.get_current_pos() == r.writer.get_current_pos() && - memcmp(l.writer.ptr(), r.writer.ptr(), - l.writer.get_current_pos()) == 0; + return l.start == r.start && l.end == r.end; }), m_key_index_tuples.end()); if (eq_only) { for (uint i = 0; i < m_key_index_tuples.size(); ++i) { m_key_index_tuples[i].eq_len = - m_key_index_tuples[i].writer.get_current_pos(); + m_key_index_tuples[i].start.get_current_pos(); } } @@ -1282,6 +1322,10 @@ bool INLINE_ATTR select_exec::run() { return true; } + if (m_select_limit == 0) { + return false; + } + return run_query(); } @@ -1370,7 +1414,7 @@ bool INLINE_ATTR select_exec::run_pk_point_query(txn_wrapper *txn) { std::vector statuses(size); for (auto &writer : m_key_index_tuples) { - key_slices.push_back(writer.to_key_slice()); + key_slices.push_back(writer.get_key_slice()); } // Just let linter shut up @@ -1383,7 +1427,7 @@ bool INLINE_ATTR select_exec::run_pk_point_query(txn_wrapper *txn) { value_slices.data(), statuses.data()); for (size_t i = 0; i < size; ++i) { - if (handle_killed()) { + if (unlikely(handle_killed())) { return true; } @@ -1415,7 +1459,7 @@ bool INLINE_ATTR select_exec::run_pk_point_query(txn_wrapper *txn) { value_slice.Reset(); - rocksdb::Slice key_slice = writer.writer.to_slice(); + rocksdb::Slice key_slice = writer.get_key_slice(); rocksdb::Status s = txn->get(cf, key_slice, &value_slice); if (s.IsNotFound()) { continue; @@ -1444,12 +1488,12 @@ bool INLINE_ATTR select_exec::run_pk_point_query(txn_wrapper *txn) { bool INLINE_ATTR select_exec::run_sk_point_query(txn_wrapper *txn) { auto cf = m_key_def->get_cf(); for (auto &writer : m_key_index_tuples) { - if (handle_killed()) { + if (unlikely(handle_killed())) { return true; } - rocksdb::Slice key_slice = writer.to_key_slice(); - txn->set_seek_mode(use_bloom_filter(writer.to_eq_slice())); + rocksdb::Slice key_slice = writer.get_key_slice(); + txn->set_seek_mode(use_bloom_filter(writer.get_eq_slice())); m_scan_it.reset(txn->get_iterator(cf)); if (m_scan_it == nullptr) { return true; @@ -1486,16 +1530,17 @@ bool INLINE_ATTR select_exec::run_sk_point_query(txn_wrapper *txn) { This is the slow path as we need to unpack into record[0] */ bool INLINE_ATTR select_exec::eval_cond() { - auto where_list = m_parser.get_cond_list(); - for (uint i = 0; i < m_filter_count; ++i) { - // Let MySQL evaluate the conditional expression with item pointing to - // the field record. At least this is better than MySQL where index_key=A - // are always evaluated even though it is not necessary - if (where_list[m_filter_list[i]].cond_item->val_int() == 0) { - return false; + if (unlikely(m_filter_count > 0)) { + auto where_list = m_parser.get_cond_list(); + for (uint i = 0; i < m_filter_count; ++i) { + // Let MySQL evaluate the conditional expression with item pointing to + // the field record. At least this is better than MySQL where index_key=A + // are always evaluated even though it is not necessary + if (where_list[m_filter_list[i]].cond_item->val_int() == 0) { + return false; + } } } - return true; } @@ -1573,10 +1618,7 @@ int INLINE_ATTR select_exec::eval_and_send() { m_examined_rows++; if (eval_cond()) { m_row_count++; - if (m_row_count > m_select_limit) { - // no more items to consider - return -1; - } else if (m_row_count > m_offset_limit) { + if (m_row_count > m_offset_limit) { if (m_debug_row_delay > 0) { // Inject artificial delays for debugging/testing purposes my_sleep(m_debug_row_delay * 1000000); @@ -1585,11 +1627,11 @@ int INLINE_ATTR select_exec::eval_and_send() { // failure return 1; } + } - if (m_row_count == m_select_limit) { - // we just sent the last one - return -1; - } + if (m_row_count >= m_select_limit) { + // we just sent the last one + return -1; } } @@ -1598,33 +1640,90 @@ int INLINE_ATTR select_exec::eval_and_send() { } bool INLINE_ATTR select_exec::run_range_query(txn_wrapper *txn) { + // Determine seek direction - forward (Seek) or reverse (SeekForPrev) bool reverse_seek = m_key_def->m_is_reverse_cf ^ m_parser.is_order_desc(); for (uint i = 0; i < m_key_index_tuples.size(); ++i) { - if (handle_killed()) { + if (unlikely(handle_killed())) { return true; } - rocksdb::Slice key_slice = m_key_index_tuples[i].to_key_slice(); - uint eq_len = m_key_index_tuples[i].eq_len; - + rocksdb::Slice start_key_slice = + m_key_index_tuples[i].get_start_key_slice(); + rocksdb::Slice end_key_slice = m_key_index_tuples[i].get_end_key_slice(); + rocksdb::Slice eq_slice = m_key_index_tuples[i].get_eq_slice(); + + // If the start key is not full key - either it is missing some columns + // or it is a secondary key (which by definition is never full as it + // has PK at the end). This impacts the seeking behavior below + bool partial_start_key = + !m_index_is_pk || start_key_slice.size() == eq_slice.size(); + + // If we need to start at a prefix (unbounded) that is "shorter" than + // the end key + bool is_start_prefix_key = start_key_slice.size() == eq_slice.size(); + + // Range query need to support 4 combinations + // * forward cf, ascending order + // * forward cf, desending order + // * reverse cf, ascending order + // * reverse cf, descending order + // By look at the different combinations, one is able to infer + // * (Start, end) vs (end, start) is determined by order + // * End condition is determined by order + // * Seek direction is determined by reverse_seek + // + // Note we have already swapped start/end in case of descending order in + // scan_where, so we always start at start_key_slice and end at + // end_key_slice regardless. The more challenging / confusing part is to + // determine the exact (start, end) based on cf, order, and prefix + std::vector initial_pos( + start_key_slice.data(), + start_key_slice.data() + start_key_slice.size()); + rocksdb::Slice initial_pos_slice( + reinterpret_cast(initial_pos.data()), start_key_slice.size()); + std::vector end_pos(end_key_slice.data(), + end_key_slice.data() + end_key_slice.size()); + rocksdb::Slice end_pos_slice(reinterpret_cast(end_pos.data()), + end_key_slice.size()); if (m_parser.is_order_desc()) { - // HA_READ_PREFIX_LAST (reverse cf) or HA_READ_PREFIX_LAST_OR_PREV - std::vector initial_pos(key_slice.data(), - key_slice.data() + key_slice.size()); - - rocksdb::Slice initial_pos_slice( - reinterpret_cast(initial_pos.data()), key_slice.size()); + int eq_bytes_changed = 0; + + // In reverse order, both forward cf (SeekForPrev) and reverse cf + // (Seek) have the same matrix: + // PK, A >= n --> start at n + // PK, A > n --> start at pred(n) + // SK, A >= n --> start at succ(n) + // SK, A > n --> start at n + // >= Prefix n --> start at succ(n) + if (m_start_inclusive && partial_start_key) { + // SK A >= n and prefix + int bytes_changed = + m_key_def->successor(initial_pos.data(), initial_pos.size()); + if (is_start_prefix_key) { + eq_bytes_changed = bytes_changed; + } + } else if (m_index_is_pk && !m_start_inclusive) { + // PK A > n + m_key_def->predecessor(initial_pos.data(), initial_pos.size()); + } - uint bytes_changed = - m_key_def->successor(initial_pos.data(), key_slice.size()); + if (!end_key_slice.empty()) { + // Adjust end key if needed + // In reverse order, both forward cf (SeekForPrev) and reverse cf + // (Seek) have the same matrix: + // PK, A >= n --> stop at A < n + // PK, A > n --> stop at A < succ(n) + // SK, A >= n --> stop at A < n + // SK, A > n --> stop at A < succ(n) + // >= Prefix n --> stop at A < n + if (!m_end_inclusive) { + m_key_def->successor(end_pos.data(), end_pos.size()); + } + } - // Account for the bytes changed by successor call in bloom filter - // calculation txn->set_seek_mode(use_bloom_filter( - rocksdb::Slice(reinterpret_cast(initial_pos.data()), - eq_len - bytes_changed))); - + rocksdb::Slice(eq_slice.data(), eq_slice.size() - eq_bytes_changed))); m_scan_it.reset(txn->get_iterator(m_key_def->get_cf())); if (m_scan_it == nullptr) { return true; @@ -1632,45 +1731,82 @@ bool INLINE_ATTR select_exec::run_range_query(txn_wrapper *txn) { rocksdb_smart_seek(!m_key_def->m_is_reverse_cf, m_scan_it.get(), initial_pos_slice); - - if (!is_valid_iterator(m_scan_it.get())) { - continue; + } else { + // In forward order, both forward cf (SeekForPrev) and reverse cf + // (Seek) have the same matrix: + // PK, A >= n --> start at n + // PK, A > n --> start at succ(n) + // SK, A >= n --> start at n + // SK, A > n --> start at succ(n) + // >= Prefix n --> start at n + // Based on above, n = succ(n) in non-inclusive case + if (!m_start_inclusive) { + DBUG_ASSERT(start_key_slice.size() > eq_slice.size()); + m_key_def->successor(initial_pos.data(), initial_pos.size()); } - const rocksdb::Slice rkey = m_scan_it->key(); - if (m_use_full_key && - m_key_def->cmp_full_keys(initial_pos_slice, rkey.data())) { - // We got a exact match - rocksdb_smart_next(reverse_seek, m_scan_it.get()); + // Adjust end key if needed + // In reverse order, both forward cf (SeekForPrev) and reverse cf + // (Seek) have the same matrix: + // PK, A <= n --> stop at A > n + // PK, A < n --> stop at A > pred(n) + // SK, A <= n --> stop at A > succ(n) + // SK, A < n --> stop at A > n + // <= Prefix n --> stop at A > succ(n) + if (!end_key_slice.empty()) { + if (m_index_is_pk) { + if (!m_end_inclusive) { + // PK A < n + m_key_def->predecessor(end_pos.data(), end_pos.size()); + } + } else if (m_end_inclusive) { + // SK A <= n and prefix + m_key_def->successor(end_pos.data(), end_pos.size()); + } } - } else { - txn->set_seek_mode(use_bloom_filter(m_key_index_tuples[i].to_eq_slice())); + + txn->set_seek_mode( + use_bloom_filter(rocksdb::Slice(eq_slice.data(), eq_slice.size()))); m_scan_it.reset(txn->get_iterator(m_key_def->get_cf())); if (m_scan_it == nullptr) { return true; } - // HA_READ_KEY_OR_NEXT, aka, HA_READ_PREFIX_FIRST (I made this up) rocksdb_smart_seek(m_key_def->m_is_reverse_cf, m_scan_it.get(), - key_slice); + initial_pos_slice); } // Make sure the slice is alive as we'll point into the slice during // unpacking while (true) { - if (handle_killed()) { + if (unlikely(handle_killed())) { return true; } - if (!is_valid_iterator(m_scan_it.get())) { + if (unlikely(!is_valid_iterator(m_scan_it.get()))) { break; } const rocksdb::Slice rkey = m_scan_it->key(); - - if (rkey.size() < eq_len || - memcmp(rkey.data(), key_slice.data(), eq_len) != 0) { - break; + if (end_key_slice.empty()) { + // No end - we stop when prefix no longer matches + if (!rkey.starts_with(eq_slice)) { + break; + } + } else { + // Range query (start, end) + // NOTE: To simplify the algorithm we always use non-inclusive + // check (> or <) and let the end slice handle the boundary + int diff = rkey.compare(end_pos_slice); + if (m_parser.is_order_desc()) { + if (diff < 0) { + break; + } + } else { + if (diff > 0) { + break; + } + } } // TODO: We could skip unpacking if m_filter_count=0 and we are @@ -1678,20 +1814,20 @@ bool INLINE_ATTR select_exec::run_range_query(txn_wrapper *txn) { // for now const rocksdb::Slice rvalue = m_scan_it->value(); if (m_index_is_pk) { - if (unpack_for_pk(rkey, rvalue)) { + if (unlikely(unpack_for_pk(rkey, rvalue))) { return true; } } else { - if (unpack_for_sk(txn, rkey, rvalue)) { + if (unlikely(unpack_for_sk(txn, rkey, rvalue))) { return true; } } int ret = eval_and_send(); - if (ret > 0) { + if (unlikely(ret > 0)) { // failure return true; - } else if (ret < 0) { + } else if (unlikely(ret < 0)) { // no more items return false; } diff --git a/storage/rocksdb/rdb_buff.h b/storage/rocksdb/rdb_buff.h index 3682fdb96667..e0ef4d095bfe 100644 --- a/storage/rocksdb/rdb_buff.h +++ b/storage/rocksdb/rdb_buff.h @@ -393,6 +393,7 @@ class Rdb_string_writer { uchar *end() { return m_data.data() + m_pos; } const uchar *end() const { return m_data.data() + m_pos; } size_t get_current_pos() const { return m_pos; } + bool is_empty() const { return m_pos == 0; } void write_uint8_at(const size_t pos, const uint new_val) { // This function will only overwrite what was written @@ -425,6 +426,42 @@ class Rdb_string_writer { rocksdb::Slice to_slice() { return rocksdb::Slice(reinterpret_cast(m_data.data()), m_pos); } + + bool operator==(const Rdb_string_writer &rhs) const { + return m_pos == rhs.m_pos && memcmp(ptr(), rhs.ptr(), m_pos) == 0; + } + + bool operator>=(const Rdb_string_writer &rhs) const { + return cmp(*this, rhs) >= 0; + } + bool operator<=(const Rdb_string_writer &rhs) const { + return cmp(*this, rhs) <= 0; + } + bool operator>(const Rdb_string_writer &rhs) const { + return cmp(*this, rhs) > 0; + } + bool operator<(const Rdb_string_writer &rhs) const { + return cmp(*this, rhs) < 0; + } + + static int cmp(const Rdb_string_writer &lhs, const Rdb_string_writer &rhs) { + size_t l_size = lhs.get_current_pos(); + size_t r_size = rhs.get_current_pos(); + size_t size = std::min(l_size, r_size); + + int diff = memcmp(lhs.ptr(), rhs.ptr(), size); + if (diff == 0) { + if (l_size > r_size) { + return 1; + } else if (l_size < r_size) { + return -1; + } else { + return 0; + } + } + + return diff; + } }; /*