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
250ca1c1
Commit
250ca1c1
authored
Sep 13, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13707 Server in ORACLE mode crashes on ALTER with wrong DEFAULT clause
parent
dc82f70e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
mysql-test/r/default.result
mysql-test/r/default.result
+7
-0
mysql-test/t/default.test
mysql-test/t/default.test
+10
-0
sql/item.cc
sql/item.cc
+2
-2
No files found.
mysql-test/r/default.result
View file @
250ca1c1
...
...
@@ -3381,4 +3381,11 @@ create table t1 (col1 int default(-(default(col1))));
ERROR 01000: Expression for field `col1` is refering to uninitialized field `col1`
create table t1 (col int default (yearweek((exp(710)))));
ERROR 22003: DOUBLE value is out of range in 'exp(710)'
#
# MDEV-13707 Server in ORACLE mode crashes on ALTER with wrong DEFAULT clause
#
CREATE OR REPLACE TABLE t1(i int);
ALTER TABLE t1 ADD b CHAR(255) DEFAULT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`;
ERROR 42S22: Unknown column 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' in 'DEFAULT'
DROP TABLE t1;
# end of 10.2 test
mysql-test/t/default.test
View file @
250ca1c1
...
...
@@ -2095,4 +2095,14 @@ create table t1 (col1 int default(-(default(col1))));
--
error
ER_DATA_OUT_OF_RANGE
create
table
t1
(
col
int
default
(
yearweek
((
exp
(
710
)))));
--
echo
#
--
echo
# MDEV-13707 Server in ORACLE mode crashes on ALTER with wrong DEFAULT clause
--
echo
#
CREATE
OR
REPLACE
TABLE
t1
(
i
int
);
--
error
ER_BAD_FIELD_ERROR
ALTER
TABLE
t1
ADD
b
CHAR
(
255
)
DEFAULT
`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`
;
DROP
TABLE
t1
;
--
echo
# end of 10.2 test
sql/item.cc
View file @
250ca1c1
...
...
@@ -1446,9 +1446,9 @@ static inline
void
mark_unsupported_func
(
const
char
*
where
,
const
char
*
processor_name
)
{
char
buff
[
64
];
sprintf
(
buff
,
"%s::%s"
,
where
?
where
:
""
,
processor_name
);
my_snprintf
(
buff
,
sizeof
(
buff
)
,
"%s::%s"
,
where
?
where
:
""
,
processor_name
);
DBUG_ENTER
(
buff
);
sprintf
(
buff
,
"%s returns TRUE: unsupported function"
,
processor_name
);
my_snprintf
(
buff
,
sizeof
(
buff
)
,
"%s returns TRUE: unsupported function"
,
processor_name
);
DBUG_PRINT
(
"info"
,
(
"%s"
,
buff
));
DBUG_VOID_RETURN
;
}
...
...
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