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
d777a9aa
Commit
d777a9aa
authored
Nov 27, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change sql_mode BROKEN_NOT to HIGH_NOT_PRECEDENCE
parent
cf1de7d9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
mysql-test/r/ansi.result
mysql-test/r/ansi.result
+1
-1
mysql-test/r/bool.result
mysql-test/r/bool.result
+1
-1
mysql-test/r/sql_mode.result
mysql-test/r/sql_mode.result
+1
-1
mysql-test/t/bool.test
mysql-test/t/bool.test
+1
-1
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/set_var.cc
sql/set_var.cc
+2
-2
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
No files found.
mysql-test/r/ansi.result
View file @
d777a9aa
...
...
@@ -2,7 +2,7 @@ drop table if exists t1;
set sql_mode="MySQL40";
select @@sql_mode;
@@sql_mode
NO_FIELD_OPTIONS,MYSQL40,
BROKEN_NOT
NO_FIELD_OPTIONS,MYSQL40,
HIGH_NOT_PRECEDENCE
set @@sql_mode="ANSI";
select @@sql_mode;
@@sql_mode
...
...
mysql-test/r/bool.result
View file @
d777a9aa
...
...
@@ -33,7 +33,7 @@ a
SELECT * FROM t1 where (1 AND a) IS NULL;
a
NULL
set sql_mode='
broken_not
';
set sql_mode='
high_not_precedence
';
select * from t1 where not a between 2 and 3;
a
set sql_mode=default;
...
...
mysql-test/r/sql_mode.result
View file @
d777a9aa
...
...
@@ -61,7 +61,7 @@ t1 CREATE TABLE `t1` (
set @@sql_mode="no_field_options,mysql323,mysql40";
show variables like 'sql_mode';
Variable_name Value
sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40,
BROKEN_NOT
sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40,
HIGH_NOT_PRECEDENCE
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/t/bool.test
View file @
d777a9aa
...
...
@@ -21,7 +21,7 @@ SELECT * FROM t1 where (1 AND a)=1;
SELECT
*
FROM
t1
where
(
1
AND
a
)
IS
NULL
;
# WL#638 - Behaviour of NOT does not follow SQL specification
set
sql_mode
=
'
broken_not
'
;
set
sql_mode
=
'
high_not_precedence
'
;
select
*
from
t1
where
not
a
between
2
and
3
;
set
sql_mode
=
default
;
select
*
from
t1
where
not
a
between
2
and
3
;
...
...
sql/mysql_priv.h
View file @
d777a9aa
...
...
@@ -282,7 +282,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
#define MODE_ERROR_FOR_DIVISION_BY_ZERO (MODE_INVALID_DATES*2)
#define MODE_TRADITIONAL (MODE_ERROR_FOR_DIVISION_BY_ZERO*2)
#define MODE_NO_AUTO_CREATE_USER (MODE_TRADITIONAL*2)
#define MODE_
BROKEN_NOT
(MODE_NO_AUTO_CREATE_USER*2)
#define MODE_
HIGH_NOT_PRECEDENCE
(MODE_NO_AUTO_CREATE_USER*2)
#define RAID_BLOCK_SIZE 1024
...
...
sql/mysqld.cc
View file @
d777a9aa
...
...
@@ -221,7 +221,7 @@ const char *sql_mode_names[] =
"NO_TABLE_OPTIONS"
,
"NO_FIELD_OPTIONS"
,
"MYSQL323"
,
"MYSQL40"
,
"ANSI"
,
"NO_AUTO_VALUE_ON_ZERO"
,
"NO_BACKSLASH_ESCAPES"
,
"STRICT_TRANS_TABLES"
,
"STRICT_ALL_TABLES"
,
"NO_ZERO_IN_DATE"
,
"NO_ZERO_DATE"
,
"ALLOW_INVALID_DATES"
,
"ERROR_FOR_DIVISION_BY_ZERO"
,
"TRADITIONAL"
,
"NO_AUTO_CREATE_USER"
,
"
BROKEN_NOT
"
,
"TRADITIONAL"
,
"NO_AUTO_CREATE_USER"
,
"
HIGH_NOT_PRECEDENCE
"
,
NullS
};
TYPELIB
sql_mode_typelib
=
{
array_elements
(
sql_mode_names
)
-
1
,
""
,
...
...
sql/set_var.cc
View file @
d777a9aa
...
...
@@ -3146,9 +3146,9 @@ ulong fix_sql_mode(ulong sql_mode)
MODE_NO_KEY_OPTIONS
|
MODE_NO_TABLE_OPTIONS
|
MODE_NO_FIELD_OPTIONS
|
MODE_NO_AUTO_CREATE_USER
);
if
(
sql_mode
&
MODE_MYSQL40
)
sql_mode
|=
MODE_NO_FIELD_OPTIONS
|
MODE_
BROKEN_NOT
;
sql_mode
|=
MODE_NO_FIELD_OPTIONS
|
MODE_
HIGH_NOT_PRECEDENCE
;
if
(
sql_mode
&
MODE_MYSQL323
)
sql_mode
|=
MODE_NO_FIELD_OPTIONS
|
MODE_
BROKEN_NOT
;
sql_mode
|=
MODE_NO_FIELD_OPTIONS
|
MODE_
HIGH_NOT_PRECEDENCE
;
if
(
sql_mode
&
MODE_TRADITIONAL
)
sql_mode
|=
(
MODE_STRICT_TRANS_TABLES
|
MODE_STRICT_ALL_TABLES
|
MODE_NO_ZERO_IN_DATE
|
MODE_NO_ZERO_DATE
|
...
...
sql/sql_lex.cc
View file @
d777a9aa
...
...
@@ -201,7 +201,7 @@ static int find_keyword(LEX *lex, uint len, bool function)
lex
->
yylval
->
symbol
.
length
=
len
;
if
((
symbol
->
tok
==
NOT_SYM
)
&&
(
lex
->
thd
->
variables
.
sql_mode
&
MODE_
BROKEN_NOT
))
(
lex
->
thd
->
variables
.
sql_mode
&
MODE_
HIGH_NOT_PRECEDENCE
))
return
NOT2_SYM
;
if
((
symbol
->
tok
==
OR_OR_SYM
)
&&
!
(
lex
->
thd
->
variables
.
sql_mode
&
MODE_PIPES_AS_CONCAT
))
...
...
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