[MDEV-3371] LP:665669 - Result differences on query re-execution Created: 2010-10-23 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following RQG command line perl runall.pl - reports a sporadic result difference in the following query:
Unfortunately the failure does not repeat when the query is executed again or is run standalone as an MTR test case. Valgrind also does not report anything. |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2010-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic result differences on query re-execution 1. First some Query 1 is run. No join_cache , bka , MRR or other configurable optimizations seem to be involved. maria-5.3 is affected, but maria-5.2 and mysql-next-mr are not. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic result differences on query re-execution | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-10-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Apologies for the rather verbose test case, but note that the initial test case contained over 10K queries. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-11-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic result differences on query re-execution --source include/have_innodb.inc SET SESSION join_cache_level=0; CREATE TABLE `B` ( `col_varchar_10_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_10_latin1_key` varchar(10) CHARACTER SET latin1, pk integer auto_increment, `col_varchar_1024_utf8_key` varchar(10) CHARACTER SET utf8, `col_varchar_10_utf8_key` varchar(10) CHARACTER SET utf8, `col_int` int, `col_varchar_10_utf8` varchar(10) CHARACTER SET utf8, `col_varchar_1024_latin1` varchar(10) CHARACTER SET latin1, `col_int_key` int, `col_varchar_1024_latin1_key` varchar(10) CHARACTER SET latin1, `col_varchar_1024_utf8` varchar(10) CHARACTER SET utf8, /Indices/ key (`col_varchar_10_latin1_key` ), primary key (pk), key (`col_varchar_1024_utf8_key` ), key (`col_varchar_10_utf8_key` ), key (`col_int_key` ), key (`col_varchar_1024_latin1_key` )) ENGINE=innodb; CREATE TABLE `V` ( `col_varchar_1024_latin1` varchar(10) CHARACTER SET latin1, `col_int` int, `col_int_key` int, `col_varchar_1024_utf8_key` varchar(10) CHARACTER SET utf8, `col_varchar_10_utf8` varchar(10) CHARACTER SET utf8, `col_varchar_1024_utf8` varchar(10) CHARACTER SET utf8, `col_varchar_1024_latin1_key` varchar(10) CHARACTER SET latin1, pk integer auto_increment, `col_varchar_10_utf8_key` varchar(10) CHARACTER SET utf8, `col_varchar_10_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_10_latin1_key` varchar(10) CHARACTER SET latin1, /Indices/ key (`col_int_key` ), key (`col_varchar_1024_utf8_key` ), key (`col_varchar_1024_latin1_key` ), primary key (pk), key (`col_varchar_10_utf8_key` ), key (`col_varchar_10_latin1_key` )) ENGINE=innodb; INSERT /*! IGNORE */ INTO V VALUES ('abcdefghij', -1185611776, 6, 'abcdefghij', 'i', 'o', 'do', NULL, 'abcdefghij', 'c', 'o') CREATE TABLE `Z` ( `col_int_key` int, `col_varchar_1024_utf8_key` varchar(10) CHARACTER SET utf8, `col_int` int, `col_varchar_10_latin1_key` varchar(10) CHARACTER SET latin1, `col_varchar_1024_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_10_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_10_utf8` varchar(10) CHARACTER SET utf8, `col_varchar_1024_latin1_key` varchar(10) CHARACTER SET latin1, `col_varchar_10_utf8_key` varchar(10) CHARACTER SET utf8, `col_varchar_1024_utf8` varchar(10) CHARACTER SET utf8, pk integer auto_increment, /Indices/ key (`col_int_key` ), key (`col_varchar_1024_utf8_key` ), key (`col_varchar_10_latin1_key` ), key (`col_varchar_1024_latin1_key` ), key (`col_varchar_10_utf8_key` ), primary key (pk)) ENGINE=innodb; INSERT /*! IGNORE */ INTO Z VALUES (-810876928, 'o', -783155200, 's', 'because', 'is', 'c', 'well', 'c', 'n', NULL) CREATE TABLE `EE` ( `col_varchar_10_latin1_key` varchar(10) CHARACTER SET latin1, `col_int` int, `col_varchar_1024_utf8_key` varchar(10) CHARACTER SET utf8, `col_varchar_1024_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_1024_utf8` varchar(10) CHARACTER SET utf8, `col_int_key` int, `col_varchar_10_latin1` varchar(10) CHARACTER SET latin1, `col_varchar_10_utf8` varchar(10) CHARACTER SET utf8, `col_varchar_10_utf8_key` varchar(10) CHARACTER SET utf8, pk integer auto_increment, `col_varchar_1024_latin1_key` varchar(10) CHARACTER SET latin1, /Indices/ key (`col_varchar_10_latin1_key` ), key (`col_varchar_1024_utf8_key` ), key (`col_int_key` ), key (`col_varchar_10_utf8_key` ), primary key (pk), key (`col_varchar_1024_latin1_key` )) ENGINE=myisam; --error 0 --error 0 --error 0 CREATE TABLE p2 AS --let $diff_table_1 = test.p1 | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic result differences on query re-execution --source include/have_innodb.inc CREATE TABLE t1 ( f1 int, f2 int, f4 int, f6 int, PRIMARY KEY (f2), KEY (f6)) ENGINE=InnoDB; CREATE TABLE t2 (f2 int); CREATE TABLE t3 (f4 int, f2 int) ; CREATE TABLE t4 ( f4 int, f6 int) ; CREATE TABLE t5 (f11 int) ENGINE=InnoDB; SELECT * FROM t5 AS table1 LEFT JOIN t1 AS table2 ON table1 .`f11` = table2 .`f1` WHERE table2 .`f6` > 2; CREATE TABLE p1 AS SELECT table1.f4 AS field1 , table2.f4 AS field2 , table1.f4 AS field3 FROM t3 table1 RIGHT JOIN t4 table2 JOIN t2 table3 ON table2.f6 ON table1.f2 = table3.f2 LEFT JOIN t1 AS table4 ON table3.f2 = table4.f4 WHERE table4.f2 <> 3; --let $diff_table_1 = test.p1 | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Sporadic result differences on query re-execution | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2010-12-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Result differences on query re-execution | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2011-01-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Result differences on query re-execution create table t1 (pk int primary key, b int, c int default 0, index idx(b)) engine=innodb; The last 3 commands return:
---
--- MariaDB [test]> select * from t1 where pk < 2 or pk between 3 and 4;
---
--- MariaDB [test]> select * from t1 where pk < 2 or pk between 3 and 4;
---
--- | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2011-01-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Re: Result differences on query re-execution | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Launchpad bug id: 665669 |