mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Move the fix for bug #54044 to security branch, and revert commit -r3520:3521.
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
|
|
||||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
|
||||||
ERROR HY000: Can't create table 'test.TABLE_54044' (errno: -1)
|
|
@ -1,11 +0,0 @@
|
|||||||
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
|
|
||||||
# during create table, so it will not trigger assertion failure.
|
|
||||||
|
|
||||||
--source include/have_innodb.inc
|
|
||||||
|
|
||||||
# This 'create table' operation should fail because of
|
|
||||||
# using NULL datatype
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
|
||||||
CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
|
|
||||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
|
|
||||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
|
||||||
ERROR HY000: Can't create table 'test.TABLE_54044' (errno: -1)
|
|
@ -1,11 +0,0 @@
|
|||||||
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
|
|
||||||
# during create table, so it will not trigger assertion failure.
|
|
||||||
|
|
||||||
--source include/have_innodb.inc
|
|
||||||
|
|
||||||
# This 'create table' operation should fail because of
|
|
||||||
# using NULL datatype
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
|
||||||
CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
|
|
||||||
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
|
|
||||||
|
|
@ -3242,11 +3242,6 @@ get_innobase_type_from_mysql_type(
|
|||||||
case MYSQL_TYPE_BLOB:
|
case MYSQL_TYPE_BLOB:
|
||||||
case MYSQL_TYPE_LONG_BLOB:
|
case MYSQL_TYPE_LONG_BLOB:
|
||||||
return(DATA_BLOB);
|
return(DATA_BLOB);
|
||||||
case MYSQL_TYPE_NULL:
|
|
||||||
/* MySQL currently accepts "NULL" datatype, but will
|
|
||||||
reject such datatype in the next release. We will cope
|
|
||||||
with it and not trigger assertion failure in 5.1 */
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
@ -5268,22 +5263,7 @@ create_table_def(
|
|||||||
field = form->field[i];
|
field = form->field[i];
|
||||||
|
|
||||||
col_type = get_innobase_type_from_mysql_type(&unsigned_type,
|
col_type = get_innobase_type_from_mysql_type(&unsigned_type,
|
||||||
field);
|
field);
|
||||||
|
|
||||||
if (!col_type) {
|
|
||||||
push_warning_printf(
|
|
||||||
(THD*) trx->mysql_thd,
|
|
||||||
MYSQL_ERROR::WARN_LEVEL_WARN,
|
|
||||||
ER_CANT_CREATE_TABLE,
|
|
||||||
"Error creating table '%s' with "
|
|
||||||
"column '%s'. Please check its "
|
|
||||||
"column type and try to re-create "
|
|
||||||
"the table with an appropriate "
|
|
||||||
"column type.",
|
|
||||||
table->name, (char*) field->field_name);
|
|
||||||
goto err_col;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (field->null_ptr) {
|
if (field->null_ptr) {
|
||||||
nulls_allowed = 0;
|
nulls_allowed = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -5340,7 +5320,7 @@ create_table_def(
|
|||||||
"different column name.",
|
"different column name.",
|
||||||
table->name, (char*) field->field_name,
|
table->name, (char*) field->field_name,
|
||||||
(char*) field->field_name);
|
(char*) field->field_name);
|
||||||
err_col:
|
|
||||||
dict_mem_table_free(table);
|
dict_mem_table_free(table);
|
||||||
trx_commit_for_mysql(trx);
|
trx_commit_for_mysql(trx);
|
||||||
|
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
2010-06-22 The InnoDB Team
|
|
||||||
|
|
||||||
* handler/ha_innodb.cc, innodb_bug54044.test, innodb_bug54044.result
|
|
||||||
Fix Bug#54044, Create temporary tables and using innodb crashes.
|
|
||||||
|
|
||||||
2010-06-22 The InnoDB Team
|
2010-06-22 The InnoDB Team
|
||||||
|
|
||||||
* dict/dict0dict.c, dict/dict0mem.c, include/dict0mem.h,
|
* dict/dict0dict.c, dict/dict0mem.c, include/dict0mem.h,
|
||||||
|
@ -3950,11 +3950,6 @@ get_innobase_type_from_mysql_type(
|
|||||||
case MYSQL_TYPE_BLOB:
|
case MYSQL_TYPE_BLOB:
|
||||||
case MYSQL_TYPE_LONG_BLOB:
|
case MYSQL_TYPE_LONG_BLOB:
|
||||||
return(DATA_BLOB);
|
return(DATA_BLOB);
|
||||||
case MYSQL_TYPE_NULL:
|
|
||||||
/* MySQL currently accepts "NULL" datatype, but will
|
|
||||||
reject such datatype in the next release. We will cope
|
|
||||||
with it and not trigger assertion failure in 5.1 */
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ut_error;
|
ut_error;
|
||||||
}
|
}
|
||||||
@ -6005,22 +6000,7 @@ create_table_def(
|
|||||||
field = form->field[i];
|
field = form->field[i];
|
||||||
|
|
||||||
col_type = get_innobase_type_from_mysql_type(&unsigned_type,
|
col_type = get_innobase_type_from_mysql_type(&unsigned_type,
|
||||||
field);
|
field);
|
||||||
|
|
||||||
if (!col_type) {
|
|
||||||
push_warning_printf(
|
|
||||||
(THD*) trx->mysql_thd,
|
|
||||||
MYSQL_ERROR::WARN_LEVEL_WARN,
|
|
||||||
ER_CANT_CREATE_TABLE,
|
|
||||||
"Error creating table '%s' with "
|
|
||||||
"column '%s'. Please check its "
|
|
||||||
"column type and try to re-create "
|
|
||||||
"the table with an appropriate "
|
|
||||||
"column type.",
|
|
||||||
table->name, (char*) field->field_name);
|
|
||||||
goto err_col;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (field->null_ptr) {
|
if (field->null_ptr) {
|
||||||
nulls_allowed = 0;
|
nulls_allowed = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -6078,7 +6058,7 @@ create_table_def(
|
|||||||
if (dict_col_name_is_reserved(field->field_name)){
|
if (dict_col_name_is_reserved(field->field_name)){
|
||||||
my_error(ER_WRONG_COLUMN_NAME, MYF(0),
|
my_error(ER_WRONG_COLUMN_NAME, MYF(0),
|
||||||
field->field_name);
|
field->field_name);
|
||||||
err_col:
|
|
||||||
dict_mem_table_free(table);
|
dict_mem_table_free(table);
|
||||||
trx_commit_for_mysql(trx);
|
trx_commit_for_mysql(trx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user