summaryrefslogtreecommitdiff
path: root/mysql-test/t/join.test
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-04-23 00:13:37 +0300
committerunknown <monty@narttu.mysql.fi>2003-04-23 00:13:37 +0300
commit963d57a39446490ce2fb91c773ac2466c3723aa1 (patch)
treee8815626252ba8fcb25ec3213c25fece2e4e5ed4 /mysql-test/t/join.test
parenta312e13795d772af8edc3ba4a089e138b30e1b21 (diff)
downloadmariadb-git-963d57a39446490ce2fb91c773ac2466c3723aa1.tar.gz
Fixed problem with timestamps in binary log on 64 bit machines
Backported fix from 4.1 for bug 212: SELECT query containing a NATURAL JOIN and parentheses in the WHERE clause mysql-test/r/join.result: New test results mysql-test/t/join.test: Test for bug 212 sql/log_event.cc: Removed wrong cast sql/log_event.h: Fixed problem with timestamps in binary log on 64 bit machines sql/sql_list.h: Fix for bug 212 (back ported from 4.1)
Diffstat (limited to 'mysql-test/t/join.test')
-rw-r--r--mysql-test/t/join.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 6a022e690f2..5fe1834873f 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -243,3 +243,17 @@ INSERT INTO t2 VALUES ('rivercats','cust',20);
SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats';
SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
drop table t1,t2;
+
+#
+# Problem with internal list handling when reducing WHERE
+#
+
+CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, Value1 VARCHAR(255));
+CREATE TABLE t2 (ID INTEGER NOT NULL PRIMARY KEY, Value2 VARCHAR(255));
+INSERT INTO t1 VALUES (1, 'A');
+INSERT INTO t2 VALUES (1, 'B');
+
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND (Value1 = 'A' AND Value2 <> 'B');
+SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
+SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
+drop table t1,t2;