mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
MDEV-10657: incorrect result returned with binary protocol (prepared statements)
If translation table present when we materialize the derived table then change it to point to the materialized table. Added debug info to see really what happens with what derived.
This commit is contained in:
committed by
Oleksandr Byelkin
parent
924db8b4ed
commit
462808f3b6
@@ -4316,4 +4316,22 @@ set join_cache_level=@join_cache_level_save;
|
||||
deallocate prepare stmt;
|
||||
drop view v1,v2,v3;
|
||||
drop table t1,t2,t3;
|
||||
#
|
||||
# MDEV-10657: incorrect result returned with binary protocol
|
||||
# (prepared statements)
|
||||
#
|
||||
create table t1 (code varchar(10) primary key);
|
||||
INSERT INTO t1(code) VALUES ('LINE1'), ('LINE2'), ('LINE3');
|
||||
SELECT X.*
|
||||
FROM
|
||||
(SELECT CODE, RN
|
||||
FROM
|
||||
(SELECT A.CODE, @cnt := @cnt + 1 AS RN
|
||||
FROM t1 A, (SELECT @cnt := 0) C) T
|
||||
) X;
|
||||
CODE RN
|
||||
LINE1 1
|
||||
LINE2 2
|
||||
LINE3 3
|
||||
drop table t1;
|
||||
# End of 5.5 tests
|
||||
|
Reference in New Issue
Block a user