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
0a3533ff
Commit
0a3533ff
authored
Apr 19, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/mysql-5.0-maint
into mysql.com:/home/ram/work/b26851/b26851.5.0
parents
30f3f3a0
5198d0b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
mysql-test/r/strict.result
mysql-test/r/strict.result
+6
-0
mysql-test/t/strict.test
mysql-test/t/strict.test
+8
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
No files found.
mysql-test/r/strict.result
View file @
0a3533ff
...
...
@@ -1391,4 +1391,10 @@ create table t1 (f1 set('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in SET
create table t1 (f1 enum('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in ENUM
set @@sql_mode='NO_ZERO_DATE';
create table t1(a datetime not null);
select count(*) from t1 where a is null;
count(*)
0
drop table t1;
End of 5.0 tests
mysql-test/t/strict.test
View file @
0a3533ff
...
...
@@ -1258,4 +1258,12 @@ create table t1 (f1 set('a','a'));
--
error
1291
create
table
t1
(
f1
enum
(
'a'
,
'a'
));
#
# Bug #22824: strict, datetime, NULL, wrong warning
#
set
@@
sql_mode
=
'NO_ZERO_DATE'
;
create
table
t1
(
a
datetime
not
null
);
select
count
(
*
)
from
t1
where
a
is
null
;
drop
table
t1
;
--
echo
End
of
5.0
tests
sql/item_cmpfunc.cc
View file @
0a3533ff
...
...
@@ -316,7 +316,8 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
{
/* For comparison purposes allow invalid dates like 2000-01-32 */
ulong
orig_sql_mode
=
thd
->
variables
.
sql_mode
;
thd
->
variables
.
sql_mode
|=
MODE_INVALID_DATES
;
thd
->
variables
.
sql_mode
=
(
orig_sql_mode
&
~
MODE_NO_ZERO_DATE
)
|
MODE_INVALID_DATES
;
if
(
!
(
*
item
)
->
save_in_field
(
field
,
1
)
&&
!
((
*
item
)
->
null_value
))
{
Item
*
tmp
=
new
Item_int_with_ref
(
field
->
val_int
(),
*
item
,
...
...
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