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
201c1e0f
Commit
201c1e0f
authored
Oct 25, 2016
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9143 JSON_xxx functions.
Item_bool fixed to behave smarter with NOT operation.
parent
b09b3161
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
mysql-test/r/null.result
mysql-test/r/null.result
+1
-1
mysql-test/r/parser_precedence.result
mysql-test/r/parser_precedence.result
+1
-1
sql/item.cc
sql/item.cc
+8
-0
sql/item.h
sql/item.h
+1
-0
No files found.
mysql-test/r/null.result
View file @
201c1e0f
...
...
@@ -1584,7 +1584,7 @@ SELECT * FROM t1 WHERE ((c1 IS NOT NULL) >= (NOT TRUE)) IS NOT NULL;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (((`test`.`t1`.`c1` is not null) >=
<cache>((not(1)))
) is not null)
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (((`test`.`t1`.`c1` is not null) >=
0
) is not null)
SELECT * FROM t1 WHERE ((c1 IS NOT NULL) >= (NOT TRUE)) IS NOT NULL;
c1
1
...
...
mysql-test/r/parser_precedence.result
View file @
201c1e0f
...
...
@@ -369,7 +369,7 @@ select (NOT FALSE) AND FALSE, NOT (FALSE AND FALSE), NOT FALSE AND FALSE;
0 1 0
Testing that NOT is associative
select NOT NOT TRUE, NOT NOT NOT FALSE;
TRUE NOT NOT NOT FALSE
NOT NOT
TRUE NOT NOT NOT FALSE
1 1
Testing that IS has precedence over NOT
select (NOT NULL) IS TRUE, NOT (NULL IS TRUE), NOT NULL IS TRUE;
...
...
sql/item.cc
View file @
201c1e0f
...
...
@@ -2900,6 +2900,14 @@ void Item_int::print(String *str, enum_query_type query_type)
}
Item
*
Item_bool
::
neg_transformer
(
THD
*
thd
)
{
value
=
!
value
;
name
=
0
;
return
this
;
}
Item_uint
::
Item_uint
(
THD
*
thd
,
const
char
*
str_arg
,
uint
length
)
:
Item_int
(
thd
,
str_arg
,
length
)
{
...
...
sql/item.h
View file @
201c1e0f
...
...
@@ -3008,6 +3008,7 @@ class Item_bool :public Item_int
Item_bool
(
THD
*
thd
,
const
char
*
str_arg
,
longlong
i
)
:
Item_int
(
thd
,
str_arg
,
i
,
1
)
{}
bool
is_bool_type
()
{
return
true
;
}
Item
*
neg_transformer
(
THD
*
thd
);
};
...
...
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