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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a8def12e
Commit
a8def12e
authored
Aug 06, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
parent
f36c0189
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
6 deletions
+51
-6
mysql-test/suite/compat/oracle/r/column_compression.result
mysql-test/suite/compat/oracle/r/column_compression.result
+3
-3
mysql-test/suite/compat/oracle/r/sp.result
mysql-test/suite/compat/oracle/r/sp.result
+1
-1
mysql-test/suite/compat/oracle/r/type_blob.result
mysql-test/suite/compat/oracle/r/type_blob.result
+18
-0
mysql-test/suite/compat/oracle/t/type_blob.test
mysql-test/suite/compat/oracle/t/type_blob.test
+13
-0
sql/field.cc
sql/field.cc
+4
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-1
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+6
-1
No files found.
mysql-test/suite/compat/oracle/r/column_compression.result
View file @
a8def12e
...
@@ -515,7 +515,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE);
...
@@ -515,7 +515,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE);
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t1;
Table Create Table
Table Create Table
t1 CREATE TABLE "t1" (
t1 CREATE TABLE "t1" (
"a" blob /*!100301 COMPRESSED*/ DEFAULT NULL
"a" blob
(65535)
/*!100301 COMPRESSED*/ DEFAULT NULL
)
)
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a TEXT COMPRESSED ASCII);
CREATE TABLE t1 (a TEXT COMPRESSED ASCII);
...
@@ -547,7 +547,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT '');
...
@@ -547,7 +547,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT '');
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t1;
Table Create Table
Table Create Table
t1 CREATE TABLE "t1" (
t1 CREATE TABLE "t1" (
"a" blob /*!100301 COMPRESSED*/ DEFAULT ''
"a" blob
(65535)
/*!100301 COMPRESSED*/ DEFAULT ''
)
)
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT '');
CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT '');
...
@@ -605,7 +605,7 @@ Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecate
...
@@ -605,7 +605,7 @@ Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecate
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t1;
Table Create Table
Table Create Table
t1 CREATE TABLE "t1" (
t1 CREATE TABLE "t1" (
"a" blob /*!100301 COMPRESSED*/ DEFAULT NULL
"a" blob
(65535)
/*!100301 COMPRESSED*/ DEFAULT NULL
)
)
DROP TABLE t1;
DROP TABLE t1;
#
#
...
...
mysql-test/suite/compat/oracle/r/sp.result
View file @
a8def12e
...
@@ -2072,7 +2072,7 @@ t1 CREATE TABLE "t1" (
...
@@ -2072,7 +2072,7 @@ t1 CREATE TABLE "t1" (
"tables_table_name" varchar(64) CHARACTER SET utf8 DEFAULT NULL,
"tables_table_name" varchar(64) CHARACTER SET utf8 DEFAULT NULL,
"tables_table_rows" bigint(21) unsigned DEFAULT NULL,
"tables_table_rows" bigint(21) unsigned DEFAULT NULL,
"processlist_info" longtext CHARACTER SET utf8 DEFAULT NULL,
"processlist_info" longtext CHARACTER SET utf8 DEFAULT NULL,
"processlist_info_binary" blob DEFAULT NULL
"processlist_info_binary" blob
(65535)
DEFAULT NULL
)
)
DROP TABLE t1;
DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p1;
...
...
mysql-test/suite/compat/oracle/r/type_blob.result
View file @
a8def12e
...
@@ -6,3 +6,21 @@ t1 CREATE TABLE "t1" (
...
@@ -6,3 +6,21 @@ t1 CREATE TABLE "t1" (
"a" longblob DEFAULT NULL
"a" longblob DEFAULT NULL
)
)
DROP TABLE t1;
DROP TABLE t1;
#
# MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
#
CREATE TABLE t1 (
c1 BLOB(100),
c2 BLOB(65535),
c3 BLOB(16777215),
c4 BLOB(16777216)
);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"c1" tinyblob DEFAULT NULL,
"c2" blob(65535) DEFAULT NULL,
"c3" mediumblob DEFAULT NULL,
"c4" longblob DEFAULT NULL
)
DROP TABLE t1;
mysql-test/suite/compat/oracle/t/type_blob.test
View file @
a8def12e
...
@@ -2,3 +2,16 @@ SET sql_mode=ORACLE;
...
@@ -2,3 +2,16 @@ SET sql_mode=ORACLE;
CREATE
TABLE
t1
(
a
BLOB
);
CREATE
TABLE
t1
(
a
BLOB
);
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
--
echo
#
CREATE
TABLE
t1
(
c1
BLOB
(
100
),
c2
BLOB
(
65535
),
c3
BLOB
(
16777215
),
c4
BLOB
(
16777216
)
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
sql/field.cc
View file @
a8def12e
...
@@ -8593,7 +8593,11 @@ void Field_blob::sql_type(String &res) const
...
@@ -8593,7 +8593,11 @@ void Field_blob::sql_type(String &res) const
}
}
res
.
set_ascii
(
str
,
length
);
res
.
set_ascii
(
str
,
length
);
if
(
charset
()
==
&
my_charset_bin
)
if
(
charset
()
==
&
my_charset_bin
)
{
res
.
append
(
STRING_WITH_LEN
(
"blob"
));
res
.
append
(
STRING_WITH_LEN
(
"blob"
));
if
(
packlength
==
2
&&
(
get_thd
()
->
variables
.
sql_mode
&
MODE_ORACLE
))
res
.
append
(
STRING_WITH_LEN
(
"(65535)"
));
}
else
else
{
{
res
.
append
(
STRING_WITH_LEN
(
"text"
));
res
.
append
(
STRING_WITH_LEN
(
"text"
));
...
...
sql/sql_yacc.yy
View file @
a8def12e
...
@@ -7086,7 +7086,12 @@ field_type_lob:
...
@@ -7086,7 +7086,12 @@ field_type_lob:
Lex->charset=&my_charset_bin;
Lex->charset=&my_charset_bin;
$$.set(&type_handler_blob, $2);
$$.set(&type_handler_blob, $2);
}
}
| BLOB_ORACLE_SYM opt_field_length opt_compressed
| BLOB_ORACLE_SYM field_length opt_compressed
{
Lex->charset=&my_charset_bin;
$$.set(&type_handler_blob, $2);
}
| BLOB_ORACLE_SYM opt_compressed
{
{
Lex->charset=&my_charset_bin;
Lex->charset=&my_charset_bin;
$$.set(&type_handler_long_blob);
$$.set(&type_handler_long_blob);
...
...
sql/sql_yacc_ora.yy
View file @
a8def12e
...
@@ -6984,7 +6984,12 @@ field_type_lob:
...
@@ -6984,7 +6984,12 @@ field_type_lob:
Lex->charset=&my_charset_bin;
Lex->charset=&my_charset_bin;
$$.set(&type_handler_blob, $2);
$$.set(&type_handler_blob, $2);
}
}
| BLOB_ORACLE_SYM opt_field_length opt_compressed
| BLOB_ORACLE_SYM field_length opt_compressed
{
Lex->charset=&my_charset_bin;
$$.set(&type_handler_blob, $2);
}
| BLOB_ORACLE_SYM opt_compressed
{
{
Lex->charset=&my_charset_bin;
Lex->charset=&my_charset_bin;
$$.set(&type_handler_long_blob);
$$.set(&type_handler_long_blob);
...
...
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