summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-06-25 18:33:31 +0300
committerunknown <bell@sanja.is.com.ua>2004-06-25 18:33:31 +0300
commit2cf6338bda940394d5e86b09d4e6fea59d6ecbb5 (patch)
tree8b54d2bc8b4df4ec4450dd261036fa0664ced5f4 /mysql-test
parent9e630fa088c9f2d7102d6cb36245b09ea655e33d (diff)
parentef0b6f07034d715f4d7e9669d4111906d19746dc (diff)
downloadmariadb-git-2cf6338bda940394d5e86b09d4e6fea59d6ecbb5.tar.gz
merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ps.result13
-rw-r--r--mysql-test/t/ps.test13
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 7b3b051fffb..de20f102b07 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -179,3 +179,16 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
deallocate prepare stmt1;
drop tables t1,t2;
+set @arg00=1;
+prepare stmt1 from ' create table t1 (m int) as select 1 as m ' ;
+execute stmt1 ;
+select m from t1;
+m
+1
+drop table t1;
+prepare stmt1 from ' create table t1 (m int) as select ? as m ' ;
+execute stmt1 using @arg00;
+select m from t1;
+m
+1
+drop table t1;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 3dc6e10f55d..5af65242e7b 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -166,3 +166,16 @@ execute stmt1 ;
explain SELECT (SELECT SUM(c1 + c12 + 0.0) FROM t2 where (t1.c2 - 0e-3) = t2.c2 GROUP BY t1.c15 LIMIT 1) as scalar_s, exists (select 1.0e+0 from t2 where t2.c3 * 9.0000000000 = t1.c4) as exists_s, c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s FROM t1, (select c25 x, c32 y from t2) tt WHERE x * 1 = c25;
deallocate prepare stmt1;
drop tables t1,t2;
+
+#
+# parameters from variables (for field creation)
+#
+set @arg00=1;
+prepare stmt1 from ' create table t1 (m int) as select 1 as m ' ;
+execute stmt1 ;
+select m from t1;
+drop table t1;
+prepare stmt1 from ' create table t1 (m int) as select ? as m ' ;
+execute stmt1 using @arg00;
+select m from t1;
+drop table t1;