SQL: SP forced invalidate via 0
Invalidate via ULONG_MAX was wrong because sp_cache_flush_obsolete() works incorrectly in this case. Fixes MDEV-14749
This commit is contained in:
parent
d8aabb44b5
commit
b9bc8bbdc0
@ -23,7 +23,7 @@
|
|||||||
#include "sp_head.h"
|
#include "sp_head.h"
|
||||||
|
|
||||||
static mysql_mutex_t Cversion_lock;
|
static mysql_mutex_t Cversion_lock;
|
||||||
static ulong volatile Cversion= 0;
|
static ulong volatile Cversion= 1;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3161,7 +3161,7 @@ bool Sql_cmd_call::execute(THD *thd)
|
|||||||
if (do_execute_sp(thd, sp))
|
if (do_execute_sp(thd, sp))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (sp->sp_cache_version() == ULONG_MAX)
|
if (sp->sp_cache_version() == 0)
|
||||||
{
|
{
|
||||||
sp_cache_flush(thd->sp_proc_cache, sp);
|
sp_cache_flush(thd->sp_proc_cache, sp);
|
||||||
}
|
}
|
||||||
|
@ -1079,7 +1079,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables, COND **where_expr
|
|||||||
if (thd->spcont)
|
if (thd->spcont)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(thd->spcont->m_sp);
|
DBUG_ASSERT(thd->spcont->m_sp);
|
||||||
thd->spcont->m_sp->set_sp_cache_version(ULONG_MAX);
|
thd->spcont->m_sp->set_sp_cache_version(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ bool VTMD_table::setup_select(THD* thd)
|
|||||||
if (thd->spcont)
|
if (thd->spcont)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(thd->spcont->m_sp);
|
DBUG_ASSERT(thd->spcont->m_sp);
|
||||||
thd->spcont->m_sp->set_sp_cache_version(ULONG_MAX);
|
thd->spcont->m_sp->set_sp_cache_version(0);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user