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
20089f5a
Commit
20089f5a
authored
Dec 08, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
parent
ac61a575
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
mysql-test/r/func_set.result
mysql-test/r/func_set.result
+9
-0
mysql-test/t/func_set.test
mysql-test/t/func_set.test
+11
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+13
-0
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-0
No files found.
mysql-test/r/func_set.result
View file @
20089f5a
...
...
@@ -220,3 +220,12 @@ NULL
1,2,3,4,5,6,7
DROP TABLE t1;
#
# MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
#
SELECT INTERVAL(ROW(1,1),ROW(1,2));
ERROR 21000: Operand should contain 1 column(s)
SELECT INTERVAL(1,ROW(1,2));
ERROR 21000: Operand should contain 1 column(s)
SELECT INTERVAL(ROW(1,2),1);
ERROR 21000: Operand should contain 1 column(s)
mysql-test/t/func_set.test
View file @
20089f5a
...
...
@@ -136,3 +136,14 @@ SELECT * FROM t1 WHERE FIND_IN_SET(NULL, NULL) IS UNKNOWN;
--
echo
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
--
echo
#
--
error
ER_OPERAND_COLUMNS
SELECT
INTERVAL
(
ROW
(
1
,
1
),
ROW
(
1
,
2
));
--
error
ER_OPERAND_COLUMNS
SELECT
INTERVAL
(
1
,
ROW
(
1
,
2
));
--
error
ER_OPERAND_COLUMNS
SELECT
INTERVAL
(
ROW
(
1
,
2
),
1
);
sql/item_cmpfunc.cc
View file @
20089f5a
...
...
@@ -2001,6 +2001,19 @@ bool Item_func_opt_neg::eq(const Item *item, bool binary_cmp) const
}
bool
Item_func_interval
::
fix_fields
(
THD
*
thd
,
Item
**
ref
)
{
if
(
Item_int_func
::
fix_fields
(
thd
,
ref
))
return
true
;
for
(
uint
i
=
0
;
i
<
row
->
cols
();
i
++
)
{
if
(
row
->
element_index
(
i
)
->
check_cols
(
1
))
return
true
;
}
return
false
;
}
void
Item_func_interval
::
fix_length_and_dec
()
{
uint
rows
=
row
->
cols
();
...
...
sql/item_cmpfunc.h
View file @
20089f5a
...
...
@@ -728,6 +728,7 @@ class Item_func_interval :public Item_int_func
{
allowed_arg_cols
=
0
;
// Fetch this value from first argument
}
bool
fix_fields
(
THD
*
,
Item
**
);
longlong
val_int
();
void
fix_length_and_dec
();
const
char
*
func_name
()
const
{
return
"interval"
;
}
...
...
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