mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge with 5.1
Fixes to get Aria handler tests to work. Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
This commit is contained in:
@@ -3930,12 +3930,16 @@ bool mysql_create_table_no_lock(THD *thd,
|
||||
}
|
||||
|
||||
/* Give warnings for not supported table options */
|
||||
if (create_info->transactional && !file->ht->commit)
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
||||
file->engine_name()->str,
|
||||
"TRANSACTIONAL=1");
|
||||
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
||||
extern handlerton *maria_hton;
|
||||
if (file->ht != maria_hton)
|
||||
#endif
|
||||
if (create_info->transactional)
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
||||
file->engine_name()->str,
|
||||
"TRANSACTIONAL=1");
|
||||
|
||||
VOID(pthread_mutex_lock(&LOCK_open));
|
||||
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
||||
@@ -6277,9 +6281,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
||||
def->field=field;
|
||||
if (field->stored_in_db != def->stored_in_db)
|
||||
{
|
||||
my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN,
|
||||
MYF(0),
|
||||
"Changing the STORED status");
|
||||
my_error(ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
if (!def->after)
|
||||
@@ -7227,6 +7229,16 @@ view_err:
|
||||
/* Non-primary unique key. */
|
||||
needed_online_flags|= HA_ONLINE_ADD_UNIQUE_INDEX;
|
||||
needed_fast_flags|= HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES;
|
||||
if (ignore)
|
||||
{
|
||||
/*
|
||||
If ignore is used, we have to remove all duplicate rows,
|
||||
which require a full table copy.
|
||||
*/
|
||||
need_copy_table= ALTER_TABLE_DATA_CHANGED;
|
||||
pk_changed= 2; // Don't change need_copy_table
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user