mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '11.2' into 11.4
This commit is contained in:
19
sql/table.cc
19
sql/table.cc
@ -1736,9 +1736,9 @@ public:
|
||||
*/
|
||||
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
static bool change_to_partiton_engine(LEX_CSTRING *name,
|
||||
plugin_ref *se_plugin)
|
||||
static bool change_to_partiton_engine(plugin_ref *se_plugin)
|
||||
{
|
||||
LEX_CSTRING name= { STRING_WITH_LEN("partition") };
|
||||
/*
|
||||
Use partition handler
|
||||
tmp_plugin is locked with a local lock.
|
||||
@ -1746,10 +1746,9 @@ static bool change_to_partiton_engine(LEX_CSTRING *name,
|
||||
replacing it with a globally locked version of tmp_plugin
|
||||
*/
|
||||
/* Check if the partitioning engine is ready */
|
||||
if (!plugin_is_ready(name, MYSQL_STORAGE_ENGINE_PLUGIN))
|
||||
if (!plugin_is_ready(&name, MYSQL_STORAGE_ENGINE_PLUGIN))
|
||||
{
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0),
|
||||
"--skip-partition");
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-partition");
|
||||
return 1;
|
||||
}
|
||||
plugin_unlock(NULL, *se_plugin);
|
||||
@ -2047,7 +2046,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
|
||||
else if (str_db_type_length == 9 &&
|
||||
!strncmp((char *) next_chunk + 2, "partition", 9))
|
||||
{
|
||||
if (change_to_partiton_engine(&se_name, &se_plugin))
|
||||
if (change_to_partiton_engine(&se_plugin))
|
||||
goto err;
|
||||
}
|
||||
#endif
|
||||
@ -2091,7 +2090,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
|
||||
share->mysql_version >= 50600 && share->mysql_version <= 50799)
|
||||
{
|
||||
share->keep_original_mysql_version= 1;
|
||||
if (change_to_partiton_engine(&se_name, &se_plugin))
|
||||
if (change_to_partiton_engine(&se_plugin))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
@ -6509,7 +6508,7 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
|
||||
/* VIEW's CHECK OPTION CLAUSE */
|
||||
Counting_error_handler ceh;
|
||||
thd->push_internal_handler(&ceh);
|
||||
bool res= check_option->val_int() == 0;
|
||||
bool res= check_option->val_bool() == false;
|
||||
thd->pop_internal_handler();
|
||||
if (ceh.errors)
|
||||
return(VIEW_CHECK_ERROR);
|
||||
@ -6552,7 +6551,7 @@ int TABLE::verify_constraints(bool ignore_failure)
|
||||
yes! NULL is ok.
|
||||
see 4.23.3.4 Table check constraints, part 2, SQL:2016
|
||||
*/
|
||||
if (((*chk)->expr->val_int() == 0 && !(*chk)->expr->null_value) ||
|
||||
if (((*chk)->expr->val_bool() == false && !(*chk)->expr->null_value) ||
|
||||
in_use->is_error())
|
||||
{
|
||||
enum_vcol_info_type vcol_type= (*chk)->get_vcol_type();
|
||||
@ -9525,6 +9524,8 @@ void TABLE::vers_update_end()
|
||||
if (vers_end_field()->store_timestamp(in_use->query_start(),
|
||||
in_use->query_start_sec_part()))
|
||||
DBUG_ASSERT(0);
|
||||
if (vfield)
|
||||
update_virtual_fields(file, VCOL_UPDATE_FOR_WRITE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user