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
2c80662d
Commit
2c80662d
authored
Mar 08, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lp:731103 Assertion `maybe_null && item->null_value' failed with ORDER BY LAST_DAY()
Item_func_last_day did not set mayby_null=1
parent
b27b5793
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
mysql-test/lib/v1/mysql-test-run.pl
mysql-test/lib/v1/mysql-test-run.pl
+1
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+27
-1
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+9
-0
sql/item_timefunc.h
sql/item_timefunc.h
+5
-0
No files found.
mysql-test/lib/v1/mysql-test-run.pl
View file @
2c80662d
...
@@ -5204,8 +5204,8 @@ sub valgrind_arguments {
...
@@ -5204,8 +5204,8 @@ sub valgrind_arguments {
else
else
{
{
mtr_add_arg
(
$args
,
"
--tool=memcheck
");
# From >= 2.1.2 needs this option
mtr_add_arg
(
$args
,
"
--tool=memcheck
");
# From >= 2.1.2 needs this option
mtr_add_arg
(
$args
,
"
--alignment=8
");
mtr_add_arg
(
$args
,
"
--leak-check=yes
");
mtr_add_arg
(
$args
,
"
--leak-check=yes
");
#mtr_add_arg($args, "--db-attach=yes");
mtr_add_arg
(
$args
,
"
--num-callers=16
");
mtr_add_arg
(
$args
,
"
--num-callers=16
");
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
if
-
f
"
$glob_mysql_test_dir
/valgrind.supp
";
if
-
f
"
$glob_mysql_test_dir
/valgrind.supp
";
...
...
mysql-test/r/func_time.result
View file @
2c80662d
...
@@ -812,7 +812,7 @@ create table t1 select last_day('2000-02-05') as a,
...
@@ -812,7 +812,7 @@ create table t1 select last_day('2000-02-05') as a,
from_days(to_days("960101")) as b;
from_days(to_days("960101")) as b;
describe t1;
describe t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
a date
NO 0000-00-00
a date
YES NULL
b date YES NULL
b date YES NULL
select * from t1;
select * from t1;
a b
a b
...
@@ -1442,3 +1442,29 @@ drop table t1;
...
@@ -1442,3 +1442,29 @@ drop table t1;
select maketime(20,61,10)+0;
select maketime(20,61,10)+0;
maketime(20,61,10)+0
maketime(20,61,10)+0
NULL
NULL
create table t1 (f2 int not null) ;
insert into t1 values (0),(0);
select last_day(f2) from t1;
last_day(f2)
NULL
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select last_day(f2) from t1 where last_day(f2) is null;
last_day(f2)
NULL
NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
select * from t1 order by last_day (f2);
f2
0
0
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
drop table t1;
mysql-test/t/func_time.test
View file @
2c80662d
...
@@ -901,3 +901,12 @@ drop table t1;
...
@@ -901,3 +901,12 @@ drop table t1;
#
#
select
maketime
(
20
,
61
,
10
)
+
0
;
select
maketime
(
20
,
61
,
10
)
+
0
;
#
# lp:731103 Assertion `maybe_null && item->null_value' failed with ORDER BY LAST_DAY()
#
create
table
t1
(
f2
int
not
null
)
;
insert
into
t1
values
(
0
),(
0
);
select
last_day
(
f2
)
from
t1
;
select
last_day
(
f2
)
from
t1
where
last_day
(
f2
)
is
null
;
select
*
from
t1
order
by
last_day
(
f2
);
drop
table
t1
;
sql/item_timefunc.h
View file @
2c80662d
...
@@ -862,4 +862,9 @@ public:
...
@@ -862,4 +862,9 @@ public:
Item_func_last_day
(
Item
*
a
)
:
Item_datefunc
(
a
)
{}
Item_func_last_day
(
Item
*
a
)
:
Item_datefunc
(
a
)
{}
const
char
*
func_name
()
const
{
return
"last_day"
;
}
const
char
*
func_name
()
const
{
return
"last_day"
;
}
bool
get_date
(
MYSQL_TIME
*
res
,
uint
fuzzy_date
);
bool
get_date
(
MYSQL_TIME
*
res
,
uint
fuzzy_date
);
void
fix_length_and_dec
()
{
maybe_null
=
1
;
Item_datefunc
::
fix_length_and_dec
();
}
};
};
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