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
570aacac
Commit
570aacac
authored
Apr 19, 2007
by
ramil/ram@ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/b22824/my50-b22824
into mysql.com:/home/ram/work/b22824/my51-b22824
parents
88a477ab
d7797398
Changes
3
Hide 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 @
570aacac
...
...
@@ -1393,4 +1393,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 @
570aacac
...
...
@@ -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 @
570aacac
...
...
@@ -366,7 +366,8 @@ static bool convert_constant_item(THD *thd, Field *field, Item **item)
old_read_map
=
dbug_tmp_use_all_columns
(
table
,
table
->
read_set
);
}
/* For comparison purposes allow invalid dates like 2000-01-32 */
thd
->
variables
.
sql_mode
|=
MODE_INVALID_DATES
;
thd
->
variables
.
sql_mode
=
(
orig_sql_mode
&
~
MODE_NO_ZERO_DATE
)
|
MODE_INVALID_DATES
;
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
if
(
!
(
*
item
)
->
save_in_field
(
field
,
1
)
&&
!
((
*
item
)
->
null_value
))
{
...
...
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