Commit 90187044 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Fix results in real ps-protocol:

Starting wth 10.6 it goes via ps protocol so the subselect removed
only once on prepare.
parent 1c926b62
--- mysql-test/main/select.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select.reject 2023-02-01 13:44:11.026958614 +0100
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';
......@@ -3,6 +3,7 @@
#
--source include/no_valgrind_without_big.inc
--source include/protocol.inc
#
# Simple select test
......@@ -4758,9 +4759,11 @@ INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3));
--enable_prepare_warnings
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3));
--disable_prepare_warnings
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';
......
--- mysql-test/main/select_jcl6.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_jcl6.reject 2023-02-01 13:44:10.722958771 +0100
@@ -5672,6 +5672,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';
--- mysql-test/main/select_pkeycache.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_pkeycache.reject 2023-02-01 13:43:21.742985365 +0100
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment