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
2d592f75
Commit
2d592f75
authored
Mar 26, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
a138d061
c676f58c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
mysql-test/main/ps_error.result
mysql-test/main/ps_error.result
+6
-6
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+4
-4
No files found.
mysql-test/main/ps_error.result
View file @
2d592f75
...
...
@@ -7,7 +7,7 @@ PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
SELECT a FROM t1 GROUP BY NULL WITH ROLLUP;
a
DROP TABLE t1;
...
...
@@ -18,7 +18,7 @@ PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
SET @a = REPLACE( @@global.optimizer_switch, '=on', '=off' ) ;
DROP TABLE t1;
SET sql_mode=DEFAULT;
...
...
@@ -30,7 +30,7 @@ PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
SELECT 'All done';
All done
All done
...
...
@@ -40,7 +40,7 @@ PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
DEALLOCATE PREPARE stmt;
SELECT 'All done';
All done
...
...
@@ -52,7 +52,7 @@ PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
SELECT a FROM t1 GROUP BY a;
a
SELECT * FROM t1;
...
...
@@ -65,7 +65,7 @@ PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
EXECUTE stmt;
ERROR 22007: Truncated incorrect
INTEGER
value: 'foo'
ERROR 22007: Truncated incorrect
DOUBLE
value: 'foo'
SELECT a FROM t1 GROUP BY a;
a
INSERT t1 SELECT * FROM ( SELECT * FROM t1 ) sq;
...
...
sql/item_cmpfunc.cc
View file @
2d592f75
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 201
6
, MariaDB
Copyright (c) 2009, 201
9
, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -4545,7 +4545,7 @@ Item_cond::fix_fields(THD *thd, Item **ref)
List_iterator
<
Item
>
li
(
list
);
Item
*
item
;
uchar
buff
[
sizeof
(
char
*
)];
// Max local vars in function
longlong
is_and_cond
=
functype
()
==
Item_func
::
COND_AND_FUNC
;
bool
is_and_cond
=
functype
()
==
Item_func
::
COND_AND_FUNC
;
not_null_tables_cache
=
0
;
used_tables_and_const_cache_init
();
...
...
@@ -4661,7 +4661,7 @@ bool
Item_cond
::
eval_not_null_tables
(
void
*
opt_arg
)
{
Item
*
item
;
longlong
is_and_cond
=
functype
()
==
Item_func
::
COND_AND_FUNC
;
bool
is_and_cond
=
functype
()
==
Item_func
::
COND_AND_FUNC
;
List_iterator
<
Item
>
li
(
list
);
not_null_tables_cache
=
(
table_map
)
0
;
and_tables_cache
=
~
(
table_map
)
0
;
...
...
@@ -4671,7 +4671,7 @@ Item_cond::eval_not_null_tables(void *opt_arg)
if
(
item
->
const_item
()
&&
!
item
->
with_param
&&
!
item
->
is_expensive
()
&&
!
cond_has_datetime_is_null
(
item
))
{
if
(
item
->
val_int
()
==
is_and_cond
&&
top_level
())
if
(
item
->
eval_const_cond
()
==
is_and_cond
&&
top_level
())
{
/*
a. This is "... AND true_cond AND ..."
...
...
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