summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-11-11 17:28:58 +0200
committerunknown <bell@sanja.is.com.ua>2002-11-11 17:28:58 +0200
commit69f38298f4eff5a31cd43cd0ec3b6b3c2dece251 (patch)
tree70a1c82b8f228d0e15b4f245d483df729d2cd82f /sql/sql_parse.cc
parent0c1e93b8766160263a14adc17af61b2b9c64bf9b (diff)
downloadmariadb-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.cc13
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;