summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-01-24 19:54:40 +0400
committerunknown <gluh@eagle.(none)>2007-01-24 19:54:40 +0400
commitd663a34303e600a5e33c6b1ca27fb3e9b1f4646e (patch)
treef775cabca54ceb5c24dfb0a8166ff2a9d78c7644 /mysql-test/t/range.test
parent1b71102f4bc56181e7781e0367bb6f44876a4553 (diff)
parent19ce865686ec43780d14ca43aa0d516bf5b36c8b (diff)
downloadmariadb-git-d663a34303e600a5e33c6b1ca27fb3e9b1f4646e.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt BitKeeper/etc/ignore: auto-union mysql-test/r/func_in.result: Auto merged mysql-test/r/range.result: Auto merged mysql-test/r/sp-code.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/func_in.test: Auto merged mysql-test/t/range.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/r/select.result: manual merge mysql-test/r/view.result: manual merge mysql-test/t/select.test: manual merge mysql-test/t/view.test: manual merge
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test43
1 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index af90b6cd4f0..b1cec049ab2 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -525,6 +525,49 @@ explain select a from t1 where a > 'x';
select a from t1 where a > 'x';
drop table t1;
+#
+# Bug #24776: assertion abort for 'range checked for each record'
+#
+
+CREATE TABLE t1 (
+ OXID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
+ OXPARENTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT 'oxrootid',
+ OXLEFT int NOT NULL DEFAULT '0',
+ OXRIGHT int NOT NULL DEFAULT '0',
+ OXROOTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
+ PRIMARY KEY (OXID),
+ KEY OXNID (OXID),
+ KEY OXLEFT (OXLEFT),
+ KEY OXRIGHT (OXRIGHT),
+ KEY OXROOTID (OXROOTID)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;
+
+INSERT INTO t1 VALUES
+('d8c4177d09f8b11f5.52725521','oxrootid',1,40,'d8c4177d09f8b11f5.52725521'),
+('d8c4177d151affab2.81582770','d8c4177d09f8b11f5.52725521',2,3,
+ 'd8c4177d09f8b11f5.52725521'),
+('d8c4177d206a333d2.74422679','d8c4177d09f8b11f5.52725521',4,5,
+ 'd8c4177d09f8b11f5.52725521'),
+('d8c4177d225791924.30714720','d8c4177d09f8b11f5.52725521',6,7,
+ 'd8c4177d09f8b11f5.52725521'),
+('d8c4177d2380fc201.39666693','d8c4177d09f8b11f5.52725521',8,9,
+ 'd8c4177d09f8b11f5.52725521'),
+('d8c4177d24ccef970.14957924','d8c4177d09f8b11f5.52725521',10,11,
+ 'd8c4177d09f8b11f5.52725521');
+
+EXPLAIN
+SELECT s.oxid FROM t1 v, t1 s
+ WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
+ v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
+ s.oxleft > v.oxleft AND s.oxleft < v.oxright;
+
+SELECT s.oxid FROM t1 v, t1 s
+ WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
+ v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
+ s.oxleft > v.oxleft AND s.oxleft < v.oxright;
+
+DROP TABLE t1;
+
--echo End of 4.1 tests
#