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
29989705
Commit
29989705
authored
Jul 29, 2013
by
zkasheff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugs/61'
parents
1ea2216f
9f691995
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
mysql-test/suite/tokudb/r/change_column_blob.result
mysql-test/suite/tokudb/r/change_column_blob.result
+12
-0
mysql-test/suite/tokudb/t/change_column_blob.test
mysql-test/suite/tokudb/t/change_column_blob.test
+12
-0
storage/tokudb/ha_tokudb_alter_56.cc
storage/tokudb/ha_tokudb_alter_56.cc
+0
-13
No files found.
mysql-test/suite/tokudb/r/change_column_blob.result
View file @
29989705
...
...
@@ -27,6 +27,7 @@ CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a TEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a BLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a TEXT NOT NULL;
...
...
@@ -44,11 +45,13 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a TEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a BLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a MEDIUMBLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NOT NULL;
...
...
@@ -66,11 +69,13 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a MEDIUMBLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a TINYBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
...
...
@@ -88,6 +93,7 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a BLOB NULL);
ALTER TABLE t CHANGE COLUMN a a TINYTEXT NULL;
...
...
@@ -139,6 +145,7 @@ CREATE TABLE t (a BLOB NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a MEDIUMBLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a BLOB NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NOT NULL;
...
...
@@ -156,11 +163,13 @@ CREATE TABLE t (a BLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a MEDIUMTEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a MEDIUMBLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a BLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a BLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
...
...
@@ -178,6 +187,7 @@ CREATE TABLE t (a BLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a MEDIUMBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a TINYTEXT NULL;
...
...
@@ -253,6 +263,7 @@ CREATE TABLE t (a MEDIUMBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a MEDIUMBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
...
...
@@ -270,6 +281,7 @@ CREATE TABLE t (a MEDIUMBLOB NOT NULL);
ALTER TABLE t CHANGE COLUMN a a LONGTEXT NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
ALTER TABLE t CHANGE COLUMN a a LONGBLOB NOT NULL;
ERROR 42000: Table 't' uses an extension that doesn't exist in this MySQL version
DROP TABLE t;
CREATE TABLE t (a LONGBLOB NULL);
ALTER TABLE t CHANGE COLUMN a a TINYTEXT NULL;
...
...
mysql-test/suite/tokudb/t/change_column_blob.test
View file @
29989705
...
...
@@ -37,6 +37,7 @@ CREATE TABLE t (a TINYBLOB NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
TEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
BLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
TINYBLOB
NULL
);
...
...
@@ -59,12 +60,14 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
TEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
BLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
TINYBLOB
NULL
);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMTEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMBLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
TINYBLOB
NULL
);
...
...
@@ -87,12 +90,14 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMTEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMBLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
TINYBLOB
NULL
);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
TINYBLOB
NULL
);
...
...
@@ -115,6 +120,7 @@ CREATE TABLE t (a TINYBLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
BLOB
NULL
);
...
...
@@ -181,6 +187,7 @@ CREATE TABLE t (a BLOB NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMTEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMBLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
BLOB
NULL
);
...
...
@@ -203,12 +210,14 @@ CREATE TABLE t (a BLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMTEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
MEDIUMBLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
BLOB
NULL
);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
BLOB
NULL
);
...
...
@@ -231,6 +240,7 @@ CREATE TABLE t (a BLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
MEDIUMBLOB
NULL
);
...
...
@@ -329,6 +339,7 @@ CREATE TABLE t (a MEDIUMBLOB NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
MEDIUMBLOB
NULL
);
...
...
@@ -351,6 +362,7 @@ CREATE TABLE t (a MEDIUMBLOB NOT NULL);
--
replace_regex
/
MariaDB
/
XYZ
/
/
MySQL
/
XYZ
/
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGTEXT
NOT
NULL
;
--
error
ER_UNSUPPORTED_EXTENSION
ALTER
TABLE
t
CHANGE
COLUMN
a
a
LONGBLOB
NOT
NULL
;
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
LONGBLOB
NULL
);
...
...
storage/tokudb/ha_tokudb_alter_56.cc
View file @
29989705
...
...
@@ -1017,19 +1017,6 @@ static bool change_field_type_is_supported(Field *old_field, Field *new_field, T
// varchar(X) -> varchar(Y) and varbinary(X) -> varbinary(Y) expansion where X < 256 <= Y
// the ALTER_COLUMN_TYPE handler flag is set for these cases
return
change_varchar_length_is_supported
(
old_field
,
new_field
,
table
,
altered_table
,
ha_alter_info
,
ctx
);
}
else
if
(
old_type
==
MYSQL_TYPE_BLOB
)
{
// blob -> longer blob
if
(
new_type
==
MYSQL_TYPE_BLOB
&&
old_field
->
binary
()
&&
new_field
->
binary
()
&&
old_field
->
pack_length
()
<=
new_field
->
pack_length
())
{
return
true
;
}
// text -> longer text
if
(
new_type
==
MYSQL_TYPE_BLOB
&&
!
old_field
->
binary
()
&&
!
new_field
->
binary
()
&&
old_field
->
pack_length
()
<=
new_field
->
pack_length
()
&&
old_field
->
charset
()
->
number
==
new_field
->
charset
()
->
number
)
{
return
true
;
}
return
false
;
}
else
return
false
;
}
...
...
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