Skip to content

Commit

Permalink
Merge 10.2 into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Mar 26, 2019
2 parents a138d06 + c676f58 commit 2d592f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions mysql-test/main/ps_error.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions sql/item_cmpfunc.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, MariaDB
Copyright (c) 2009, 2019, 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
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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;
Expand All @@ -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 ..."
Expand Down

0 comments on commit 2d592f7

Please sign in to comment.