mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for a bug record #307.
Very nasty bug. It was caused by double free()-ing memory of join->select and join->quick. I was able to pinpoint it only after using Valgrind. Plus better fix for bug with TMP_TABLE_PARAM. Plus new constructor for SELECT_LEX. mysql-test/r/innodb.result: Fix for a bug record #307. Very nasty bug. It was caused by double free()-ing memory of join->select and join->quick. I was able to pinpoint it only after using Valgrind. mysql-test/t/innodb.test: Fix for a bug record #307. Very nasty bug. It was caused by double free()-ing memory of join->select and join->quick. I was able to pinpoint it only after using Valgrind. sql/sql_lex.cc: Adding a usefull constructor sql/sql_lex.h: Adding a usefull constructor which additionally required few more definitions. sql/sql_select.cc: Fix for a bug record #307. Very nasty bug. It was caused by double free()-ing memory of join->select and join->quick. I was able to pinpoint it only after using Valgrind. sql/sql_union.cc: Fixing bug #307. Also, a better fix for TMP_TABLE_PARAM bug. Also, use of the new constructor for SELECT_LEX.
This commit is contained in:
@ -1203,3 +1203,15 @@ a b
|
||||
8 5
|
||||
9 5
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
|
||||
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
|
||||
(stamp))TYPE=InnoDB;
|
||||
insert into t1 values (1),(2),(3);
|
||||
insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 );
|
||||
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
|
||||
'20020204120000' GROUP BY col1;
|
||||
col1
|
||||
1
|
||||
2
|
||||
3
|
||||
drop table t1,t2;
|
||||
|
@ -805,3 +805,11 @@ select * from t1;
|
||||
select * from t2;
|
||||
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
|
||||
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
|
||||
(stamp))TYPE=InnoDB;
|
||||
insert into t1 values (1),(2),(3);
|
||||
insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 );
|
||||
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
|
||||
'20020204120000' GROUP BY col1;
|
||||
drop table t1,t2;
|
||||
|
Reference in New Issue
Block a user