summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-06-23 06:15:50 -0700
committerunknown <igor@rurik.mysql.com>2005-06-23 06:15:50 -0700
commit98253bd64d51d42f914c59ebabe89e3975ba9cc8 (patch)
tree85c8bd369995946339b96de3fc2377edc695e4c6 /mysql-test/t/func_str.test
parentff972e3e5d15e85724d89a7cdde73838505c27db (diff)
downloadmariadb-git-98253bd64d51d42f914c59ebabe89e3975ba9cc8.tar.gz
func_str.result, func_str.test:
Added a test case for bug #10124. sql_select.h, item_subselect.cc, sql_select.cc: Fixed bug #10124. The copy method of the store_key classes can return STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now. field.cc: Fixed bug #10124. When ussuing a warning the store methods return 2 instead of 1 now. sql/field.cc: Fixed bug #10124. When ussuing a warning the store methods return 2 instead of 1 now. sql/sql_select.cc: Fixed bug #10124. The copy method of the store_key classes can return STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now. sql/item_subselect.cc: Fixed bug #10124. The copy method of the store_key classes can return STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now. sql/sql_select.h: Fixed bug #10124. The copy method of the store_key classes can return STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now. mysql-test/t/func_str.test: Added a test case for bug #10124. mysql-test/r/func_str.result: Added a test case for bug #10124.
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index a5536f7a0be..36cfac16ff3 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -527,3 +527,17 @@ DROP TABLE t1, t2;
#
select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0);
select field(NULL,1,2,NULL), field(NULL,1,2,0);
+
+#
+# Bug #10124: access by integer index with a string key that is not a number
+#
+
+CREATE TABLE t1 (str varchar(20) PRIMARY KEY);
+CREATE TABLE t2 (num int primary key);
+INSERT INTO t1 VALUES ('notnumber');
+INSERT INTO t2 VALUES (0), (1);
+
+SELECT * FROM t1, t2 WHERE num=str;
+SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
+
+DROP TABLE t1,t2;