mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
caching of queries with isammerge tables forbiden using general way
SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause correct table list passed to class constructor of select_update
This commit is contained in:
@ -1874,7 +1874,7 @@ mysql_execute_command(THD *thd)
|
||||
if (&lex->select_lex != lex->all_selects_list &&
|
||||
lex->unit.create_total_list(thd, lex, &tables))
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
|
||||
/*
|
||||
When option readonly is set deny operations which change tables.
|
||||
Except for the replication thread and the 'super' users.
|
||||
@ -1891,6 +1891,13 @@ mysql_execute_command(THD *thd)
|
||||
switch (lex->sql_command) {
|
||||
case SQLCOM_SELECT:
|
||||
{
|
||||
/* assign global limit variable if limit is not given */
|
||||
{
|
||||
SELECT_LEX *param= lex->unit.global_parameters;
|
||||
if (!param->explicit_limit)
|
||||
param->select_limit= thd->variables.select_limit;
|
||||
}
|
||||
|
||||
select_result *result=lex->result;
|
||||
if (tables)
|
||||
{
|
||||
@ -3742,9 +3749,7 @@ mysql_init_select(LEX *lex)
|
||||
{
|
||||
SELECT_LEX *select_lex= lex->current_select;
|
||||
select_lex->init_select();
|
||||
select_lex->select_limit= (&lex->select_lex == select_lex) ?
|
||||
lex->thd->variables.select_limit : /* Primry UNION */
|
||||
HA_POS_ERROR; /* subquery */
|
||||
select_lex->select_limit= HA_POS_ERROR;
|
||||
if (select_lex == &lex->select_lex)
|
||||
{
|
||||
lex->exchange= 0;
|
||||
@ -3796,9 +3801,7 @@ mysql_new_select(LEX *lex, bool move_down)
|
||||
fake->select_number= INT_MAX;
|
||||
fake->make_empty_select();
|
||||
fake->linkage= GLOBAL_OPTIONS_TYPE;
|
||||
fake->select_limit= (&lex->unit == unit) ?
|
||||
lex->thd->variables.select_limit : /* Primry UNION */
|
||||
HA_POS_ERROR; /* subquery */
|
||||
fake->select_limit= HA_POS_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user