Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f2dfe5e8
Commit
f2dfe5e8
authored
Jun 24, 2010
by
Jimmy Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug #54044 Create temporary tables and using innodb crashes.
parent
3b0bf673
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
4 deletions
+77
-4
mysql-test/suite/innodb/r/innodb_bug54044.result
mysql-test/suite/innodb/r/innodb_bug54044.result
+3
-0
mysql-test/suite/innodb/t/innodb_bug54044.test
mysql-test/suite/innodb/t/innodb_bug54044.test
+11
-0
mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
+3
-0
mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
+11
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+22
-2
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+5
-0
storage/innodb_plugin/handler/ha_innodb.cc
storage/innodb_plugin/handler/ha_innodb.cc
+22
-2
No files found.
mysql-test/suite/innodb/r/innodb_bug54044.result
0 → 100644
View file @
f2dfe5e8
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)
mysql-test/suite/innodb/t/innodb_bug54044.test
0 → 100644
View file @
f2dfe5e8
# 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
);
mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
0 → 100644
View file @
f2dfe5e8
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)
mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
0 → 100644
View file @
f2dfe5e8
# 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_plugin
.
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
);
storage/innobase/handler/ha_innodb.cc
View file @
f2dfe5e8
...
@@ -3236,6 +3236,11 @@ get_innobase_type_from_mysql_type(
...
@@ -3236,6 +3236,11 @@ 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
);
}
}
...
@@ -5257,7 +5262,22 @@ create_table_def(
...
@@ -5257,7 +5262,22 @@ 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
{
...
@@ -5314,7 +5334,7 @@ create_table_def(
...
@@ -5314,7 +5334,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
);
...
...
storage/innodb_plugin/ChangeLog
View file @
f2dfe5e8
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-05-25 The InnoDB Team
2010-05-25 The InnoDB Team
* handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c:
* handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c:
...
...
storage/innodb_plugin/handler/ha_innodb.cc
View file @
f2dfe5e8
...
@@ -3950,6 +3950,11 @@ get_innobase_type_from_mysql_type(
...
@@ -3950,6 +3950,11 @@ 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
;
}
}
...
@@ -5997,7 +6002,22 @@ create_table_def(
...
@@ -5997,7 +6002,22 @@ 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
{
...
@@ -6055,7 +6075,7 @@ create_table_def(
...
@@ -6055,7 +6075,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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment