diff options
author | unknown <bell@sanja.is.com.ua> | 2002-11-11 17:28:58 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-11-11 17:28:58 +0200 |
commit | 69f38298f4eff5a31cd43cd0ec3b6b3c2dece251 (patch) | |
tree | 70a1c82b8f228d0e15b4f245d483df729d2cd82f /sql/sql_parse.cc | |
parent | 0c1e93b8766160263a14adc17af61b2b9c64bf9b (diff) | |
download | mariadb-git-69f38298f4eff5a31cd43cd0ec3b6b3c2dece251.tar.gz |
fixed select_lex & max_join_size parameters with BIG_TABLES
sql/set_var.h:
new constaructor
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4288773b00b..4069fa83b01 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -660,7 +660,7 @@ pthread_handler_decl(handle_one_connection,arg) goto end_thread; } - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if ((ulong) thd->variables.max_join_size == (ulonglong) HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; if (thd->client_capabilities & CLIENT_COMPRESS) net->compress=1; // Use compression @@ -736,7 +736,7 @@ pthread_handler_decl(handle_bootstrap,arg) #endif - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if ((ulong) thd->variables.max_join_size == (ulonglong) HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; thd->proc_info=0; @@ -1373,10 +1373,11 @@ if (lex->derived_tables) break; // Error message is given } - unit->offset_limit_cnt= unit->global_parameters->offset_limit; - unit->select_limit_cnt= unit->global_parameters->select_limit+ - unit->global_parameters->offset_limit; - if (unit->select_limit_cnt < unit->global_parameters->select_limit) + unit->offset_limit_cnt= (ha_rows) unit->global_parameters->offset_limit; + unit->select_limit_cnt= (ha_rows) (unit->global_parameters->select_limit+ + unit->global_parameters->offset_limit); + if (unit->select_limit_cnt < + (ha_rows) unit->global_parameters->select_limit) unit->select_limit_cnt= HA_POS_ERROR; // no limit if (unit->select_limit_cnt == HA_POS_ERROR) select_lex->options&= ~OPTION_FOUND_ROWS; |