List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:April 20 2008 12:05am
Subject:bk commit into 6.0 tree (hakank:1.2624)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of hakank.  When hakank does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-20 02:05:17+02:00, hakank@lu0011.(none) +48 -0
  Moved failing tests to falcon_team suite.
  falcon_team suite is not run on main tree and
  therefore does not disturb other teams with
  random failures and such.

  mysql-test/mysql-test-run.pl@stripped, 2008-04-20 02:05:16+02:00, hakank@lu0011.(none) +5 -0
    Added falcon_team test suite for failing Falcon related tests.

  mysql-test/suite/falcon/t/disabled.def@stripped, 2008-04-20 02:05:16+02:00, hakank@lu0011.(none) +0 -21
    Clean up.

  mysql-test/suite/falcon_team/r/falcon_bug_22165.result@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22165.result -> mysql-test/suite/falcon_team/r/falcon_bug_22165.result

  mysql-test/suite/falcon_team/r/falcon_bug_22166.result@stripped, 2008-04-20 01:01:14+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22166.result -> mysql-test/suite/falcon_team/r/falcon_bug_22166.result

  mysql-test/suite/falcon_team/r/falcon_bug_22169.result@stripped, 2008-04-20 01:02:06+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22169.result -> mysql-test/suite/falcon_team/r/falcon_bug_22169.result

  mysql-test/suite/falcon_team/r/falcon_bug_22187.result@stripped, 2008-04-20 01:02:47+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22187.result -> mysql-test/suite/falcon_team/r/falcon_bug_22187.result

  mysql-test/suite/falcon_team/r/falcon_bug_22189.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22189.result -> mysql-test/suite/falcon_team/r/falcon_bug_22189.result

  mysql-test/suite/falcon_team/r/falcon_bug_22207.result@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_22207.result -> mysql-test/suite/falcon_team/r/falcon_bug_22207.result

  mysql-test/suite/falcon_team/r/falcon_bug_23692.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_23692.result -> mysql-test/suite/falcon_team/r/falcon_bug_23692.result

  mysql-test/suite/falcon_team/r/falcon_bug_23945.result@stripped, 2008-04-20 01:50:54+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_23945.result -> mysql-test/suite/falcon_team/r/falcon_bug_23945.result

  mysql-test/suite/falcon_team/r/falcon_bug_23962.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_23962.result -> mysql-test/suite/falcon_team/r/falcon_bug_23962.result

  mysql-test/suite/falcon_team/r/falcon_bug_24024.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_24024.result -> mysql-test/suite/falcon_team/r/falcon_bug_24024.result

  mysql-test/suite/falcon_team/r/falcon_bug_26058.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_26058.result -> mysql-test/suite/falcon_team/r/falcon_bug_26058.result

  mysql-test/suite/falcon_team/r/falcon_bug_27997.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_27997.result -> mysql-test/suite/falcon_team/r/falcon_bug_27997.result

  mysql-test/suite/falcon_team/r/falcon_bug_28006.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_28006.result -> mysql-test/suite/falcon_team/r/falcon_bug_28006.result

  mysql-test/suite/falcon_team/r/falcon_bug_29246.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_29246.result -> mysql-test/suite/falcon_team/r/falcon_bug_29246.result

  mysql-test/suite/falcon_team/r/falcon_bug_30282.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_30282.result -> mysql-test/suite/falcon_team/r/falcon_bug_30282.result

  mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_30480_A.result -> mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result

  mysql-test/suite/falcon_team/r/falcon_bug_30480_B.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_30480_B.result -> mysql-test/suite/falcon_team/r/falcon_bug_30480_B.result

  mysql-test/suite/falcon_team/r/falcon_bug_30826.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_30826.result -> mysql-test/suite/falcon_team/r/falcon_bug_30826.result

  mysql-test/suite/falcon_team/r/falcon_bug_32413.result@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_32413.result -> mysql-test/suite/falcon_team/r/falcon_bug_32413.result

  mysql-test/suite/falcon_team/r/falcon_bug_34892.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_bug_34892.result -> mysql-test/suite/falcon_team/r/falcon_bug_34892.result

  mysql-test/suite/falcon_team/r/falcon_deadlock.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/falcon_deadlock.result -> mysql-test/suite/falcon_team/r/falcon_deadlock.result

  mysql-test/suite/falcon_team/r/ps_8falcon.result@stripped, 2008-04-20 01:07:39+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/ps_8falcon.result -> mysql-test/suite/falcon_team/r/ps_8falcon.result

  mysql-test/suite/falcon_team/r/read_many_rows_falcon.result@stripped, 2008-04-20 01:07:41+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/r/read_many_rows_falcon.result -> mysql-test/suite/falcon_team/r/read_many_rows_falcon.result

  mysql-test/suite/falcon_team/t/falcon_bug_22165.test@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22165.test -> mysql-test/suite/falcon_team/t/falcon_bug_22165.test

  mysql-test/suite/falcon_team/t/falcon_bug_22166.test@stripped, 2008-04-20 01:00:51+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22166.test -> mysql-test/suite/falcon_team/t/falcon_bug_22166.test

  mysql-test/suite/falcon_team/t/falcon_bug_22169.test@stripped, 2008-04-20 01:01:57+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22169.test -> mysql-test/suite/falcon_team/t/falcon_bug_22169.test

  mysql-test/suite/falcon_team/t/falcon_bug_22187.test@stripped, 2008-04-20 01:02:34+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22187.test -> mysql-test/suite/falcon_team/t/falcon_bug_22187.test

  mysql-test/suite/falcon_team/t/falcon_bug_22189.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22189.test -> mysql-test/suite/falcon_team/t/falcon_bug_22189.test

  mysql-test/suite/falcon_team/t/falcon_bug_22207.test@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_22207.test -> mysql-test/suite/falcon_team/t/falcon_bug_22207.test

  mysql-test/suite/falcon_team/t/falcon_bug_23692.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_23692.test -> mysql-test/suite/falcon_team/t/falcon_bug_23692.test

  mysql-test/suite/falcon_team/t/falcon_bug_23945.test@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_23945.test -> mysql-test/suite/falcon_team/t/falcon_bug_23945.test

  mysql-test/suite/falcon_team/t/falcon_bug_23962.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_23962.test -> mysql-test/suite/falcon_team/t/falcon_bug_23962.test

  mysql-test/suite/falcon_team/t/falcon_bug_24024.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_24024.test -> mysql-test/suite/falcon_team/t/falcon_bug_24024.test

  mysql-test/suite/falcon_team/t/falcon_bug_26058.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_26058.test -> mysql-test/suite/falcon_team/t/falcon_bug_26058.test

  mysql-test/suite/falcon_team/t/falcon_bug_27997.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_27997.test -> mysql-test/suite/falcon_team/t/falcon_bug_27997.test

  mysql-test/suite/falcon_team/t/falcon_bug_28006.test@stripped, 2008-04-20 01:03:55+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_28006.test -> mysql-test/suite/falcon_team/t/falcon_bug_28006.test

  mysql-test/suite/falcon_team/t/falcon_bug_29246.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_29246.test -> mysql-test/suite/falcon_team/t/falcon_bug_29246.test

  mysql-test/suite/falcon_team/t/falcon_bug_30282.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_30282.test -> mysql-test/suite/falcon_team/t/falcon_bug_30282.test

  mysql-test/suite/falcon_team/t/falcon_bug_30480_A.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_30480_A.test -> mysql-test/suite/falcon_team/t/falcon_bug_30480_A.test

  mysql-test/suite/falcon_team/t/falcon_bug_30480_B.test@stripped, 2008-04-20 01:06:27+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_30480_B.test -> mysql-test/suite/falcon_team/t/falcon_bug_30480_B.test

  mysql-test/suite/falcon_team/t/falcon_bug_30826.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_30826.test -> mysql-test/suite/falcon_team/t/falcon_bug_30826.test

  mysql-test/suite/falcon_team/t/falcon_bug_32413.test@stripped, 2008-04-20 01:50:53+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_32413.test -> mysql-test/suite/falcon_team/t/falcon_bug_32413.test

  mysql-test/suite/falcon_team/t/falcon_bug_34892.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_bug_34892.test -> mysql-test/suite/falcon_team/t/falcon_bug_34892.test

  mysql-test/suite/falcon_team/t/falcon_deadlock.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/falcon_deadlock.test -> mysql-test/suite/falcon_team/t/falcon_deadlock.test

  mysql-test/suite/falcon_team/t/ps_8falcon.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/ps_8falcon.test -> mysql-test/suite/falcon_team/t/ps_8falcon.test

  mysql-test/suite/falcon_team/t/read_many_rows_falcon.test@stripped, 2008-04-20 01:03:56+02:00, hakank@lu0011.(none) +0 -0
    Rename: mysql-test/suite/falcon/t/read_many_rows_falcon.test -> mysql-test/suite/falcon_team/t/read_many_rows_falcon.test

diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2008-03-30 11:47:03 +02:00
+++ b/mysql-test/mysql-test-run.pl	2008-04-20 02:05:16 +02:00
@@ -407,6 +407,11 @@ sub main () {
 	 "mysql-5.1-telco-6.2-merge"      => "ndb_team",
 	 "mysql-5.1-telco-6.3"            => "ndb_team",
 	 "mysql-6.0-ndb"                  => "ndb_team",
+	 "mysql-6.0-falcon"               => "falcon_team",
+	 "mysql-6.0-falcon-team"          => "falcon_team",
+	 "mysql-6.0-falcon-wlad"          => "falcon_team",
+	 "mysql-6.0-falcon-chris"         => "falcon_team",
+	 "mysql-6.0-falcon-kevin"         => "falcon_team",
 	);
 
       foreach my $dir ( reverse splitdir($glob_basedir) )
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22165.result b/mysql-test/suite/falcon/r/falcon_bug_22165.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22165.result	2008-03-01 06:28:36 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,35 +0,0 @@
-*** Bug #22165 ***
-SET @@storage_engine = 'Falcon';
-DROP PROCEDURE IF EXISTS db1.p1;
-DROP EVENT IF EXISTS db1.e1;
-DROP EVENT IF EXISTS db1.e2;
-DROP DATABASE IF EXISTS db1;
-CREATE DATABASE db1;
-USE db1;
-CREATE PROCEDURE p1 ()
-begin
-declare v int default 0;
-declare continue handler for sqlexception
-begin
-declare continue handler for sqlexception begin end;
-ALTER TABLE t1 MODIFY COLUMN c timestamp;
-end;
-SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
-while v < 10 do
-START TRANSACTION;
-INSERT INTO t1 (a, b) VALUES (v, 'a');
-UPDATE t1 SET c = current_timestamp WHERE a = v;
-COMMIT;
-SET v = v + 1;
-end while;
-end//
-CREATE TABLE t1 (a bigint, b varchar(1000), c timestamp);
-CREATE EVENT e1 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
-CREATE EVENT e2 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
-SET GLOBAL event_scheduler = 1;
-SET GLOBAL event_scheduler = 0;
-USE test;
-DROP EVENT db1.e1;
-DROP EVENT db1.e2;
-DROP PROCEDURE db1.p1;
-DROP DATABASE db1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22166.result b/mysql-test/suite/falcon/r/falcon_bug_22166.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22166.result	2008-02-06 16:21:11 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,11 +0,0 @@
-*** Bug #22166 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t;
-DROP TABLE IF EXISTS T;
-CREATE TABLE t(id int);
-CREATE TABLE T(id int);
-SELECT count(*) FROM t;
-count(*)
-0
-DROP TABLE t;
-DROP TABLE T;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22169.result b/mysql-test/suite/falcon/r/falcon_bug_22169.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22169.result	2007-09-20 17:42:57 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,10 +0,0 @@
-SET STORAGE_ENGINE='Falcon';
-*** Bug #22169 ***
-DROP TABLE IF EXISTS t1, t2;
-CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
-SELECT COUNT(*) FROM t1 order by id;
-COUNT(*)
-4181000
-SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
-DROP TABLE t1;
-set @@read_buffer_size=default;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22187.result b/mysql-test/suite/falcon/r/falcon_bug_22187.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22187.result	2007-09-20 17:43:01 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,21 +0,0 @@
-SET STORAGE_ENGINE = Falcon;
-*** Bug #22187 ***
-DROP TABLE IF EXISTS child;
-DROP TABLE IF EXISTS parent;
-CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id));
-CREATE TABLE child (
-id INT, 
-parent_id INT,
-INDEX par_ind (parent_id),
-FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
-);
-SHOW CREATE TABLE child;
-Table	Create Table
-child	CREATE TABLE `child` (
-  `id` int(11) DEFAULT NULL,
-  `parent_id` int(11) DEFAULT NULL,
-  KEY `par_ind` (`parent_id`),
-  CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE CASCADE
-) ENGINE=Falcon DEFAULT CHARSET=latin1
-DROP TABLE child;
-DROP TABLE parent;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22189.result b/mysql-test/suite/falcon/r/falcon_bug_22189.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22189.result	2007-09-20 17:43:01 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,53 +0,0 @@
-SET @@storage_engine = Falcon;
-*** Bug #22189 ***
-DROP DATABASE IF EXISTS db62;
-# Establish connection conn1 (user = root)
-SET @@storage_engine = Falcon;
-# Switch to connection default
-SET @@autocommit = 0;
-CREATE DATABASE db62;
-USE db62;
-DROP TABLE IF EXISTS x1;
-Warnings:
-Note	1051	Unknown table 'x1'
-CREATE TABLE x1 (x1 int primary key, x2 int);
-COMMIT;
-INSERT INTO x1 VALUES (0,0),(1,1);
-COMMIT;
-DROP TABLE IF EXISTS x1;
-CREATE TABLE x1 (x1 int primary key, x2 int);
-SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-START TRANSACTION;
-SELECT * FROM x1;
-x1	x2
-INSERT INTO x1 VALUES (0,0);
-# Switch to connection conn1
-SET @@autocommit = 1;
-USE db62;
-INSERT INTO x1 VALUES (1,1);
-# Switch to connection default
-INSERT INTO x1 VALUES (1,2);
-# Switch to connection conn1
-INSERT INTO x1 VALUES (0,3);
-# Switch to connection default
-ROLLBACK;
-UPDATE x1 SET x1 = 1, x2 = 4;
-SELECT * FROM x1;
-x1	x2
-1	4
-# Switch to connection conn1
-UPDATE x1 SET x1 = 0, x2 = 5;
-INSERT INTO x1 VALUES (0,6);
-# Switch to connection default
-ROLLBACK;
-# Switch to connection conn1
-INSERT INTO x1 VALUES (0,6);
-INSERT INTO x1 VALUES (0,6);
-ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
-# Switch to connection default
-SELECT * FROM x1;
-x1	x2
-0	3
-1	1
-DROP DATABASE db62;
-USE test;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22207.result b/mysql-test/suite/falcon/r/falcon_bug_22207.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22207.result	2007-09-20 17:43:01 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,58 +0,0 @@
-SET STORAGE_ENGINE = 'Falcon';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (c1 varchar(50), c2 int, c3 char(1));
-INSERT INTO t1 VALUES (repeat('A', 50), 0, 'A');
-INSERT INTO t1 VALUES (repeat('B', 50), 0, 'B');
-INSERT INTO t1 VALUES (repeat('C', 50), 0, 'C');
-COMMIT;
-SELECT c1 from t1;
-c1
-5000______AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-5000______BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-5000______CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-10000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-10000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-10000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-15000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-15000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-15000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-20000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-20000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-20000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-25000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-25000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-25000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-30000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-30000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-30000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-35000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-35000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-35000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-40000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-40000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-40000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-45000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-45000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-45000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-SELECT c1 from t1;
-c1
-50000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-50000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-50000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_23692.result b/mysql-test/suite/falcon/r/falcon_bug_23692.result
--- a/mysql-test/suite/falcon/r/falcon_bug_23692.result	2007-09-20 17:43:06 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,78 +0,0 @@
-SET @@storage_engine = Falcon;
-*** Bug #23692 ***
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
-DROP TABLE IF EXISTS t4;
-CREATE TABLE t1 (a char(1), key (a));
-INSERT INTO t1 VALUES (0x00);
-SELECT count(*) FROM t1 WHERE a < '';
-count(*)
-1
-SELECT count(*) FROM t1 WHERE a = '';
-count(*)
-0
-SELECT count(*) FROM t1 WHERE a > '';
-count(*)
-0
-CREATE TABLE t2 (a varbinary(5));
-CREATE INDEX i ON t2 (a);
-INSERT INTO t2 VALUES (0x02), (0x0202);
-SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
-count(*)
-2
-SELECT hex(a) FROM t2 WHERE a < 0x02;
-hex(a)
-SELECT hex(a) FROM t2 WHERE a = 0x02;
-hex(a)
-02
-SELECT hex(a) FROM t2 WHERE a > 0x02;
-hex(a)
-0202
-CREATE TABLE t3 (a char(5));
-CREATE INDEX i ON t3 (a);
-INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
-SELECT hex(a) FROM t3 WHERE a < 0x42;
-hex(a)
-4200
-4209
-SELECT hex(a) FROM t3 WHERE a = 0x42;
-hex(a)
-42
-4220
-SELECT hex(a) FROM t3 WHERE a > 0x42;
-hex(a)
-4242
-SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
-hex(a)
-4200
-4209
-42
-4220
-4242
-CREATE TABLE t4 (s1 varchar(5) character set ucs2, key(s1)) engine=falcon;
-INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
-SELECT hex(a) FROM t4 WHERE a < 'a';
-hex(a)
-00420000
-00420009
-0042001f
-SELECT hex(a) FROM t4 WHERE a = 'a';
-hex(a)
-0042
-00400220
-SELECT hex(a) FROM t4 WHERE a > 'a';
-hex(a)
-00420042
-SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
-hex(a)
-00420000
-00420009
-0042001f
-0042
-00420020
-00420042
-DROP TABLE t1;
-DROP TABLE t2;
-DROP TABLE t3;
-DROP TABLE t4;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_23945.result b/mysql-test/suite/falcon/r/falcon_bug_23945.result
--- a/mysql-test/suite/falcon/r/falcon_bug_23945.result	2007-09-20 17:43:07 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,17 +0,0 @@
-*** Bug #23945 ***
-SET STORAGE_ENGINE = Falcon;
-DROP TABLE IF EXISTS t1;
-SET AUTOCOMMIT = 1;
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-SELECT * FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
-SET AUTOCOMMIT = 0;
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-SELECT * FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_23962.result b/mysql-test/suite/falcon/r/falcon_bug_23962.result
--- a/mysql-test/suite/falcon/r/falcon_bug_23962.result	2007-09-20 17:43:07 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,17 +0,0 @@
-SET STORAGE_ENGINE = Falcon;
-*** Bug #23962 ***
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a char(5), KEY (a));
-INSERT INTO t1 VALUES ('a'), ('aa'), ('aaa'), ('abc'), ('bbb');
-SELECT * FROM t1 WHERE a > 'a'  ORDER BY a;
-a
-aa
-aaa
-abc
-bbb
-SELECT * FROM t1 WHERE a > 'aa' ORDER BY a;
-a
-aaa
-abc
-bbb
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_24024.result b/mysql-test/suite/falcon/r/falcon_bug_24024.result
--- a/mysql-test/suite/falcon/r/falcon_bug_24024.result	2007-09-20 17:43:07 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,23 +0,0 @@
-*** Bug #24024 ***
-SET SESSION STORAGE_ENGINE = Falcon;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1(a INT NOT NULL, b INT, primary key(a));
-INSERT INTO t1(a) VALUES (1);
-COMMIT;
-SET AUTOCOMMIT = 0;
-UPDATE t1 SET b = 5 WHERE a = 1;
-# Establish session con1 (user=root)
-INSERT INTO t1(a) VALUES(7);
-COMMIT;
-SELECT * FROM t1;
-a	b
-1	NULL
-7	NULL
-DROP TABLE t1;
-!!! Error message has to be decided.
-!!! Something like "Cannot drop locked table" or similar would be fine.
-!!! But never the misleading    ERROR 42S02: Unknown table 't1'
-COMMIT;
-# Switch to session default and disconnect session con1
-COMMIT;
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_26058.result b/mysql-test/suite/falcon/r/falcon_bug_26058.result
--- a/mysql-test/suite/falcon/r/falcon_bug_26058.result	2007-09-20 17:43:08 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,13 +0,0 @@
-*** Bug #26058 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-SET NAMES utf8;
-CREATE TABLE t1 (a varchar(5) character set ujis);
-INSERT INTO t1 values ('¥'),('‾');
-SELECT count(*) FROM t1 WHERE a IS NOT NULL;
-count(*)
-2
-SELECT count(*) FROM t1;
-count(*)
-2
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_27997.result b/mysql-test/suite/falcon/r/falcon_bug_27997.result
--- a/mysql-test/suite/falcon/r/falcon_bug_27997.result	2007-09-20 17:43:11 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,31 +0,0 @@
-*** Bug #27997 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-SET @@autocommit = 0;
-CREATE TABLE t1 (a int, b int);
-CREATE UNIQUE INDEX i1 on t1 (a, b);
-INSERT INTO t1 VALUES (5, NULL), (5, NULL);
-COMMIT;
-SELECT * FROM t1 FOR UPDATE;
-a	b
-5	NULL
-5	NULL
-UPDATE t1 SET b = 2;
-ERROR 23000: Duplicate entry '5-2' for key 'i1'
-COMMIT;
-UPDATE t1 SET b = 2;
-ERROR 23000: Duplicate entry '5-2' for key 'i1'
-COMMIT;
-UPDATE t1 SET a = 3, b = 2 WHERE a = 5 LIMIT 1;
-COMMIT;
-SELECT count(*) FROM t1;
-count(*)
-2
-SELECT count(*) FROM t1 WHERE a = 5;
-count(*)
-1
-SELECT count(*) FROM t1 WHERE a = 3;
-count(*)
-1
-COMMIT;
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_28006.result b/mysql-test/suite/falcon/r/falcon_bug_28006.result
--- a/mysql-test/suite/falcon/r/falcon_bug_28006.result	2007-09-20 17:43:11 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,33 +0,0 @@
-*** Bug #28006 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-SET @@tx_isolation = 'REPEATABLE-READ';
-SET @@autocommit = 0;
-CREATE TABLE t1 (a int);
-INSERT INTO t1 VALUES (1);
-COMMIT;
-# Establish connection conn1
-SET storage_engine = 'Falcon';
-SET @@tx_isolation = 'REPEATABLE-READ';
-SET @@autocommit = 0;
-# Switch to connection default
-BEGIN;
-SELECT * FROM t1;
-a
-1
-# Switch to connection conn1
-ALTER TABLE t1 ADD COLUMN b int;
-ALTER TABLE t1 DROP COLUMN a;
-# Switch to connection default
-SELECT * FROM t1;
-a
-1
-COMMIT;
-SELECT count(*) FROM t1;
-count(*)
-1
-COMMIT;
-# Switch to connection conn1
-COMMIT;
-# Switch to connection default
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_29246.result b/mysql-test/suite/falcon/r/falcon_bug_29246.result
--- a/mysql-test/suite/falcon/r/falcon_bug_29246.result	2007-09-20 17:43:16 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,13 +0,0 @@
-*** Bug #29246 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a varchar(2) CHARACTER SET latin1 COLLATE latin1_german2_ci);
-INSERT INTO t1 VALUES (0xdc);
-CREATE INDEX i1 ON t1 (a(1));
-SELECT count(*) FROM t1 WHERE a = 'ue';
-count(*)
-1
-SELECT count(*) FROM t1;
-count(*)
-1
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_30282.result b/mysql-test/suite/falcon/r/falcon_bug_30282.result
--- a/mysql-test/suite/falcon/r/falcon_bug_30282.result	2007-09-20 17:43:17 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,17 +0,0 @@
-*** Bug #30282 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a char(1));
-INSERT INTO t1 VALUES (0x00);
-INSERT INTO t1 VALUES (0x20);
-SELECT hex(a) FROM t1 WHERE a = 0x00;
-hex(a)
-00
-SELECT hex(a) FROM t1 WHERE a = 0x20;
-hex(a)
-
-CREATE UNIQUE INDEX i1 ON t1 (a);
-SELECT count(*) FROM t1;
-count(*)
-2
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_30480_A.result b/mysql-test/suite/falcon/r/falcon_bug_30480_A.result
--- a/mysql-test/suite/falcon/r/falcon_bug_30480_A.result	2007-09-20 17:43:17 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,28 +0,0 @@
-SET storage_engine = Falcon;
-*** Bug #30480 ***
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1);
-SET NAMES utf8;
-CREATE INDEX id on t1 (s1);
-INSERT INTO t1 VALUES (0x8e);
-INSERT INTO t1 VALUES ('AA');
-SELECT s1, HEX(s1) FROM t1;
-s1	HEX(s1)
-Ž	8E
-AA	4141
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1) partition by key(s1);
-SET NAMES utf8;
-CREATE INDEX id on t2 (s1);
-INSERT INTO t2 VALUES (0x8e);
-INSERT INTO t2 VALUES ('AA');
-SELECT s1, HEX(s1) FROM t2;
-s1	HEX(s1)
-Ž	8E
-AA	4141
-SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'A%';
-s1	HEX(s1)
-AA	4141
-SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'A%';
-s1	HEX(s1)
-AA	4141
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_30480_B.result b/mysql-test/suite/falcon/r/falcon_bug_30480_B.result
--- a/mysql-test/suite/falcon/r/falcon_bug_30480_B.result	2007-09-20 17:43:17 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,36 +0,0 @@
-SET storage_engine = Falcon;
-*** Bug #30480 ***
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET ucs2);
-CREATE INDEX i1 on t1 (s1);
-INSERT INTO t1 VALUES ('c'),('c'),(0x00c3);
-SET NAMES utf8;
-SELECT s1, HEX(s1) FROM t1;
-s1	HEX(s1)
-c	0063
-c	0063
-Ã	00C3
-SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'Ã%';
-s1	HEX(s1)
-Ã	00C3
-SELECT s1, HEX(s1) FROM t1 WHERE s1 = 'Ã';
-s1	HEX(s1)
-Ã	00C3
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET ucs2) partition by key(s1);
-CREATE INDEX i1 on t2 (s1);
-INSERT INTO t2 VALUES ('c'),('c'),(0x00c3);
-SET NAMES utf8;
-SELECT s1, HEX(s1) FROM t2;
-s1	HEX(s1)
-c	0063
-c	0063
-Ã	00C3
-SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'Ã%';
-s1	HEX(s1)
-Ã	00C3
-SELECT s1, HEX(s1) FROM t2 WHERE s1 = 'Ã';
-s1	HEX(s1)
-Ã	00C3
-DROP TABLE t1;
-DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_30826.result b/mysql-test/suite/falcon/r/falcon_bug_30826.result
--- a/mysql-test/suite/falcon/r/falcon_bug_30826.result	2007-09-20 17:43:17 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,20 +0,0 @@
-*** Bug #30826 ***
-SET @@storage_engine = Falcon;
-DROP TABLE IF EXISTS t1;
-------- Test 1 - optimize with records  -------
-CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
-`id` BIGINT NOT NULL  AUTO_INCREMENT ,
-`field1` CHAR(50) NOT NULL)ENGINE = FALCON
-PARTITION BY Hash (id) PARTITIONS 4;
-INSERT INTO t1 (`id`, `field1`) VALUES('3','value3');
-INSERT INTO t1 (`id`, `field1`) VALUES('5','value5');
-INSERT INTO t1 (`id`, `field1`) VALUES('7','value7');
-ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
-------- Test 2 - optimize without records ------
-DROP TABLE t1;
-CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
-`id` BIGINT NOT NULL  AUTO_INCREMENT ,
-`field1` CHAR(50) NOT NULL)ENGINE = FALCON
-PARTITION BY Hash (id) PARTITIONS 4;
-ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_32413.result b/mysql-test/suite/falcon/r/falcon_bug_32413.result
--- a/mysql-test/suite/falcon/r/falcon_bug_32413.result	2008-02-01 15:12:02 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,70 +0,0 @@
-*** Bug #32413 ***
-SET @@storage_engine = 'Falcon';
-SELECT @@GLOBAL.falcon_record_memory_max INTO @previous_falcon_record_memory_max;
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-SET GLOBAL falcon_record_memory_max = 16 * 1024 * 1024;
-CREATE TABLE t1 (
-a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
-b INT,
-c VARCHAR(200),
-d VARCHAR(1000),
-INDEX (b,c),
-INDEX (d)
-);
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-ERROR HY000: Got error 305 'record memory is exhausted' from Falcon
-SET GLOBAL falcon_record_memory_max = 128 * 1024 * 1024;
-CREATE TABLE t2 (
-a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
-b INT,
-c VARCHAR(200),
-d VARCHAR(1000),
-INDEX (b,c),
-INDEX (d)
-);
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-SELECT count(*) from t1;
-count(*)
-65536
-SELECT count(*) from t2;
-count(*)
-262144
-DROP TABLE t1;
-DROP TABLE t2;
-SET GLOBAL falcon_record_memory_max = @previous_falcon_record_memory_max;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34892.result b/mysql-test/suite/falcon/r/falcon_bug_34892.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34892.result	2008-03-06 18:31:20 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,8 +0,0 @@
-*** Bug #34892 ***
-SET @@storage_engine = 'Falcon';
-DROP TABLE IF EXISTS t1;
-SET @@autocommit = 0;
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
-ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-CREATE TABLE t1 (a int);
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_deadlock.result b/mysql-test/suite/falcon/r/falcon_deadlock.result
--- a/mysql-test/suite/falcon/r/falcon_deadlock.result	2008-01-31 01:07:50 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,130 +0,0 @@
-# Establish connection con1 (user=root)
-# Establish connection con2 (user=root)
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-# Switch to connection con1
-CREATE TABLE t1 (
-id integer,
-x integer
-);
-INSERT INTO t1 VALUES (0, 0);
-SET @@autocommit = 0;
-SELECT * FROM t1 WHERE id = 0 FOR UPDATE;
-id	x
-0	0
-# Switch to connection con2
-SET @@autocommit = 0;
-UPDATE t1 SET x = 2 WHERE id = 0;
-# Switch to connection con1
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-id	x
-0	1
-COMMIT;
-# Switch to connection con2
-COMMIT;
-# Switch to connection con1
-SELECT * FROM t1;
-id	x
-0	2
-COMMIT;
-DROP TABLE t1;
-# Switch to connection con1
-CREATE TABLE t1 (
-id integer,
-x integer
-);
-CREATE TABLE t2 (
-b integer,
-a integer
-);
-INSERT INTO t1 VALUES (0, 0), (300, 300);
-INSERT INTO t2 VALUES (0, 10), (1, 20), (2, 30);
-COMMIT;
-SELECT * FROM t2;
-b	a
-0	10
-1	20
-2	30
-UPDATE t2 SET a = 100 WHERE b = (SELECT x FROM t1 WHERE id = b FOR UPDATE);
-SELECT * FROM t2;
-b	a
-0	100
-1	20
-2	30
-SELECT * FROM t1;
-id	x
-0	0
-300	300
-# Switch to connection con2
-UPDATE t1 SET x = 2 WHERE id = 0;
-# Switch to connection con1
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-id	x
-0	1
-300	300
-COMMIT;
-# Switch to connection con2
-COMMIT;
-# Switch to connection con1
-SELECT * FROM t1;
-id	x
-0	2
-300	300
-COMMIT;
-DROP TABLE t1;
-DROP TABLE t2;
-CREATE TABLE t1 (
-id integer,
-x integer
-);
-CREATE TABLE t2 (
-b integer,
-a integer
-);
-INSERT INTO t1 VALUES (0, 0), (300, 300);
-INSERT INTO t2 VALUES (0, 0), (1, 20), (2, 30);
-COMMIT;
-# Switch to connection con1
-SELECT a, b FROM t2 UNION SELECT id, x FROM t1 FOR UPDATE;
-a	b
-0	0
-20	1
-30	2
-300	300
-SELECT * FROM t2;
-b	a
-0	0
-1	20
-2	30
-SELECT * FROM t1;
-id	x
-0	0
-300	300
-# Switch to connection con2
-UPDATE t2 SET a = 2 WHERE b = 0;
-SELECT * FROM t2;
-b	a
-0	2
-1	20
-2	30
-UPDATE t1 SET x = 2 WHERE id = 0;
-# Switch to connection con1
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-id	x
-0	1
-300	300
-COMMIT;
-# Switch to connection con2
-COMMIT;
-# Switch to connection con1
-SELECT * FROM t1;
-id	x
-0	2
-300	300
-COMMIT;
-# Switch to connection default + disconnect con1 and con2
-DROP TABLE t1;
-DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/r/ps_8falcon.result b/mysql-test/suite/falcon/r/ps_8falcon.result
--- a/mysql-test/suite/falcon/r/ps_8falcon.result	2007-11-27 17:07:28 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,3128 +0,0 @@
-use test;
-drop table if exists t1, t9 ;
-create table t1
-(
-a int, b varchar(30),
-primary key(a)
-) engine = 'Falcon'  ;
-create table t9 
-(
-c1  tinyint, c2  smallint, c3  mediumint, c4  int,
-c5  integer, c6  bigint, c7  float, c8  double,
-c9  double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
-c13 date, c14 datetime, c15 timestamp, c16 time,
-c17 year, c18 tinyint, c19 bool, c20 char,
-c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
-c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
-c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
-c32 set('monday', 'tuesday', 'wednesday'),
-primary key(c1)
-) engine = 'Falcon'  ;
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-test_sequence
------- simple select tests ------
-prepare stmt1 from ' select * from t9 order by c1 ' ;
-execute stmt1;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def	test	t9	t9	c1	c1	1	4	1	N	49155	0	63
-def	test	t9	t9	c2	c2	2	6	1	Y	32768	0	63
-def	test	t9	t9	c3	c3	9	9	1	Y	32768	0	63
-def	test	t9	t9	c4	c4	3	11	1	Y	32768	0	63
-def	test	t9	t9	c5	c5	3	11	1	Y	32768	0	63
-def	test	t9	t9	c6	c6	8	20	1	Y	32768	0	63
-def	test	t9	t9	c7	c7	4	12	1	Y	32768	31	63
-def	test	t9	t9	c8	c8	5	22	1	Y	32768	31	63
-def	test	t9	t9	c9	c9	5	22	1	Y	32768	31	63
-def	test	t9	t9	c10	c10	5	22	1	Y	32768	31	63
-def	test	t9	t9	c11	c11	246	9	6	Y	0	4	63
-def	test	t9	t9	c12	c12	246	10	6	Y	0	4	63
-def	test	t9	t9	c13	c13	10	10	10	Y	128	0	63
-def	test	t9	t9	c14	c14	12	19	19	Y	128	0	63
-def	test	t9	t9	c15	c15	7	19	19	N	9441	0	63
-def	test	t9	t9	c16	c16	11	8	8	Y	128	0	63
-def	test	t9	t9	c17	c17	13	4	4	Y	32864	0	63
-def	test	t9	t9	c18	c18	1	4	1	Y	32768	0	63
-def	test	t9	t9	c19	c19	1	1	1	Y	32768	0	63
-def	test	t9	t9	c20	c20	254	1	1	Y	0	0	8
-def	test	t9	t9	c21	c21	254	10	10	Y	0	0	8
-def	test	t9	t9	c22	c22	253	30	30	Y	0	0	8
-def	test	t9	t9	c23	c23	252	255	8	Y	144	0	63
-def	test	t9	t9	c24	c24	252	255	8	Y	16	0	8
-def	test	t9	t9	c25	c25	252	65535	4	Y	144	0	63
-def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
-def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
-def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
-def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
-def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
-def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
-def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
-c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-9	9	9	9	9	9	9	9	9	9	9.0000	9.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	0	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	two	tuesday
-set @arg00='SELECT' ;
-@arg00 a from t1 where a=1;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1
-prepare stmt1 from ' ? a from t1 where a=1 ';
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1
-set @arg00=1 ;
-select @arg00, b from t1 where a=1 ;
-@arg00	b
-1	one
-prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-?	b
-1	one
-set @arg00='lion' ;
-select @arg00, b from t1 where a=1 ;
-@arg00	b
-lion	one
-prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-?	b
-lion	one
-set @arg00=NULL ;
-select @arg00, b from t1 where a=1 ;
-@arg00	b
-NULL	one
-prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-?	b
-NULL	one
-set @arg00=1 ;
-select b, a - @arg00 from t1 where a=1 ;
-b	a - @arg00
-one	0
-prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-b	a - ?
-one	0
-set @arg00=null ;
-select @arg00 as my_col ;
-my_col
-NULL
-prepare stmt1 from ' select ? as my_col';
-execute stmt1 using @arg00 ;
-my_col
-NULL
-select @arg00 + 1 as my_col ;
-my_col
-NULL
-prepare stmt1 from ' select ? + 1 as my_col';
-execute stmt1 using @arg00 ;
-my_col
-NULL
-select 1 + @arg00 as my_col ;
-my_col
-NULL
-prepare stmt1 from ' select 1 + ? as my_col';
-execute stmt1 using @arg00 ;
-my_col
-NULL
-set @arg00='MySQL' ;
-select substr(@arg00,1,2) from t1 where a=1 ;
-substr(@arg00,1,2)
-My
-prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-substr(?,1,2)
-My
-set @arg00=3 ;
-select substr('MySQL',@arg00,5) from t1 where a=1 ;
-substr('MySQL',@arg00,5)
-SQL
-prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-substr('MySQL',?,5)
-SQL
-select substr('MySQL',1,@arg00) from t1 where a=1 ;
-substr('MySQL',1,@arg00)
-MyS
-prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ;
-execute stmt1 using @arg00 ;
-substr('MySQL',1,?)
-MyS
-set @arg00='MySQL' ;
-select a , concat(@arg00,b) from t1 order by a;
-a	concat(@arg00,b)
-1	MySQLone
-2	MySQLtwo
-3	MySQLthree
-4	MySQLfour
-prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ;
-execute stmt1 using @arg00;
-a	concat(?,b)
-1	MySQLone
-2	MySQLtwo
-3	MySQLthree
-4	MySQLfour
-select a , concat(b,@arg00) from t1 order by a ;
-a	concat(b,@arg00)
-1	oneMySQL
-2	twoMySQL
-3	threeMySQL
-4	fourMySQL
-prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ;
-execute stmt1 using @arg00;
-a	concat(b,?)
-1	oneMySQL
-2	twoMySQL
-3	threeMySQL
-4	fourMySQL
-set @arg00='MySQL' ;
-select group_concat(@arg00,b order by a) from t1 
-group by 'a' ;
-group_concat(@arg00,b order by a)
-MySQLone,MySQLtwo,MySQLthree,MySQLfour
-prepare stmt1 from ' select group_concat(?,b order by a) from t1
-group by ''a'' ' ;
-execute stmt1 using @arg00;
-group_concat(?,b order by a)
-MySQLone,MySQLtwo,MySQLthree,MySQLfour
-select group_concat(b,@arg00 order by a) from t1 
-group by 'a' ;
-group_concat(b,@arg00 order by a)
-oneMySQL,twoMySQL,threeMySQL,fourMySQL
-prepare stmt1 from ' select group_concat(b,? order by a) from t1
-group by ''a'' ' ;
-execute stmt1 using @arg00;
-group_concat(b,? order by a)
-oneMySQL,twoMySQL,threeMySQL,fourMySQL
-set @arg00='first' ;
-set @arg01='second' ;
-set @arg02=NULL;
-select @arg00, @arg01 from t1 where a=1 ;
-@arg00	@arg01
-first	second
-prepare stmt1 from ' select ?, ? from t1 where a=1 ' ;
-execute stmt1 using @arg00, @arg01 ;
-?	?
-first	second
-execute stmt1 using @arg02, @arg01 ;
-?	?
-NULL	second
-execute stmt1 using @arg00, @arg02 ;
-?	?
-first	NULL
-execute stmt1 using @arg02, @arg02 ;
-?	?
-NULL	NULL
-drop table if exists t5 ;
-create table t5 (id1 int(11) not null default '0',
-value2 varchar(100), value1 varchar(100)) ;
-insert into t5 values (1,'hh','hh'),(2,'hh','hh'),
-(1,'ii','ii'),(2,'ii','ii') ;
-prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ;
-set @arg00=1 ;
-set @arg01='hh' ;
-execute stmt1 using @arg00, @arg01 ;
-id1	value1
-1	hh
-1	ii
-2	hh
-drop table t5 ;
-drop table if exists t5 ;
-create table t5(session_id  char(9) not null) ;
-insert into t5 values ('abc') ;
-prepare stmt1 from ' select * from t5
-where ?=''1111'' and session_id = ''abc'' ' ;
-set @arg00='abc' ;
-execute stmt1 using @arg00 ;
-session_id
-set @arg00='1111' ;
-execute stmt1 using @arg00 ;
-session_id
-abc
-set @arg00='abc' ;
-execute stmt1 using @arg00 ;
-session_id
-drop table t5 ;
-set @arg00='FROM' ;
-select a @arg00 t1 where a=1 ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1
-prepare stmt1 from ' select a ? t1 where a=1 ' ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1
-set @arg00='t1' ;
-select a from @arg00 where a=1 ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1
-prepare stmt1 from ' select a from ? where a=1 ' ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1
-set @arg00='WHERE' ;
-select a from t1 @arg00 a=1 ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1
-prepare stmt1 from ' select a from t1 ? a=1 ' ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1
-set @arg00=1 ;
-select a FROM t1 where a=@arg00 ;
-a
-1
-prepare stmt1 from ' select a FROM t1 where a=? ' ;
-execute stmt1 using @arg00 ;
-a
-1
-set @arg00=1000 ;
-execute stmt1 using @arg00 ;
-a
-set @arg00=NULL ;
-select a FROM t1 where a=@arg00 ;
-a
-prepare stmt1 from ' select a FROM t1 where a=? ' ;
-execute stmt1 using @arg00 ;
-a
-set @arg00=4 ;
-select a FROM t1 where a=sqrt(@arg00) ;
-a
-2
-prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ;
-execute stmt1 using @arg00 ;
-a
-2
-set @arg00=NULL ;
-select a FROM t1 where a=sqrt(@arg00) ;
-a
-prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ;
-execute stmt1 using @arg00 ;
-a
-set @arg00=2 ;
-set @arg01=3 ;
-select a FROM t1 where a in (@arg00,@arg01) order by a;
-a
-2
-3
-prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a ';
-execute stmt1 using @arg00, @arg01;
-a
-2
-3
-set @arg00= 'one' ;
-set @arg01= 'two' ;
-set @arg02= 'five' ;
-prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
-execute stmt1 using @arg00, @arg01, @arg02 ;
-b
-one
-two
-prepare stmt1 from ' select b FROM t1 where b like ? ';
-set @arg00='two' ;
-execute stmt1 using @arg00 ;
-b
-two
-set @arg00='tw%' ;
-execute stmt1 using @arg00 ;
-b
-two
-set @arg00='%wo' ;
-execute stmt1 using @arg00 ;
-b
-two
-set @arg00=null ;
-insert into t9 set c1= 0, c5 = NULL ;
-select c5 from t9 where c5 > NULL ;
-c5
-prepare stmt1 from ' select c5 from t9 where c5 > ? ';
-execute stmt1 using @arg00 ;
-c5
-select c5 from t9 where c5 < NULL ;
-c5
-prepare stmt1 from ' select c5 from t9 where c5 < ? ';
-execute stmt1 using @arg00 ;
-c5
-select c5 from t9 where c5 = NULL ;
-c5
-prepare stmt1 from ' select c5 from t9 where c5 = ? ';
-execute stmt1 using @arg00 ;
-c5
-select c5 from t9 where c5 <=> NULL ;
-c5
-NULL
-prepare stmt1 from ' select c5 from t9 where c5 <=> ? ';
-execute stmt1 using @arg00 ;
-c5
-NULL
-delete from t9 where c1= 0 ;
-set @arg00='>' ;
-select a FROM t1 where a @arg00 1 ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1
-prepare stmt1 from ' select a FROM t1 where a ? 1 ' ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1
-set @arg00=1 ;
-select a,b FROM t1 where a is not NULL
-AND b is not NULL group by a - @arg00 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-prepare stmt1 from ' select a,b FROM t1 where a is not NULL
-AND b is not NULL group by a - ? ' ;
-execute stmt1 using @arg00 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-set @arg00='two' ;
-select a,b FROM t1 where a is not NULL
-AND b is not NULL having b <> @arg00 order by a ;
-a	b
-1	one
-3	three
-4	four
-prepare stmt1 from ' select a,b FROM t1 where a is not NULL
-AND b is not NULL having b <> ? order by a ' ;
-execute stmt1 using @arg00 ;
-a	b
-1	one
-3	three
-4	four
-set @arg00=1 ;
-select a,b FROM t1 where a is not NULL
-AND b is not NULL order by a - @arg00 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-prepare stmt1 from ' select a,b FROM t1 where a is not NULL
-AND b is not NULL order by a - ? ' ;
-execute stmt1 using @arg00 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-set @arg00=2 ;
-select a,b from t1 order by 2 ;
-a	b
-4	four
-1	one
-3	three
-2	two
-prepare stmt1 from ' select a,b from t1
-order by ? ';
-execute stmt1 using @arg00;
-a	b
-4	four
-1	one
-3	three
-2	two
-set @arg00=1 ;
-execute stmt1 using @arg00;
-a	b
-1	one
-2	two
-3	three
-4	four
-set @arg00=0 ;
-execute stmt1 using @arg00;
-ERROR 42S22: Unknown column '?' in 'order clause'
-set @arg00=1;
-prepare stmt1 from ' select a,b from t1 order by a
-limit 1 ';
-execute stmt1 ;
-a	b
-1	one
-prepare stmt1 from ' select a,b from t1 order by a limit ? ';
-execute stmt1 using @arg00;
-a	b
-1	one
-set @arg00='b' ;
-set @arg01=0 ;
-set @arg02=2 ;
-set @arg03=2 ;
-select sum(a), @arg00 from t1 where a > @arg01
-and b is not null group by substr(b,@arg02)
-having sum(a) <> @arg03 ;
-sum(a)	@arg00
-3	b
-1	b
-4	b
-prepare stmt1 from ' select sum(a), ? from t1 where a > ?
-and b is not null group by substr(b,?)
-having sum(a) <> ? ';
-execute stmt1 using @arg00, @arg01, @arg02, @arg03;
-sum(a)	?
-3	b
-1	b
-4	b
-test_sequence
------- join tests ------
-select first.a as a1, second.a as a2 
-from t1 first, t1 second
-where first.a = second.a order by a1 ;
-a1	a2
-1	1
-2	2
-3	3
-4	4
-prepare stmt1 from ' select first.a as a1, second.a as a2 
-        from t1 first, t1 second
-        where first.a = second.a order by a1 ';
-execute stmt1 ;
-a1	a2
-1	1
-2	2
-3	3
-4	4
-set @arg00='ABC';
-set @arg01='two';
-set @arg02='one';
-select first.a, @arg00, second.a FROM t1 first, t1 second
-where @arg01 = first.b or first.a = second.a or second.b = @arg02
-order by second.a, first.a;
-a	@arg00	a
-1	ABC	1
-2	ABC	1
-3	ABC	1
-4	ABC	1
-2	ABC	2
-2	ABC	3
-3	ABC	3
-2	ABC	4
-4	ABC	4
-prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
-                    where ? = first.b or first.a = second.a or second.b = ?
-                    order by second.a, first.a';
-execute stmt1 using @arg00, @arg01, @arg02;
-a	?	a
-1	ABC	1
-2	ABC	1
-3	ABC	1
-4	ABC	1
-2	ABC	2
-2	ABC	3
-3	ABC	3
-2	ABC	4
-4	ABC	4
-drop table if exists t2 ;
-create table t2 as select * from t1 ;
-set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
-set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
-set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
-the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
-prepare stmt1 from @query9  ;
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
-prepare stmt1 from @query8 ;
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-the join statement is:
-SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
-prepare stmt1 from @query7 ;
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
-prepare stmt1 from @query6 ;
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
-prepare stmt1 from @query5 ;
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-the join statement is:
-SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
-prepare stmt1 from @query4 ;
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
-prepare stmt1 from @query3 ;
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-execute stmt1 ;
-a	b	b
-1	one	one
-2	two	two
-3	three	three
-4	four	four
-the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
-prepare stmt1 from @query2 ;
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-the join statement is:
-SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a 
-prepare stmt1 from @query1 ;
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-drop table t2 ;
-test_sequence
------- subquery tests ------
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where b = ''two'') ';
-execute stmt1 ;
-a	b
-2	two
-set @arg00='two' ;
-select a, b FROM t1 outer_table where
-a = (select a from t1 where b = 'two' ) and b=@arg00 ;
-a	b
-2	two
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where b = ''two'') and b=? ';
-execute stmt1 using @arg00;
-a	b
-2	two
-set @arg00='two' ;
-select a, b FROM t1 outer_table where
-a = (select a from t1 where b = @arg00 ) and b='two' ;
-a	b
-2	two
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where b = ? ) and b=''two'' ' ;
-execute stmt1 using @arg00;
-a	b
-2	two
-set @arg00=3 ;
-set @arg01='three' ;
-select a,b FROM t1 where (a,b) in (select 3, 'three');
-a	b
-3	three
-select a FROM t1 where (a,b) in (select @arg00,@arg01);
-a
-3
-prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) ';
-execute stmt1 using @arg00, @arg01;
-a
-3
-set @arg00=1 ;
-set @arg01='two' ;
-set @arg02=2 ;
-set @arg03='two' ;
-select a, @arg00, b FROM t1 outer_table where
-b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ;
-a	@arg00	b
-2	1	two
-prepare stmt1 from ' select a, ?, b FROM t1 outer_table where
-   b=? and a = (select ? from t1 where b = ? ) ' ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
-a	?	b
-2	1	two
-prepare stmt1 from 'select c4 FROM t9 where
-    c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ;
-execute stmt1 using @arg01, @arg02;
-c4
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where b = outer_table.b ) order by a ';
-execute stmt1 ;
-a	b
-1	one
-2	two
-3	three
-4	four
-prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
-                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
-execute stmt1 ;
-ccc
-1
-deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
-                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
-execute stmt1 ;
-ccc
-1
-deallocate prepare stmt1 ;
-prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
-                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
-execute stmt1 ;
-ccc
-1
-deallocate prepare stmt1 ;
-set @arg00='two' ;
-select a, b FROM t1 outer_table where
-a = (select a from t1 where b = outer_table.b ) and b=@arg00 ;
-a	b
-2	two
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where b = outer_table.b) and b=? ';
-execute stmt1 using @arg00;
-a	b
-2	two
-set @arg00=2 ;
-select a, b FROM t1 outer_table where
-a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ;
-a	b
-2	two
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ;
-execute stmt1 using @arg00;
-a	b
-2	two
-set @arg00=2 ;
-select a, b FROM t1 outer_table where
-a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ;
-a	b
-2	two
-prepare stmt1 from ' select a, b FROM t1 outer_table where
-   a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ;
-execute stmt1 using @arg00;
-a	b
-2	two
-set @arg00=1 ;
-set @arg01='two' ;
-set @arg02=2 ;
-set @arg03='two' ;
-select a, @arg00, b FROM t1 outer_table where
-b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03
-and outer_table.a=a ) ;
-a	@arg00	b
-2	1	two
-prepare stmt1 from ' select a, ?, b FROM t1 outer_table where
-   b=? and a = (select ? from t1 where outer_table.b = ? 
-                   and outer_table.a=a ) ' ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
-a	?	b
-2	1	two
-set @arg00=1 ;
-set @arg01=0 ;
-select a, @arg00 
-from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2
-where a=@arg01;
-a	@arg00
-0	1
-prepare stmt1 from ' select a, ? 
-                    from ( select a - ? as a from t1 where a=? ) as t2
-                    where a=? ';
-execute stmt1 using @arg00, @arg00, @arg00, @arg01 ;
-a	?
-0	1
-drop table if exists t2 ;
-create table t2 as select * from t1;
-prepare stmt1 from ' select a in (select a from t2) from t1 ' ;
-execute stmt1 ;
-a in (select a from t2)
-1
-1
-1
-1
-drop table if exists t5, t6, t7 ;
-create table t5 (a int , b int) ;
-create table t6 like t5 ;
-create table t7 like t5 ;
-insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7),
-(2, -1), (3, 10) ;
-insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ;
-insert into t7 values (3, 3), (2, 2), (1, 1) ;
-prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6
-                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
-                     group by t5.a order by sum limit 1) from t7 ' ;
-execute stmt1 ;
-a	(select count(distinct t5.b) as sum from t5, t6
-                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
-                     group by t5.a order by sum limit 1)
-3	1
-2	2
-1	2
-execute stmt1 ;
-a	(select count(distinct t5.b) as sum from t5, t6
-                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
-                     group by t5.a order by sum limit 1)
-3	1
-2	2
-1	2
-execute stmt1 ;
-a	(select count(distinct t5.b) as sum from t5, t6
-                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
-                     group by t5.a order by sum limit 1)
-3	1
-2	2
-1	2
-drop table t5, t6, t7 ;
-drop table if exists t2 ;
-create table t2 as select * from t9;
-set @stmt= ' SELECT
-   (SELECT SUM(c1 + c12 + 0.0) FROM t2 
-    where (t9.c2 - 0e-3) = t2.c2
-    GROUP BY t9.c15 LIMIT 1) as scalar_s,
-   exists (select 1.0e+0 from t2 
-           where t2.c3 * 9.0000000000 = t9.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 t9,
-(select c25 x, c32 y from t2) tt WHERE x = c25 ' ;
-prepare stmt1 from @stmt ;
-execute stmt1 ;
-execute stmt1 ;
-set @stmt= concat('explain ',@stmt);
-prepare stmt1 from @stmt ;
-execute stmt1 ;
-execute stmt1 ;
-set @stmt= ' SELECT
-   (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2
-    GROUP BY t9.c15 LIMIT 1) as scalar_s,
-   exists (select ? from t2 
-           where t2.c3*?=t9.c4) as exists_s,
-   c5*? in (select c6+? from t2) as in_s,
-   (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s
-FROM t9,
-(select c25 x, c32 y from t2) tt WHERE x =c25 ' ;
-set @arg00= 0.0 ;
-set @arg01= 0e-3 ;
-set @arg02= 1.0e+0 ;
-set @arg03= 9.0000000000 ;
-set @arg04= 4 ;
-set @arg05= 0.3e+1 ;
-set @arg06= 4 ;
-set @arg07= 4 ;
-set @arg08= 4.0 ;
-set @arg09= 40e-1 ;
-prepare stmt1 from @stmt ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
-@arg07, @arg08, @arg09 ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
-@arg07, @arg08, @arg09 ;
-set @stmt= concat('explain ',@stmt);
-prepare stmt1 from @stmt ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
-@arg07, @arg08, @arg09 ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
-@arg07, @arg08, @arg09 ;
-drop table t2 ;
-select 1 < (select a from t1) ;
-ERROR 21000: Subquery returns more than 1 row
-prepare stmt1 from ' select 1 < (select a from t1) ' ;
-execute stmt1 ;
-ERROR 21000: Subquery returns more than 1 row
-select 1 as my_col ;
-my_col
-1
-test_sequence
------- union tests ------
-prepare stmt1 from ' select a FROM t1 where a=1
-                     union distinct
-                     select a FROM t1 where a=1 ';
-execute stmt1 ;
-a
-1
-execute stmt1 ;
-a
-1
-prepare stmt1 from ' select a FROM t1 where a=1
-                     union all
-                     select a FROM t1 where a=1 ';
-execute stmt1 ;
-a
-1
-1
-prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ;
-ERROR 21000: The used SELECT statements have a different number of columns
-prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ;
-ERROR 21000: The used SELECT statements have a different number of columns
-prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ;
-ERROR 21000: The used SELECT statements have a different number of columns
-prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ;
-ERROR 21000: The used SELECT statements have a different number of columns
-set @arg00=1 ;
-select @arg00 FROM t1 where a=1
-union distinct
-select 1 FROM t1 where a=1;
-@arg00
-1
-prepare stmt1 from ' select ? FROM t1 where a=1
-                     union distinct
-                     select 1 FROM t1 where a=1 ' ;
-execute stmt1 using @arg00;
-?
-1
-set @arg00=1 ;
-select 1 FROM t1 where a=1
-union distinct
-select @arg00 FROM t1 where a=1;
-1
-1
-prepare stmt1 from ' select 1 FROM t1 where a=1
-                     union distinct
-                     select ? FROM t1 where a=1 ' ;
-execute stmt1 using @arg00;
-1
-1
-set @arg00='a' ;
-select @arg00 FROM t1 where a=1
-union distinct
-select @arg00 FROM t1 where a=1;
-@arg00
-a
-prepare stmt1 from ' select ? FROM t1 where a=1
-                     union distinct
-                     select ? FROM t1 where a=1 ';
-execute stmt1 using @arg00, @arg00;
-?
-a
-prepare stmt1 from ' select ? 
-                     union distinct
-                     select ? ';
-execute stmt1 using @arg00, @arg00;
-?
-a
-set @arg00='a' ;
-set @arg01=1 ;
-set @arg02='a' ;
-set @arg03=2 ;
-select @arg00 FROM t1 where a=@arg01
-union distinct
-select @arg02 FROM t1 where a=@arg03;
-@arg00
-a
-prepare stmt1 from ' select ? FROM t1 where a=?
-                     union distinct
-                     select ? FROM t1 where a=? ' ;
-execute stmt1 using @arg00, @arg01, @arg02, @arg03;
-?
-a
-set @arg00=1 ;
-prepare stmt1 from ' select sum(a) + 200, ? from t1
-union distinct
-select sum(a) + 200, 1 from t1
-group by b ' ;
-execute stmt1 using @arg00;
-sum(a) + 200	?
-210	1
-204	1
-201	1
-203	1
-202	1
-set @Oporto='Oporto' ;
-set @Lisboa='Lisboa' ;
-set @0=0 ;
-set @1=1 ;
-set @2=2 ;
-set @3=3 ;
-set @4=4 ;
-select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ;
-@Oporto	@Lisboa	@0	@1	@2	@3	@4
-Oporto	Lisboa	0	1	2	3	4
-select sum(a) + 200 as the_sum, @Oporto as the_town from t1
-group by b
-union distinct
-select sum(a) + 200, @Lisboa from t1
-group by b ;
-the_sum	the_town
-204	Oporto
-201	Oporto
-203	Oporto
-202	Oporto
-204	Lisboa
-201	Lisboa
-203	Lisboa
-202	Lisboa
-prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
-                     group by b
-                     union distinct
-                     select sum(a) + 200, ? from t1
-                     group by b ' ;
-execute stmt1 using @Oporto, @Lisboa;
-the_sum	the_town
-204	Oporto
-201	Oporto
-203	Oporto
-202	Oporto
-204	Lisboa
-201	Lisboa
-203	Lisboa
-202	Lisboa
-select sum(a) + 200 as the_sum, @Oporto as the_town from t1
-where a > @1
-group by b
-union distinct
-select sum(a) + 200, @Lisboa from t1
-where a > @2
-group by b ;
-the_sum	the_town
-204	Oporto
-203	Oporto
-202	Oporto
-204	Lisboa
-203	Lisboa
-prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
-                     where a > ?
-                     group by b
-                     union distinct
-                     select sum(a) + 200, ? from t1
-                     where a > ?
-                     group by b ' ;
-execute stmt1 using @Oporto, @1, @Lisboa, @2;
-the_sum	the_town
-204	Oporto
-203	Oporto
-202	Oporto
-204	Lisboa
-203	Lisboa
-select sum(a) + 200 as the_sum, @Oporto as the_town from t1
-where a > @1
-group by b
-having avg(a) > @2
-union distinct
-select sum(a) + 200, @Lisboa from t1
-where a > @2
-group by b 
-having avg(a) > @3;
-the_sum	the_town
-204	Oporto
-203	Oporto
-204	Lisboa
-prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
-                     where a > ?
-                     group by b
-                     having avg(a) > ?
-                     union distinct
-                     select sum(a) + 200, ? from t1
-                     where a > ?
-                     group by b
-                     having avg(a) > ? ';
-execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3;
-the_sum	the_town
-204	Oporto
-203	Oporto
-204	Lisboa
-test_sequence
------- explain select tests ------
-prepare stmt1 from ' explain select * from t9 ' ;
-execute stmt1;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					id	8	3	1	N	32929	0	63
-def					select_type	253	19	6	N	1	31	8
-def					table	253	64	2	Y	0	31	8
-def					type	253	10	3	Y	0	31	8
-def					possible_keys	253	4096	0	Y	0	31	8
-def					key	253	64	0	Y	0	31	8
-def					key_len	253	1365	0	Y	0	31	8
-def					ref	253	1024	0	Y	0	31	8
-def					rows	8	10	1	Y	32928	0	63
-def					Extra	253	255	0	N	1	31	8
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t9	ALL	NULL	NULL	NULL	NULL	2	
-test_sequence
------- delete tests ------
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-prepare stmt1 from 'delete from t1 where a=2' ;
-execute stmt1;
-select a,b from t1 where a=2;
-a	b
-execute stmt1;
-insert into t1 values(0,NULL);
-set @arg00=NULL;
-prepare stmt1 from 'delete from t1 where b=?' ;
-execute stmt1 using @arg00;
-select a,b from t1 where b is NULL ;
-a	b
-0	NULL
-set @arg00='one';
-execute stmt1 using @arg00;
-select a,b from t1 where b=@arg00;
-a	b
-prepare stmt1 from 'truncate table t1' ;
-test_sequence
------- update tests ------
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ;
-execute stmt1;
-select a,b from t1 where a=2;
-a	b
-2	a=two
-execute stmt1;
-select a,b from t1 where a=2;
-a	b
-2	a=two
-set @arg00=NULL;
-prepare stmt1 from 'update t1 set b=? where a=2' ;
-execute stmt1 using @arg00;
-select a,b from t1 where a=2;
-a	b
-2	NULL
-set @arg00='two';
-execute stmt1 using @arg00;
-select a,b from t1 where a=2;
-a	b
-2	two
-set @arg00=2;
-prepare stmt1 from 'update t1 set b=NULL where a=?' ;
-execute stmt1 using @arg00;
-select a,b from t1 where a=@arg00;
-a	b
-2	NULL
-update t1 set b='two' where a=@arg00;
-set @arg00=2000;
-execute stmt1 using @arg00;
-select a,b from t1 where a=@arg00;
-a	b
-set @arg00=2;
-set @arg01=22;
-prepare stmt1 from 'update t1 set a=? where a=?' ;
-execute stmt1 using @arg00, @arg00;
-select a,b from t1 where a=@arg00;
-a	b
-2	two
-execute stmt1 using @arg01, @arg00;
-select a,b from t1 where a=@arg01;
-a	b
-22	two
-execute stmt1 using @arg00, @arg01;
-select a,b from t1 where a=@arg00;
-a	b
-2	two
-set @arg00=NULL;
-set @arg01=2;
-execute stmt1 using @arg00, @arg01;
-Warnings:
-Warning	1048	Column 'a' cannot be null
-select a,b from t1 order by a;
-a	b
-0	two
-1	one
-3	three
-4	four
-set @arg00=0;
-execute stmt1 using @arg01, @arg00;
-select a,b from t1 order by a;
-a	b
-1	one
-2	two
-3	three
-4	four
-set @arg00=23;
-set @arg01='two';
-set @arg02=2;
-set @arg03='two';
-set @arg04=2;
-drop table if exists t2;
-create table t2 as select a,b from t1 ;
-prepare stmt1 from 'update t1 set a=? where b=?
-                    and a in (select ? from t2
-                              where b = ? or a = ?)';
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
-affected rows: 1
-info: Rows matched: 1  Changed: 1  Warnings: 0
-select a,b from t1 where a = @arg00 ;
-a	b
-23	two
-prepare stmt1 from 'update t1 set a=? where b=?
-                    and a not in (select ? from t2
-                              where b = ? or a = ?)';
-execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
-affected rows: 1
-info: Rows matched: 1  Changed: 1  Warnings: 0
-select a,b from t1 order by a ;
-a	b
-1	one
-2	two
-3	three
-4	four
-drop table t2 ;
-create table t2
-(
-a int, b varchar(30),
-primary key(a)
-) engine = 'Falcon'  ;
-insert into t2(a,b) select a, b from t1 ;
-prepare stmt1 from 'update t1 set a=? where b=?
-                    and a in (select ? from t2
-                              where b = ? or a = ?)';
-execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
-affected rows: 1
-info: Rows matched: 1  Changed: 1  Warnings: 0
-select a,b from t1 where a = @arg00 ;
-a	b
-23	two
-prepare stmt1 from 'update t1 set a=? where b=?
-                    and a not in (select ? from t2
-                              where b = ? or a = ?)';
-execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
-affected rows: 1
-info: Rows matched: 1  Changed: 1  Warnings: 0
-select a,b from t1 order by a ;
-a	b
-1	one
-2	two
-3	three
-4	four
-drop table t2 ;
-set @arg00=1;
-prepare stmt1 from 'update t1 set b=''bla''
-where a=2
-limit 1';
-execute stmt1 ;
-select a,b from t1 where b = 'bla' ;
-a	b
-2	bla
-prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?';
-execute stmt1 using @arg00;
-test_sequence
------- insert tests ------
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-prepare stmt1 from 'insert into t1 values(5, ''five'' )';
-execute stmt1;
-select a,b from t1 where a = 5;
-a	b
-5	five
-set @arg00='six' ;
-prepare stmt1 from 'insert into t1 values(6, ? )';
-execute stmt1 using @arg00;
-select a,b from t1 where b = @arg00;
-a	b
-6	six
-execute stmt1 using @arg00;
-ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
-set @arg00=NULL ;
-prepare stmt1 from 'insert into t1 values(0, ? )';
-execute stmt1 using @arg00;
-select a,b from t1 where b is NULL;
-a	b
-0	NULL
-set @arg00=8 ;
-set @arg01='eight' ;
-prepare stmt1 from 'insert into t1 values(?, ? )';
-execute stmt1 using @arg00, @arg01 ;
-select a,b from t1 where b = @arg01;
-a	b
-8	eight
-set @NULL= null ;
-set @arg00= 'abc' ;
-execute stmt1 using @NULL, @NULL ;
-ERROR 23000: Column 'a' cannot be null
-execute stmt1 using @NULL, @NULL ;
-ERROR 23000: Column 'a' cannot be null
-execute stmt1 using @NULL, @arg00 ;
-ERROR 23000: Column 'a' cannot be null
-execute stmt1 using @NULL, @arg00 ;
-ERROR 23000: Column 'a' cannot be null
-set @arg01= 10000 + 2 ;
-execute stmt1 using @arg01, @arg00 ;
-set @arg01= 10000 + 1 ;
-execute stmt1 using @arg01, @arg00 ;
-select * from t1 where a > 10000 order by a ;
-a	b
-10001	abc
-10002	abc
-delete from t1 where a > 10000 ;
-set @arg01= 10000 + 2 ;
-execute stmt1 using @arg01, @NULL ;
-set @arg01= 10000 + 1 ;
-execute stmt1 using @arg01, @NULL ;
-select * from t1 where a > 10000 order by a ;
-a	b
-10001	NULL
-10002	NULL
-delete from t1 where a > 10000 ;
-set @arg01= 10000 + 10 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 9 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 8 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 7 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 6 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 5 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 4 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 3 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 2 ;
-execute stmt1 using @arg01, @arg01 ;
-set @arg01= 10000 + 1 ;
-execute stmt1 using @arg01, @arg01 ;
-select * from t1 where a > 10000 order by a ;
-a	b
-10001	10001
-10002	10002
-10003	10003
-10004	10004
-10005	10005
-10006	10006
-10007	10007
-10008	10008
-10009	10009
-10010	10010
-delete from t1 where a > 10000 ;
-set @arg00=81 ;
-set @arg01='8-1' ;
-set @arg02=82 ;
-set @arg03='8-2' ;
-prepare stmt1 from 'insert into t1 values(?,?),(?,?)';
-execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
-select a,b from t1 where a in (@arg00,@arg02) ;
-a	b
-81	8-1
-82	8-2
-set @arg00=9 ;
-set @arg01='nine' ;
-prepare stmt1 from 'insert into t1 set a=?, b=? ';
-execute stmt1 using @arg00, @arg01 ;
-select a,b from t1 where a = @arg00 ;
-a	b
-9	nine
-set @arg00=6 ;
-set @arg01=1 ;
-prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
-                    on duplicate key update a=a + ?, b=concat(b,''modified'') ';
-execute stmt1 using @arg00, @arg01;
-select * from t1 order by a;
-a	b
-0	NULL
-1	one
-2	two
-3	three
-4	four
-5	five
-7	sixmodified
-8	eight
-9	nine
-81	8-1
-82	8-2
-set @arg00=81 ;
-set @arg01=1 ;
-execute stmt1 using @arg00, @arg01;
-ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
-drop table if exists t2 ;
-create table t2 (id int auto_increment primary key) 
-ENGINE= 'Falcon'  ;
-prepare stmt1 from ' select last_insert_id() ' ;
-insert into t2 values (NULL) ;
-execute stmt1 ;
-last_insert_id()
-1
-insert into t2 values (NULL) ;
-execute stmt1 ;
-last_insert_id()
-2
-drop table t2 ;
-set @1000=1000 ;
-set @x1000_2="x1000_2" ;
-set @x1000_3="x1000_3" ;
-set @x1000="x1000" ;
-set @1100=1100 ;
-set @x1100="x1100" ;
-set @100=100 ;
-set @updated="updated" ;
-insert into t1 values(1000,'x1000_1') ;
-insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
-on duplicate key update a = a + @100, b = concat(b,@updated) ;
-select a,b from t1 where a >= 1000 order by a ;
-a	b
-1000	x1000_3
-1100	x1000_1updated
-delete from t1 where a >= 1000 ;
-insert into t1 values(1000,'x1000_1') ;
-prepare stmt1 from ' insert into t1 values(?,?),(?,?)
-               on duplicate key update a = a + ?, b = concat(b,?) ';
-execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
-select a,b from t1 where a >= 1000 order by a ;
-a	b
-1000	x1000_3
-1100	x1000_1updated
-delete from t1 where a >= 1000 ;
-insert into t1 values(1000,'x1000_1') ;
-execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
-select a,b from t1 where a >= 1000 order by a ;
-a	b
-1200	x1000_1updatedupdated
-delete from t1 where a >= 1000 ;
-prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
-execute stmt1;
-execute stmt1;
-execute stmt1;
-test_sequence
------- multi table tests ------
-delete from t1 ;
-delete from t9 ;
-insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ;
-insert into t9 (c1,c21)
-values (1, 'one'), (2, 'two'), (3, 'three') ;
-prepare stmt_delete from " delete t1, t9 
-  from t1, t9 where t1.a=t9.c1 and t1.b='updated' ";
-prepare stmt_update from " update t1, t9 
-  set t1.b='updated', t9.c21='updated'
-  where t1.a=t9.c1 and t1.a=? ";
-prepare stmt_select1 from " select a, b from t1 order by a" ;
-prepare stmt_select2 from " select c1, c21 from t9 order by c1" ;
-set @arg00= 1 ;
-execute stmt_update using @arg00 ;
-execute stmt_delete ;
-execute stmt_select1 ;
-a	b
-2	two
-3	three
-execute stmt_select2 ;
-c1	c21
-2	two
-3	three
-set @arg00= @arg00 + 1 ;
-execute stmt_update using @arg00 ;
-execute stmt_delete ;
-execute stmt_select1 ;
-a	b
-3	three
-execute stmt_select2 ;
-c1	c21
-3	three
-set @arg00= @arg00 + 1 ;
-execute stmt_update using @arg00 ;
-execute stmt_delete ;
-execute stmt_select1 ;
-a	b
-execute stmt_select2 ;
-c1	c21
-set @arg00= @arg00 + 1 ;
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-insert into t1 values(0,NULL) ;
-set @duplicate='duplicate ' ;
-set @1000=1000 ;
-set @5=5 ;
-select a,b from t1 where a < 5 order by a ;
-a	b
-0	NULL
-1	one
-2	two
-3	three
-4	four
-insert into t1 select a + @1000, concat(@duplicate,b) from t1
-where a < @5 ;
-affected rows: 5
-info: Records: 5  Duplicates: 0  Warnings: 0
-select a,b from t1 where a >= 1000 order by a ;
-a	b
-1000	NULL
-1001	duplicate one
-1002	duplicate two
-1003	duplicate three
-1004	duplicate four
-delete from t1 where a >= 1000 ;
-prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
-where a < ? ' ;
-execute stmt1 using @1000, @duplicate, @5;
-affected rows: 5
-info: Records: 5  Duplicates: 0  Warnings: 0
-select a,b from t1 where a >= 1000 order by a ;
-a	b
-1000	NULL
-1001	duplicate one
-1002	duplicate two
-1003	duplicate three
-1004	duplicate four
-delete from t1 where a >= 1000 ;
-set @1=1 ;
-set @2=2 ;
-set @100=100 ;
-set @float=1.00;
-set @five='five' ;
-drop table if exists t2;
-create table t2 like t1 ;
-insert into t2 (b,a) 
-select @duplicate, sum(first.a) from t1 first, t1 second
-where first.a <> @5 and second.b = first.b
-and second.b <> @five
-group by second.b
-having sum(second.a) > @2
-union
-select b, a + @100 from t1
-where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b 
-from t1);
-affected rows: 3
-info: Records: 3  Duplicates: 0  Warnings: 0
-select a,b from t2 order by a ;
-a	b
-3	duplicate 
-4	duplicate 
-103	three
-delete from t2 ;
-prepare stmt1 from ' insert into t2 (b,a) 
-select ?, sum(first.a)
-  from t1 first, t1 second 
-  where first.a <> ? and second.b = first.b and second.b <> ?
-  group by second.b
-  having sum(second.a) > ?
-union
-select b, a + ? from t1
-  where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b 
-                 from t1 ) ' ;
-execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
-affected rows: 3
-info: Records: 3  Duplicates: 0  Warnings: 0
-select a,b from t2 order by a ;
-a	b
-3	duplicate 
-4	duplicate 
-103	three
-drop table t2;
-drop table if exists t5 ;
-set @arg01= 8;
-set @arg02= 8.0;
-set @arg03= 80.00000000000e-1;
-set @arg04= 'abc' ;
-set @arg05= CAST('abc' as binary) ;
-set @arg06= '1991-08-05' ;
-set @arg07= CAST('1991-08-05' as date);
-set @arg08= '1991-08-05 01:01:01' ;
-set @arg09= CAST('1991-08-05 01:01:01' as datetime) ;
-set @arg10= unix_timestamp('1991-01-01 01:01:01');
-set @arg11= YEAR('1991-01-01 01:01:01');
-set @arg12= 8 ;
-set @arg12= NULL ;
-set @arg13= 8.0 ;
-set @arg13= NULL ;
-set @arg14= 'abc';
-set @arg14= NULL ;
-set @arg15= CAST('abc' as binary) ;
-set @arg15= NULL ;
-create table t5 as select
-8                           as const01, @arg01 as param01,
-8.0                         as const02, @arg02 as param02,
-80.00000000000e-1           as const03, @arg03 as param03,
-'abc'                       as const04, @arg04 as param04,
-CAST('abc' as binary)       as const05, @arg05 as param05,
-'1991-08-05'                as const06, @arg06 as param06,
-CAST('1991-08-05' as date)  as const07, @arg07 as param07,
-'1991-08-05 01:01:01'       as const08, @arg08 as param08,
-CAST('1991-08-05 01:01:01'  as datetime) as const09, @arg09 as param09,
-unix_timestamp('1991-01-01 01:01:01')    as const10, @arg10 as param10,
-YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, 
-NULL                        as const12, @arg12 as param12,
-@arg13 as param13,
-@arg14 as param14,
-@arg15 as param15;
-show create table t5 ;
-Table	Create Table
-t5	CREATE TABLE `t5` (
-  `const01` int(1) NOT NULL DEFAULT '0',
-  `param01` bigint(20) DEFAULT NULL,
-  `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
-  `param02` decimal(65,30) DEFAULT NULL,
-  `const03` double NOT NULL DEFAULT '0',
-  `param03` double DEFAULT NULL,
-  `const04` varchar(3) NOT NULL DEFAULT '',
-  `param04` longtext,
-  `const05` varbinary(3) NOT NULL DEFAULT '',
-  `param05` longblob,
-  `const06` varchar(10) NOT NULL DEFAULT '',
-  `param06` longtext,
-  `const07` date DEFAULT NULL,
-  `param07` longblob,
-  `const08` varchar(19) NOT NULL DEFAULT '',
-  `param08` longtext,
-  `const09` datetime DEFAULT NULL,
-  `param09` longblob,
-  `const10` int(10) NOT NULL DEFAULT '0',
-  `param10` bigint(20) DEFAULT NULL,
-  `const11` int(4) DEFAULT NULL,
-  `param11` bigint(20) DEFAULT NULL,
-  `const12` binary(0) DEFAULT NULL,
-  `param12` bigint(20) DEFAULT NULL,
-  `param13` decimal(65,30) DEFAULT NULL,
-  `param14` longtext,
-  `param15` longblob
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-select * from t5 ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def	test	t5	t5	const01	const01	3	1	1	N	32769	0	63
-def	test	t5	t5	param01	param01	8	20	1	Y	32768	0	63
-def	test	t5	t5	const02	const02	246	4	3	N	1	1	63
-def	test	t5	t5	param02	param02	246	67	32	Y	0	30	63
-def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
-def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
-def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
-def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
-def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
-def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
-def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
-def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
-def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
-def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
-def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
-def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
-def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
-def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
-def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
-def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
-def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
-def	test	t5	t5	param11	param11	8	20	4	Y	32768	0	63
-def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
-def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
-def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
-def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
-def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
-const01	8
-param01	8
-const02	8.0
-param02	8.000000000000000000000000000000
-const03	8
-param03	8
-const04	abc
-param04	abc
-const05	abc
-param05	abc
-const06	1991-08-05
-param06	1991-08-05
-const07	1991-08-05
-param07	1991-08-05
-const08	1991-08-05 01:01:01
-param08	1991-08-05 01:01:01
-const09	1991-08-05 01:01:01
-param09	1991-08-05 01:01:01
-const10	662680861
-param10	662680861
-const11	1991
-param11	1991
-const12	NULL
-param12	NULL
-param13	NULL
-param14	NULL
-param15	NULL
-drop table t5 ;
-test_sequence
------- data type conversion tests ------
-delete from t1 ;
-insert into t1 values (1,'one');
-insert into t1 values (2,'two');
-insert into t1 values (3,'three');
-insert into t1 values (4,'four');
-commit ;
-delete from t9 ;
-insert into t9
-set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
-c10= 1, c11= 1, c12 = 1,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=true, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
-insert into t9
-set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
-c10= 9, c11= 9, c12 = 9,
-c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
-c16= '11:11:11', c17= '2004',
-c18= 1, c19=false, c20= 'a', c21= '123456789a', 
-c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
-c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
-c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
-commit ;
-insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ;
-select * from t9 order by c1 ;
-c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-9	9	9	9	9	9	9	9	9	9	9.0000	9.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	0	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	two	tuesday
-test_sequence
------- select @parameter:= column ------
-prepare full_info from "select @arg01, @arg02, @arg03, @arg04,
-       @arg05, @arg06, @arg07, @arg08,
-       @arg09, @arg10, @arg11, @arg12,
-       @arg13, @arg14, @arg15, @arg16,
-       @arg17, @arg18, @arg19, @arg20,
-       @arg21, @arg22, @arg23, @arg24,
-       @arg25, @arg26, @arg27, @arg28,
-       @arg29, @arg30, @arg31, @arg32" ;
-select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
-@arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
-@arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
-@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
-@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
-@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
-@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
-@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
-from t9 where c1= 1 ;
-@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	1	Y	32896	0	63
-def					@arg03	8	20	1	Y	32896	0	63
-def					@arg04	8	20	1	Y	32896	0	63
-def					@arg05	8	20	1	Y	32896	0	63
-def					@arg06	8	20	1	Y	32896	0	63
-def					@arg07	5	23	1	Y	32896	31	63
-def					@arg08	5	23	1	Y	32896	31	63
-def					@arg09	5	23	1	Y	32896	31	63
-def					@arg10	5	23	1	Y	32896	31	63
-def					@arg11	246	83	6	Y	128	30	63
-def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
-def					@arg17	8	20	4	Y	32928	0	63
-def					@arg18	8	20	1	Y	32896	0	63
-def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
-@arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
-@arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
-@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
-@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
-@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
-@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
-@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
-from t9 where c1= 0 ;
-@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	0	Y	32896	0	63
-def					@arg03	8	20	0	Y	32896	0	63
-def					@arg04	8	20	0	Y	32896	0	63
-def					@arg05	8	20	0	Y	32896	0	63
-def					@arg06	8	20	0	Y	32896	0	63
-def					@arg07	5	23	0	Y	32896	31	63
-def					@arg08	5	23	0	Y	32896	31	63
-def					@arg09	5	23	0	Y	32896	31	63
-def					@arg10	5	23	0	Y	32896	31	63
-def					@arg11	246	83	0	Y	128	30	63
-def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
-def					@arg17	8	20	0	Y	32928	0	63
-def					@arg18	8	20	0	Y	32896	0	63
-def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-prepare stmt1 from "select 
-       @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
-       @arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
-       @arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
-       @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
-       @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
-       @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
-       @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
-       @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
-from t9 where c1= ?" ;
-set @my_key= 1 ;
-execute stmt1 using @my_key ;
-@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	1	Y	32896	0	63
-def					@arg03	8	20	1	Y	32896	0	63
-def					@arg04	8	20	1	Y	32896	0	63
-def					@arg05	8	20	1	Y	32896	0	63
-def					@arg06	8	20	1	Y	32896	0	63
-def					@arg07	5	23	1	Y	32896	31	63
-def					@arg08	5	23	1	Y	32896	31	63
-def					@arg09	5	23	1	Y	32896	31	63
-def					@arg10	5	23	1	Y	32896	31	63
-def					@arg11	246	83	6	Y	128	30	63
-def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
-def					@arg17	8	20	4	Y	32928	0	63
-def					@arg18	8	20	1	Y	32896	0	63
-def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-set @my_key= 0 ;
-execute stmt1 using @my_key ;
-@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	0	Y	32896	0	63
-def					@arg03	8	20	0	Y	32896	0	63
-def					@arg04	8	20	0	Y	32896	0	63
-def					@arg05	8	20	0	Y	32896	0	63
-def					@arg06	8	20	0	Y	32896	0	63
-def					@arg07	5	23	0	Y	32896	31	63
-def					@arg08	5	23	0	Y	32896	31	63
-def					@arg09	5	23	0	Y	32896	31	63
-def					@arg10	5	23	0	Y	32896	31	63
-def					@arg11	246	83	0	Y	128	30	63
-def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
-def					@arg17	8	20	0	Y	32928	0	63
-def					@arg18	8	20	0	Y	32896	0	63
-def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1
-test_sequence
------- select column, .. into @parm,.. ------
-select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
-c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
-c25, c26, c27, c28, c29, c30, c31, c32
-into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
-@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
-@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
-@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
-from t9 where c1= 1 ;
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	1	Y	32896	0	63
-def					@arg03	8	20	1	Y	32896	0	63
-def					@arg04	8	20	1	Y	32896	0	63
-def					@arg05	8	20	1	Y	32896	0	63
-def					@arg06	8	20	1	Y	32896	0	63
-def					@arg07	5	23	1	Y	32896	31	63
-def					@arg08	5	23	1	Y	32896	31	63
-def					@arg09	5	23	1	Y	32896	31	63
-def					@arg10	5	23	1	Y	32896	31	63
-def					@arg11	246	83	6	Y	128	30	63
-def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
-def					@arg17	8	20	4	Y	32928	0	63
-def					@arg18	8	20	1	Y	32896	0	63
-def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
-c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
-c25, c26, c27, c28, c29, c30, c31, c32
-into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
-@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
-@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
-@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
-from t9 where c1= 0 ;
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	0	Y	32896	0	63
-def					@arg03	8	20	0	Y	32896	0	63
-def					@arg04	8	20	0	Y	32896	0	63
-def					@arg05	8	20	0	Y	32896	0	63
-def					@arg06	8	20	0	Y	32896	0	63
-def					@arg07	5	23	0	Y	32896	31	63
-def					@arg08	5	23	0	Y	32896	31	63
-def					@arg09	5	23	0	Y	32896	31	63
-def					@arg10	5	23	0	Y	32896	31	63
-def					@arg11	246	83	0	Y	128	30	63
-def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
-def					@arg17	8	20	0	Y	32928	0	63
-def					@arg18	8	20	0	Y	32896	0	63
-def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
-       c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
-       c25, c26, c27, c28, c29, c30, c31, c32
-into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
-     @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
-     @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
-     @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
-from t9 where c1= ?" ;
-set @my_key= 1 ;
-execute stmt1 using @my_key ;
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	1	Y	32896	0	63
-def					@arg03	8	20	1	Y	32896	0	63
-def					@arg04	8	20	1	Y	32896	0	63
-def					@arg05	8	20	1	Y	32896	0	63
-def					@arg06	8	20	1	Y	32896	0	63
-def					@arg07	5	23	1	Y	32896	31	63
-def					@arg08	5	23	1	Y	32896	31	63
-def					@arg09	5	23	1	Y	32896	31	63
-def					@arg10	5	23	1	Y	32896	31	63
-def					@arg11	246	83	6	Y	128	30	63
-def					@arg12	246	83	6	Y	128	30	63
-def					@arg13	251	16777216	10	Y	128	31	63
-def					@arg14	251	16777216	19	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	8	Y	128	31	63
-def					@arg17	8	20	4	Y	32928	0	63
-def					@arg18	8	20	1	Y	32896	0	63
-def					@arg19	8	20	1	Y	32896	0	63
-def					@arg20	251	16777216	1	Y	0	31	8
-def					@arg21	251	16777216	10	Y	0	31	8
-def					@arg22	251	16777216	30	Y	0	31	8
-def					@arg23	251	16777216	8	Y	128	31	63
-def					@arg24	251	16777216	8	Y	0	31	8
-def					@arg25	251	16777216	4	Y	128	31	63
-def					@arg26	251	16777216	4	Y	0	31	8
-def					@arg27	251	16777216	10	Y	128	31	63
-def					@arg28	251	16777216	10	Y	0	31	8
-def					@arg29	251	16777216	8	Y	128	31	63
-def					@arg30	251	16777216	8	Y	0	31	8
-def					@arg31	251	16777216	3	Y	0	31	8
-def					@arg32	251	16777216	6	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
-set @my_key= 0 ;
-execute stmt1 using @my_key ;
-execute full_info ;
-Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def					@arg01	8	20	1	Y	32896	0	63
-def					@arg02	8	20	0	Y	32896	0	63
-def					@arg03	8	20	0	Y	32896	0	63
-def					@arg04	8	20	0	Y	32896	0	63
-def					@arg05	8	20	0	Y	32896	0	63
-def					@arg06	8	20	0	Y	32896	0	63
-def					@arg07	5	23	0	Y	32896	31	63
-def					@arg08	5	23	0	Y	32896	31	63
-def					@arg09	5	23	0	Y	32896	31	63
-def					@arg10	5	23	0	Y	32896	31	63
-def					@arg11	246	83	0	Y	128	30	63
-def					@arg12	246	83	0	Y	128	30	63
-def					@arg13	251	16777216	0	Y	128	31	63
-def					@arg14	251	16777216	0	Y	128	31	63
-def					@arg15	251	16777216	19	Y	128	31	63
-def					@arg16	251	16777216	0	Y	128	31	63
-def					@arg17	8	20	0	Y	32928	0	63
-def					@arg18	8	20	0	Y	32896	0	63
-def					@arg19	8	20	0	Y	32896	0	63
-def					@arg20	251	16777216	0	Y	0	31	8
-def					@arg21	251	16777216	0	Y	0	31	8
-def					@arg22	251	16777216	0	Y	0	31	8
-def					@arg23	251	16777216	0	Y	128	31	63
-def					@arg24	251	16777216	0	Y	0	31	8
-def					@arg25	251	16777216	0	Y	128	31	63
-def					@arg26	251	16777216	0	Y	0	31	8
-def					@arg27	251	16777216	0	Y	128	31	63
-def					@arg28	251	16777216	0	Y	0	31	8
-def					@arg29	251	16777216	0	Y	128	31	63
-def					@arg30	251	16777216	0	Y	0	31	8
-def					@arg31	251	16777216	0	Y	0	31	8
-def					@arg32	251	16777216	0	Y	0	31	8
-@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
-0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1
-test_sequence
--- insert into numeric columns --
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ;
-set @arg00= 21 ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt1 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ;
-execute stmt1 ;
-set @arg00= 23;
-prepare stmt2 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values 
-  (  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0,
-30.0, 30.0, 30.0 ) ;
-set @arg00= 31.0 ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt1 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0,
-    32.0, 32.0, 32.0 )" ;
-execute stmt1 ;
-set @arg00= 33.0;
-prepare stmt2 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values 
-  (  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,   ?,   ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( '40', '40', '40', '40', '40', '40', '40', '40',
-'40', '40', '40' ) ;
-set @arg00= '41' ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt1 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( '42', '42', '42', '42', '42', '42', '42', '42',
-    '42', '42', '42' )" ;
-execute stmt1 ;
-set @arg00= '43';
-prepare stmt2 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values 
-  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( CAST('50' as binary), CAST('50' as binary), 
-CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), 
-CAST('50' as binary), CAST('50' as binary), CAST('50' as binary),
-CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ;
-set @arg00= CAST('51' as binary) ;
-insert into t9 
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt1 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( CAST('52' as binary), CAST('52' as binary),
-  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), 
-  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary),
-  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ;
-execute stmt1 ;
-set @arg00= CAST('53' as binary) ;
-prepare stmt2 from "insert into t9 
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values 
-  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-set @arg00= 2 ;
-set @arg00= NULL ;
-insert into t9
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-NULL, NULL, NULL ) ;
-insert into t9
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 61, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt1 from "insert into t9
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL )" ;
-execute stmt1 ;
-prepare stmt2 from "insert into t9
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00 ;
-set @arg00= 8.0 ;
-set @arg00= NULL ;
-insert into t9
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 71, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt2 from "insert into t9
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00 ;
-set @arg00= 'abc' ;
-set @arg00= NULL ;
-insert into t9
-( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-( 81, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
-prepare stmt2 from "insert into t9
-  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values
-  ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
-execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00 ;
-select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
-from t9 where c1 >= 20
-order by c1 ;
-c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c12
-20	20	20	20	20	20	20	20	20	20	20.0000
-21	21	21	21	21	21	21	21	21	21	21.0000
-22	22	22	22	22	22	22	22	22	22	22.0000
-23	23	23	23	23	23	23	23	23	23	23.0000
-30	30	30	30	30	30	30	30	30	30	30.0000
-31	31	31	31	31	31	31	31	31	31	31.0000
-32	32	32	32	32	32	32	32	32	32	32.0000
-33	33	33	33	33	33	33	33	33	33	33.0000
-40	40	40	40	40	40	40	40	40	40	40.0000
-41	41	41	41	41	41	41	41	41	41	41.0000
-42	42	42	42	42	42	42	42	42	42	42.0000
-43	43	43	43	43	43	43	43	43	43	43.0000
-50	50	50	50	50	50	50	50	50	50	50.0000
-51	51	51	51	51	51	51	51	51	51	51.0000
-52	52	52	52	52	52	52	52	52	52	52.0000
-53	53	53	53	53	53	53	53	53	53	53.0000
-60	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-61	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-62	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-63	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-71	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-73	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-81	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-83	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-test_sequence
--- select .. where numeric column = .. --
-set @arg00= 20;
-select 'true' as found from t9 
-where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20
-and c8= 20 and c9= 20 and c10= 20 and c12= 20;
-found
-true
-select 'true' as found from t9 
-where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
-and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
-and c12= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20
-  and c8= 20 and c9= 20 and c10= 20 and c12= 20 ";
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
-  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
-  and c12= ? ";
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= 20.0;
-select 'true' as found from t9 
-where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0
-and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0;
-found
-true
-select 'true' as found from t9 
-where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
-and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
-and c12= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0
-  and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 ";
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
-  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
-  and c12= ? ";
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-found
-true
-select 'true' as found from t9 
-where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20'
-  and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20';
-found
-true
-prepare stmt1 from "select 'true' as found from t9
-where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20'
-  and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' ";
-execute stmt1 ;
-found
-true
-set @arg00= '20';
-select 'true' as found from t9 
-where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
-and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
-and c12= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
-  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
-  and c12= ? ";
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-found
-true
-select 'true' as found from t9 
-where c1= CAST('20' as binary) and c2= CAST('20' as binary) and 
-c3= CAST('20' as binary) and c4= CAST('20' as binary) and 
-c5= CAST('20' as binary) and c6= CAST('20' as binary) and 
-c7= CAST('20' as binary) and c8= CAST('20' as binary) and 
-c9= CAST('20' as binary) and c10= CAST('20' as binary) and 
-c12= CAST('20' as binary);
-found
-true
-prepare stmt1 from "select 'true' as found from t9
-where c1= CAST('20' as binary) and c2= CAST('20' as binary) and 
-      c3= CAST('20' as binary) and c4= CAST('20' as binary) and 
-      c5= CAST('20' as binary) and c6= CAST('20' as binary) and 
-      c7= CAST('20' as binary) and c8= CAST('20' as binary) and 
-      c9= CAST('20' as binary) and c10= CAST('20' as binary) and 
-      c12= CAST('20' as binary) ";
-execute stmt1 ;
-found
-true
-set @arg00= CAST('20' as binary) ;
-select 'true' as found from t9 
-where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
-and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
-and c12= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
-  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
-  and c12= ? ";
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00 ;
-found
-true
-delete from t9 ;
-test_sequence
--- some numeric overflow experiments --
-prepare my_insert from "insert into t9 
-   ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
-values 
-   ( 'O',  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,   ?,   ? )" ;
-prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
-from t9 where c21 = 'O' ";
-prepare my_delete from "delete from t9 where c21 = 'O' ";
-set @arg00= 9223372036854775807 ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	127
-c2	32767
-c3	8388607
-c4	2147483647
-c5	2147483647
-c6	9223372036854775807
-c7	9.22337e+18
-c8	9.22337203685478e+18
-c9	9.22337203685478e+18
-c10	9.22337203685478e+18
-c12	9999.9999
-execute my_delete ;
-set @arg00= '9223372036854775807' ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	127
-c2	32767
-c3	8388607
-c4	2147483647
-c5	2147483647
-c6	9223372036854775807
-c7	9.22337e+18
-c8	9.22337203685478e+18
-c9	9.22337203685478e+18
-c10	9.22337203685478e+18
-c12	9999.9999
-execute my_delete ;
-set @arg00= -9223372036854775808 ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	-128
-c2	-32768
-c3	-8388608
-c4	-2147483648
-c5	-2147483648
-c6	-9223372036854775808
-c7	-9.22337e+18
-c8	-9.22337203685478e+18
-c9	-9.22337203685478e+18
-c10	-9.22337203685478e+18
-c12	-9999.9999
-execute my_delete ;
-set @arg00= '-9223372036854775808' ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	-128
-c2	-32768
-c3	-8388608
-c4	-2147483648
-c5	-2147483648
-c6	-9223372036854775808
-c7	-9.22337e+18
-c8	-9.22337203685478e+18
-c9	-9.22337203685478e+18
-c10	-9.22337203685478e+18
-c12	-9999.9999
-execute my_delete ;
-set @arg00= 1.11111111111111111111e+50 ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c6' at row 1
-Warning	1264	Out of range value for column 'c7' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	127
-c2	32767
-c3	8388607
-c4	2147483647
-c5	2147483647
-c6	9223372036854775807
-c7	3.40282e+38
-c8	1.11111111111111e+50
-c9	1.11111111111111e+50
-c10	1.11111111111111e+50
-c12	9999.9999
-execute my_delete ;
-set @arg00= '1.11111111111111111111e+50' ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c6' at row 1
-Warning	1264	Out of range value for column 'c7' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	127
-c2	32767
-c3	8388607
-c4	2147483647
-c5	2147483647
-c6	9223372036854775807
-c7	3.40282e+38
-c8	1.11111111111111e+50
-c9	1.11111111111111e+50
-c10	1.11111111111111e+50
-c12	9999.9999
-execute my_delete ;
-set @arg00= -1.11111111111111111111e+50 ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c6' at row 1
-Warning	1264	Out of range value for column 'c7' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	-128
-c2	-32768
-c3	-8388608
-c4	-2147483648
-c5	-2147483648
-c6	-9223372036854775808
-c7	-3.40282e+38
-c8	-1.11111111111111e+50
-c9	-1.11111111111111e+50
-c10	-1.11111111111111e+50
-c12	-9999.9999
-execute my_delete ;
-set @arg00= '-1.11111111111111111111e+50' ;
-execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-Warnings:
-Warning	1264	Out of range value for column 'c1' at row 1
-Warning	1264	Out of range value for column 'c2' at row 1
-Warning	1264	Out of range value for column 'c3' at row 1
-Warning	1264	Out of range value for column 'c4' at row 1
-Warning	1264	Out of range value for column 'c5' at row 1
-Warning	1264	Out of range value for column 'c6' at row 1
-Warning	1264	Out of range value for column 'c7' at row 1
-Warning	1264	Out of range value for column 'c12' at row 1
-execute my_select ;
-c1	-128
-c2	-32768
-c3	-8388608
-c4	-2147483648
-c5	-2147483648
-c6	-9223372036854775808
-c7	-3.40282e+38
-c8	-1.11111111111111e+50
-c9	-1.11111111111111e+50
-c10	-1.11111111111111e+50
-c12	-9999.9999
-execute my_delete ;
-test_sequence
--- insert into string columns --
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c20' at row 1
-select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30
-from t9 where c1 >= 20
-order by c1 ;
-c1	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30
-20	2	20	20	20	20	20	20	20	20	20	20
-21	2	21	21	21	21	21	21	21	21	21	21
-22	2	22	22	22	22	22	22	22	22	22	22
-23	2	23	23	23	23	23	23	23	23	23	23
-30	3	30	30	30	30	30	30	30	30	30	30
-31	3	31	31	31	31	31	31	31	31	31	31
-32	3	32	32	32	32	32	32	32	32	32	32
-33	3	33	33	33	33	33	33	33	33	33	33
-40	4	40	40	40	40	40	40	40	40	40	40
-41	4	41	41	41	41	41	41	41	41	41	41
-42	4	42	42	42	42	42	42	42	42	42	42
-43	4	43	43	43	43	43	43	43	43	43	43
-50	5	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0
-51	5	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0
-52	5	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0
-53	5	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0
-54	5	54	54	54.00	54.00	54.00	54.00	54.00	54.00	54.00	54.00
-55	5	55	55	55	55	55	55	55	55	55	55
-56	6	56	56	56.00	56.00	56.00	56.00	56.00	56.00	56.00	56.00
-57	6	57	57	57.00	57.00	57.00	57.00	57.00	57.00	57.00	57.00
-60	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-61	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-62	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-63	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-71	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-73	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-81	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-83	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
-test_sequence
--- select .. where string column = .. --
-set @arg00= '20';
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and
-c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and
-c27= '20' and c28= '20' and c29= '20' and c30= '20' ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
-c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
-c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and
-  c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and
-  c27= '20' and c28= '20' and c29= '20' and c30= '20'" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
-  c21= ? and c22= ? and c23= ? and c25= ? and
-  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= CAST('20' as binary);
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20)))
-= CAST('20' as binary) and c21= CAST('20' as binary)
-and c22= CAST('20' as binary) and c23= CAST('20' as binary) and
-c24= CAST('20' as binary) and c25= CAST('20' as binary) and
-c26= CAST('20' as binary) and c27= CAST('20' as binary) and
-c28= CAST('20' as binary) and c29= CAST('20' as binary) and
-c30= CAST('20' as binary) ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and
-c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
-c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and
-c30= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20)))
-                 = CAST('20' as binary) and c21= CAST('20' as binary)
-  and c22= CAST('20' as binary) and c23= CAST('20' as binary) and
-  c24= CAST('20' as binary) and c25= CAST('20' as binary) and
-  c26= CAST('20' as binary) and c27= CAST('20' as binary) and
-  c28= CAST('20' as binary) and c29= CAST('20' as binary) and
-  c30= CAST('20' as binary)" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and
-  c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and
-  c29= ? and c30= ?";
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= 20;
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and
-c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and
-c27= 20 and c28= 20 and c29= 20 and c30= 20 ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
-c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
-c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and
-  c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and
-  c27= 20 and c28= 20 and c29= 20 and c30= 20" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
-  c21= ? and c22= ? and c23= ? and c25= ? and
-  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= 20.0;
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and
-c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and
-c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
-c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
-c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and
-  c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and
-  c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
-  c21= ? and c22= ? and c23= ? and c25= ? and
-  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
-@arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-delete from t9 ;
-test_sequence
--- insert into date/time columns --
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Note	1265	Data truncated for column 'c13' at row 1
-Warning	1265	Data truncated for column 'c17' at row 1
-Warnings:
-Warning	1264	Out of range value for column 'c13' at row 1
-Warning	1264	Out of range value for column 'c14' at row 1
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1264	Out of range value for column 'c13' at row 1
-Warning	1264	Out of range value for column 'c14' at row 1
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1264	Out of range value for column 'c13' at row 1
-Warning	1264	Out of range value for column 'c14' at row 1
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1264	Out of range value for column 'c13' at row 1
-Warning	1264	Out of range value for column 'c14' at row 1
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-Warnings:
-Warning	1265	Data truncated for column 'c15' at row 1
-Warning	1264	Out of range value for column 'c16' at row 1
-Warning	1264	Out of range value for column 'c17' at row 1
-select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
-c1	c13	c14	c15	c16	c17
-20	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-21	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-22	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-23	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-30	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-31	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-32	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-33	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
-40	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-41	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-42	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-43	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-50	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-51	2010-00-00	2010-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-52	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-53	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
-60	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-61	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-62	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-63	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-71	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-73	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-81	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-83	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
-test_sequence
--- select .. where date/time column = .. --
-set @arg00= '1991-01-01 01:01:01' ;
-select 'true' as found from t9 
-where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
-c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
-c17= '1991-01-01 01:01:01' ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
-and c17= @arg00 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
-  c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
-  c17= '1991-01-01 01:01:01'" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= CAST('1991-01-01 01:01:01' as datetime) ;
-select 'true' as found from t9 
-where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and
-c14= CAST('1991-01-01 01:01:01' as datetime) and
-c15= CAST('1991-01-01 01:01:01' as datetime) and
-c16= CAST('1991-01-01 01:01:01' as datetime) and
-c17= CAST('1991-01-01 01:01:01' as datetime) ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
-and c17= @arg00 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and
-  c14= CAST('1991-01-01 01:01:01' as datetime) and
-  c15= CAST('1991-01-01 01:01:01' as datetime) and
-  c16= CAST('1991-01-01 01:01:01' as datetime) and
-  c17= CAST('1991-01-01 01:01:01' as datetime)" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
-execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
-found
-true
-set @arg00= 1991 ;
-select 'true' as found from t9 
-where c1= 20 and c17= 1991 ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and c17= @arg00 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and c17= 1991" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c17= ?" ;
-execute stmt1 using @arg00 ;
-found
-true
-set @arg00= 1.991e+3 ;
-select 'true' as found from t9 
-where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ;
-found
-true
-select 'true' as found from t9 
-where c1= 20 and abs(c17 - @arg00) < 0.01 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9 
-where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ;
-execute stmt1 ;
-found
-true
-prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and abs(c17 - ?) < 0.01" ;
-execute stmt1 using @arg00 ;
-found
-true
-drop table t1, t9;
diff -Nrup a/mysql-test/suite/falcon/r/read_many_rows_falcon.result b/mysql-test/suite/falcon/r/read_many_rows_falcon.result
--- a/mysql-test/suite/falcon/r/read_many_rows_falcon.result	2007-09-20 17:43:21 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,35 +0,0 @@
-SET SESSION STORAGE_ENGINE = Falcon;
-DROP TABLE IF EXISTS t1, t2, t3, t4;
-CREATE TABLE t1 (id INTEGER) ENGINE=MyISAM;
-CREATE TABLE t2 (id INTEGER PRIMARY KEY);
-CREATE TABLE t3 (a CHAR(32) PRIMARY KEY,id INTEGER);
-CREATE TABLE t4 (a CHAR(32) PRIMARY KEY,id INTEGER) ENGINE=MyISAM;
-INSERT INTO t1 (id) VALUES (1);
-INSERT INTO t1 SELECT id+1 FROM t1;
-INSERT INTO t1 SELECT id+2 FROM t1;
-INSERT INTO t1 SELECT id+4 FROM t1;
-INSERT INTO t1 SELECT id+8 FROM t1;
-INSERT INTO t1 SELECT id+16 FROM t1;
-INSERT INTO t1 SELECT id+32 FROM t1;
-INSERT INTO t1 SELECT id+64 FROM t1;
-INSERT INTO t1 SELECT id+128 FROM t1;
-INSERT INTO t1 SELECT id+256 FROM t1;
-INSERT INTO t1 SELECT id+512 FROM t1;
-INSERT INTO t1 SELECT id+1024 FROM t1;
-INSERT INTO t1 SELECT id+2048 FROM t1;
-INSERT INTO t1 SELECT id+4096 FROM t1;
-INSERT INTO t1 SELECT id+8192 FROM t1;
-INSERT INTO t1 SELECT id+16384 FROM t1;
-INSERT INTO t1 SELECT id+32768 FROM t1;
-INSERT INTO t1 SELECT id+65536 FROM t1;
-INSERT INTO t1 SELECT id+131072 FROM t1;
-INSERT INTO t1 SELECT id+262144 FROM t1;
-INSERT INTO t1 SELECT id+524288 FROM t1;
-INSERT INTO t1 SELECT id+1048576 FROM t1;
-INSERT INTO t2 SELECT * FROM t1;
-INSERT INTO t3 SELECT CONCAT(id),id FROM t2 ORDER BY -id;
-INSERT INTO t4 SELECT * FROM t3 ORDER BY CONCAT(a);
-SELECT SUM(id) FROM t3;
-SUM(id)
-2199024304128
-DROP TABLE t1,t2,t3,t4;
diff -Nrup a/mysql-test/suite/falcon/t/disabled.def b/mysql-test/suite/falcon/t/disabled.def
--- a/mysql-test/suite/falcon/t/disabled.def	2008-04-20 00:19:45 +02:00
+++ b/mysql-test/suite/falcon/t/disabled.def	2008-04-20 02:05:16 +02:00
@@ -11,39 +11,18 @@
 ##############################################################################
 
 #falcon_bug_22150    : Bug#34890 2008-02-27 hakank Open bug
-#falcon_bug_22165    : Bug#35255 2008-03-12 hakank Open bug
-#falcon_bug_22166    : Bug#22166 2006-08-24 hakank Open bug
-#falcon_bug_22169    : Bug#22169 2006-08-24 hakank Too long run time for PB
 #falcon_bug_22173    : Bug#35656 2008-04-10 hakank Some Falcon tests fail sporadically
 #falcon_bug_22173a   : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
 #falcon_bug_22182    : Disabled until runtime team provides RENAME DATABASE replacement. See WL#4030
 #falcon_bug_22185    : Bug#34890 2008-03-07 hakank Bogus timeout problem
-#falcon_bug_22187    : Bug#22187 2006-08-24 hakank Get pushbuild green
-#falcon_bug_22189    : Bug#22189 2006-08-24 hakank Get pushbuild green
-#falcon_bug_22207    : Bug#34893 2008-02-27 hakank Fails randomly on Pushbuild Windows
-#falcon_bug_23692    : Bug#23692 2006-10-27 hakank Currently failing
-#falcon_bug_23945    : Bug#34892 2008-03-04 hakank (Some falcon tests fail sporadically) 
-#falcon_bug_24024    : Bug#24024 2006-12-05 ML Get pushbuild green
-#falcon_bug_26058    : Bug#26058 2007-05-03 hakank Currently failing
 #falcon_bug_26433    : Bug#32697 falcon_bug_26433.test fails randomly
 #falcon_bug_27951    : Bug#32731 falcon_bug_27951 fails randomly
-#falcon_bug_27997    : Bug#27997 2007-04-21 hakank Currently failing
-#falcon_bug_28006    : Bug#28006 2007-08-22 hakank Won't fix, see also Bug#15491
 #falcon_bug_28095_I  : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
 #falcon_bug_28095_II : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
 #falcon_bug_29246    : Bug#29246 2007-06-21 hakank Currently failing
 #falcon_bug_30124    : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
-#falcon_bug_30282    : Bug#30282 2007-08-21 hakank Currently failing
-#falcon_bug_30480_A  : Bug#30282 2007-09-07 klewis Currently failing
-#falcon_bug_30480_B  : Bug#30282 2007-09-07 klewis Currently failing
-#falcon_bug_30826    : Bug#20129 2008-02-24 mattiasj disabled until wl#4176
-#falcon_bug_32413    : Bug#32413 2008-02-11 hakank Either works on 64-bit or on 32-bit, but not on both platforms. This is a test case problem and not a bug.
 #falcon_bug_34174    : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
 #falcon_bug_34351_B  : Bug#35656 2008-03-27 hakank Some Falcon tests fail sporadically
 #falcon_bug_34351_C  : Bug#35503 2008-03-22 hakank Times out from time to time
 #falcon_bug_34890    : Bug#34890 2008-02-11 klewis shows a faux lock timeout
-#falcon_bug_34892    : Bug#34892 2008-03-04 hakank (Some falcon tests fail sporadically)
-#falcon_deadlock     : Bug#34182 2008-01-31 hakank Bug in SELECT ... FOR UPDATE
 #falcon_record_cache_memory_leak2    : Bug#34894 2008-02-27 hakank Fails on Pushbuild Windows
-#ps_8falcon          : Bug#32683  Test ps_8falcon fails in 6.0
-#read_many_rows_falcon : Bug#23783 2006-10-30 ML Get pushbuild green
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22165.test b/mysql-test/suite/falcon/t/falcon_bug_22165.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22165.test	2008-03-01 06:28:54 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,67 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #22165: ALTER crash if two interleaving transactions
-#
---echo *** Bug #22165 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP PROCEDURE IF EXISTS db1.p1;
-DROP EVENT IF EXISTS db1.e1;
-DROP EVENT IF EXISTS db1.e2;
-DROP DATABASE IF EXISTS db1;
---enable_warnings
-
-CREATE DATABASE db1;
-USE db1;
-delimiter //;
-CREATE PROCEDURE p1 ()
-begin
-  declare v int default 0;
-  declare continue handler for sqlexception
-  begin
-    declare continue handler for sqlexception begin end;
-    ALTER TABLE t1 MODIFY COLUMN c timestamp;
-  end;
-  SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
-  while v < 10 do
-    START TRANSACTION;
-    INSERT INTO t1 (a, b) VALUES (v, 'a');
-    UPDATE t1 SET c = current_timestamp WHERE a = v;
-    COMMIT;
-    SET v = v + 1;
-  end while;
-end//
-delimiter ;//
-
-CREATE TABLE t1 (a bigint, b varchar(1000), c timestamp);
-
-CREATE EVENT e1 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
-CREATE EVENT e2 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-SET GLOBAL event_scheduler = 1;
---sleep 60
-SET GLOBAL event_scheduler = 0;
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-# Checking row count is not applicable here.
-#SELECT count(*) FROM t1;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-USE test;
-DROP EVENT db1.e1;
-DROP EVENT db1.e2;
-DROP PROCEDURE db1.p1;
-DROP DATABASE db1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22166.test b/mysql-test/suite/falcon/t/falcon_bug_22166.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22166.test	2008-02-06 16:21:11 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,33 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #22166: Case insensitive table names
-#
---echo *** Bug #22166 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t;
-DROP TABLE IF EXISTS T;
---enable_warnings
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-CREATE TABLE t(id int);
-CREATE TABLE T(id int);
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t;
-DROP TABLE T;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22169.test b/mysql-test/suite/falcon/t/falcon_bug_22169.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22169.test	2007-09-29 06:30:36 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,63 +0,0 @@
---source include/have_falcon.inc
-SET STORAGE_ENGINE='Falcon';
-#
-# Bug #22169: Crash with count(distinct)
-#
---echo *** Bug #22169 ***
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
-
-CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
-
---disable_query_log
-SET @rnd_max= 2147483647;
-let $1 = 1000;
-while ($1)
-{
-  SET @rnd= RAND();
-  SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
-  SET @id_rev= @rnd_max - @id;
-  SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
-  INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
-  dec $1;
-}
-set @@read_buffer_size=2*1024*1024;
-CREATE TABLE t2 SELECT * FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
-INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
-DROP TABLE t2;
---enable_query_log
-
-# adding order by to make sure results match between engines
-SELECT COUNT(*) FROM t1 order by id;
-
-# As t1 contains random numbers, results are different from test to test.
-# That's okay, because we test only that select doesn't yield an
-# error. Note, that --disable_result_log doesn't suppress error output.
-
-# adding order by to make sure results match between engines
-
---disable_result_log
-SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
---enable_result_log
-DROP TABLE t1;
-
-set @@read_buffer_size=default;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22187.test b/mysql-test/suite/falcon/t/falcon_bug_22187.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22187.test	2007-09-29 06:30:36 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,25 +0,0 @@
---source include/have_falcon.inc
-SET STORAGE_ENGINE = Falcon;
-#
-# Bug #22187: Can't create FOREIGN KEY
-#
---echo *** Bug #22187 ***
---disable_warnings
-DROP TABLE IF EXISTS child;
-DROP TABLE IF EXISTS parent;
---enable_warnings
-
-
-CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id));
-CREATE TABLE child (
-  id INT, 
-  parent_id INT,
-  INDEX par_ind (parent_id),
-  FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
-);
-
-SHOW CREATE TABLE child;
-
-# Final cleanup
-DROP TABLE child;
-DROP TABLE parent;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22189.test b/mysql-test/suite/falcon/t/falcon_bug_22189.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22189.test	2008-02-05 08:05:32 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,75 +0,0 @@
---source include/have_falcon.inc
-SET @@storage_engine = Falcon;
-#
-# Bug #22189: Duplicate entry '1' for key 'PRIMARY'
-#
---echo *** Bug #22189 ***
---disable_warnings
-DROP DATABASE IF EXISTS db62;
---enable_warnings
-
---echo # Establish connection conn1 (user = root)
-connect (conn1,localhost,root,,);
-SET @@storage_engine = Falcon;
-
---echo # Switch to connection default
-connection default;
-SET @@autocommit = 0;
-CREATE DATABASE db62;
-USE db62;
-DROP TABLE IF EXISTS x1;
-CREATE TABLE x1 (x1 int primary key, x2 int);
-COMMIT;
-INSERT INTO x1 VALUES (0,0),(1,1);
-COMMIT;
-DROP TABLE IF EXISTS x1;
-CREATE TABLE x1 (x1 int primary key, x2 int);
-SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
-START TRANSACTION;
-SELECT * FROM x1;
-INSERT INTO x1 VALUES (0,0);
-
---echo # Switch to connection conn1
-connection conn1;
-SET @@autocommit = 1;
-USE db62;
---send INSERT INTO x1 VALUES (1,1)
-
---echo # Switch to connection default
-connection default;
-INSERT INTO x1 VALUES (1,2);
-
---echo # Switch to connection conn1
-connection conn1;
---send INSERT INTO x1 VALUES (0,3)
-
---echo # Switch to connection default
-connection default;
-ROLLBACK;
-UPDATE x1 SET x1 = 1, x2 = 4;
-SELECT * FROM x1;
-
---echo # Switch to connection conn1
-connection conn1;
---send UPDATE x1 SET x1 = 0, x2 = 5
---send INSERT INTO x1 VALUES (0,6)
-
---echo # Switch to connection default
-connection default;
-ROLLBACK;
-
---echo # Switch to connection conn1
-connection conn1;
-INSERT INTO x1 VALUES (0,6);
---error ER_DUP_ENTRY
-INSERT INTO x1 VALUES (0,6);
-
---echo # Switch to connection default
-connection default;
-SELECT * FROM x1;
-
-# Final cleanup
-disconnect conn1;
-connection default;
-DROP DATABASE db62;
-USE test;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22207.test b/mysql-test/suite/falcon/t/falcon_bug_22207.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22207.test	2007-09-29 06:30:36 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,56 +0,0 @@
---source include/have_falcon.inc
-#
-# Record cache memory leak test inspired by Kevin.
-#
-# Note: Do not run in ramdisk!
-#   For Mantis bug #257, set the inner loop to 10 and the middle loop to 10,000.
-#   We set the middle loop to 500 to cope with run time on various Pushbuild machines.
-#
-SET STORAGE_ENGINE = 'Falcon';
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1 (c1 varchar(50), c2 int, c3 char(1));
-INSERT INTO t1 VALUES (repeat('A', 50), 0, 'A');
-INSERT INTO t1 VALUES (repeat('B', 50), 0, 'B');
-INSERT INTO t1 VALUES (repeat('C', 50), 0, 'C');
-#INSERT INTO t1 VALUES (repeat('D', 50), 0, 'D');
-#INSERT INTO t1 VALUES (repeat('E', 50), 0, 'E');
-#INSERT INTO t1 VALUES (repeat('F', 50), 0, 'F');
-#INSERT INTO t1 VALUES (repeat('G', 50), 0, 'G');
-#INSERT INTO t1 VALUES (repeat('H', 50), 0, 'H');
-#INSERT INTO t1 VALUES (repeat('I', 50), 0, 'I');
-COMMIT;
-
-# During this series of updates, there should be no increase in memory
-# since each previous record version should be freed once it is replaced.
-
-# Outer loop controls how many SELECTs are done.
-let $i= 10;
-while ($i) 
-{
-    # Next loop controls how often a COMMIT is done
-    --disable_query_log
-    let $j= 500;
-    while ($j) 
-    {
-        # Inner loop controls how many UPDATES are done.
-        BEGIN;
-        let $k= 10;
-        while ($k) 
-        {
-            UPDATE t1 SET c2 = c2 + 1, c1 = concat(rpad(conv(c2,10,10),10,'_'), repeat(c3, 40));
-            dec $k;
-        }
-        dec $j;
-        COMMIT;
-    }
-    --enable_query_log
-    SELECT c1 from t1;
-    dec $i;
-}
-
-
-# Final cleanup.
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_23692.test b/mysql-test/suite/falcon/t/falcon_bug_23692.test
--- a/mysql-test/suite/falcon/t/falcon_bug_23692.test	2007-09-29 06:30:37 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,47 +0,0 @@
---source include/have_falcon.inc
-SET @@storage_engine = Falcon;
-#
-# Bug #23692: Falcon: searches fail if data is 0x00
-#
---echo *** Bug #23692 ***
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
-DROP TABLE IF EXISTS t4;
---enable_warnings
-
-CREATE TABLE t1 (a char(1), key (a));
-INSERT INTO t1 VALUES (0x00);
-SELECT count(*) FROM t1 WHERE a < '';
-SELECT count(*) FROM t1 WHERE a = '';
-SELECT count(*) FROM t1 WHERE a > '';
-
-CREATE TABLE t2 (a varbinary(5));
-CREATE INDEX i ON t2 (a);
-INSERT INTO t2 VALUES (0x02), (0x0202);
-SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
-SELECT hex(a) FROM t2 WHERE a < 0x02;
-SELECT hex(a) FROM t2 WHERE a = 0x02;
-SELECT hex(a) FROM t2 WHERE a > 0x02;
-
-CREATE TABLE t3 (a char(5));
-CREATE INDEX i ON t3 (a);
-INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
-SELECT hex(a) FROM t3 WHERE a < 0x42;
-SELECT hex(a) FROM t3 WHERE a = 0x42;
-SELECT hex(a) FROM t3 WHERE a > 0x42;
-SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
-
-CREATE TABLE t4 (s1 varchar(5) character set ucs2, key(s1)) engine=falcon;
-INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
-SELECT hex(a) FROM t4 WHERE a < 'a';
-SELECT hex(a) FROM t4 WHERE a = 'a';
-SELECT hex(a) FROM t4 WHERE a > 'a';
-SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
-
-# Final cleanup.
-DROP TABLE t1;
-DROP TABLE t2;
-DROP TABLE t3;
-DROP TABLE t4;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_23945.test b/mysql-test/suite/falcon/t/falcon_bug_23945.test
--- a/mysql-test/suite/falcon/t/falcon_bug_23945.test	2007-09-20 17:43:30 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,31 +0,0 @@
-#
-# Bug #23945: crash during drop table, AUTOCOMMIT=0, CREATE TABLE .. AS SELECT
-#
---echo *** Bug #23945 ***
-
-
-# --source include/have_innodb.inc
-# SET STORAGE_ENGINE = InnoDB;
---source include/have_falcon.inc
-SET STORAGE_ENGINE = Falcon;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-SET AUTOCOMMIT = 1;
---error ER_DUP_ENTRY
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
---error ER_NO_SUCH_TABLE
-SELECT * FROM t1;
---error ER_BAD_TABLE_ERROR
-DROP TABLE t1;
-
-SET AUTOCOMMIT = 0;
---error ER_DUP_ENTRY
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
---error ER_NO_SUCH_TABLE
-SELECT * FROM t1;
-# Here comes a server crash.
---error ER_BAD_TABLE_ERROR
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_23962.test b/mysql-test/suite/falcon/t/falcon_bug_23962.test
--- a/mysql-test/suite/falcon/t/falcon_bug_23962.test	2007-09-29 06:30:37 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,18 +0,0 @@
---source include/have_falcon.inc
-SET STORAGE_ENGINE = Falcon;
-#
-# Bug #23962: Wrong results with > search
-#
---echo *** Bug #23962 ***
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1 (a char(5), KEY (a));
-INSERT INTO t1 VALUES ('a'), ('aa'), ('aaa'), ('abc'), ('bbb');
-
-SELECT * FROM t1 WHERE a > 'a'  ORDER BY a;
-SELECT * FROM t1 WHERE a > 'aa' ORDER BY a;
-
-# Final cleanup.
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_24024.test b/mysql-test/suite/falcon/t/falcon_bug_24024.test
--- a/mysql-test/suite/falcon/t/falcon_bug_24024.test	2007-09-20 17:43:31 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,36 +0,0 @@
-#
-# Bug#24024 wrong error message when drop table (used by pending transaction) fails
-#
-# This test is a derivate of a subtestcase in mix2.inc.
-# Therefore please delete this test when mix2_falcon is pushed.
-#
-
---echo *** Bug #24024 ***
-
-
---source include/have_falcon.inc
-SET SESSION STORAGE_ENGINE = Falcon;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-CREATE TABLE t1(a INT NOT NULL, b INT, primary key(a));
-INSERT INTO t1(a) VALUES (1);
-COMMIT;
-SET AUTOCOMMIT = 0;
-UPDATE t1 SET b = 5 WHERE a = 1;
---echo # Establish session con1 (user=root)
-connect (con1,localhost,root);
-INSERT INTO t1(a) VALUES(7);
-COMMIT;
-SELECT * FROM t1;
-
---disable_abort_on_error
-DROP TABLE t1;
-COMMIT;
-
---echo # Switch to session default and disconnect session con1
-connection default;
-disconnect con1;
-COMMIT;
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_26058.test b/mysql-test/suite/falcon/t/falcon_bug_26058.test
--- a/mysql-test/suite/falcon/t/falcon_bug_26058.test	2007-09-29 06:30:37 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,34 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #26058: Falcon: warnings with yen sign and overline in ujis
-#
---echo *** Bug #26058 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-SET NAMES utf8;
-CREATE TABLE t1 (a varchar(5) character set ujis);
-INSERT INTO t1 values ('¥'),('‾');
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1 WHERE a IS NOT NULL;
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_27997.test b/mysql-test/suite/falcon/t/falcon_bug_27997.test
--- a/mysql-test/suite/falcon/t/falcon_bug_27997.test	2007-10-05 14:21:27 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,47 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #27997: Falcon: unique violation after select for update
-#
---echo *** Bug #27997 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-SET @@autocommit = 0;
-CREATE TABLE t1 (a int, b int);
-CREATE UNIQUE INDEX i1 on t1 (a, b);
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-INSERT INTO t1 VALUES (5, NULL), (5, NULL);
-COMMIT;
-SELECT * FROM t1 FOR UPDATE;
---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-UPDATE t1 SET b = 2;
-COMMIT;
---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
-UPDATE t1 SET b = 2;
-COMMIT;
-UPDATE t1 SET a = 3, b = 2 WHERE a = 5 LIMIT 1;
-COMMIT;
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1;
-SELECT count(*) FROM t1 WHERE a = 5;
-SELECT count(*) FROM t1 WHERE a = 3;
-COMMIT;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_28006.test b/mysql-test/suite/falcon/t/falcon_bug_28006.test
--- a/mysql-test/suite/falcon/t/falcon_bug_28006.test	2007-09-29 06:30:37 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,63 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #28006: Falcon: isolation failed after alter
-# Note: related to Bug#15491 "ALTER TABLE violates REPEATABLE READ"
-#
---echo *** Bug #28006 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-SET @@tx_isolation = 'REPEATABLE-READ';
-SET @@autocommit = 0;
-CREATE TABLE t1 (a int);
-INSERT INTO t1 VALUES (1);
-COMMIT;
-
---echo # Establish connection conn1
-connect (conn1,localhost,root,,);
-eval SET storage_engine = $engine;
-SET @@tx_isolation = 'REPEATABLE-READ';
-SET @@autocommit = 0;
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
---echo # Switch to connection default
-connection default;
-BEGIN;
-SELECT * FROM t1;
-
---echo # Switch to connection conn1
-connection conn1;
-ALTER TABLE t1 ADD COLUMN b int;
-ALTER TABLE t1 DROP COLUMN a;
-
---echo # Switch to connection default
-connection default;
-SELECT * FROM t1;
-COMMIT;
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1;
-COMMIT;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
---echo # Switch to connection conn1
-connection conn1;
-COMMIT;
---echo # Switch to connection default
-connection default;
-disconnect conn1;
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_29246.test b/mysql-test/suite/falcon/t/falcon_bug_29246.test
--- a/mysql-test/suite/falcon/t/falcon_bug_29246.test	2007-09-29 06:30:38 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,34 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #29246: Falcon: searches fail if prefix index on latin1_german2_ci column
-#
---echo *** Bug #29246 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1 (a varchar(2) CHARACTER SET latin1 COLLATE latin1_german2_ci);
-INSERT INTO t1 VALUES (0xdc);
-CREATE INDEX i1 ON t1 (a(1));
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1 WHERE a = 'ue';
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_30282.test b/mysql-test/suite/falcon/t/falcon_bug_30282.test
--- a/mysql-test/suite/falcon/t/falcon_bug_30282.test	2007-09-29 06:30:38 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,37 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #30282: Falcon: duplicate-key error for value that ends with 0x00
-#
---echo *** Bug #30282 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1 (a char(1));
-INSERT INTO t1 VALUES (0x00);
-INSERT INTO t1 VALUES (0x20);
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-SELECT hex(a) FROM t1 WHERE a = 0x00;
-SELECT hex(a) FROM t1 WHERE a = 0x20;
-
-CREATE UNIQUE INDEX i1 ON t1 (a);
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) FROM t1;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_30480_A.test b/mysql-test/suite/falcon/t/falcon_bug_30480_A.test
--- a/mysql-test/suite/falcon/t/falcon_bug_30480_A.test	2007-09-29 06:30:38 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,45 +0,0 @@
---source include/have_falcon.inc
---disable_abort_on_error
-SET storage_engine = Falcon;
-#
-# Bug #30480: Falcon: searches fail if LIKE and key partition
-#
---echo *** Bug #30480 ***
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
-###########################################################################
-# Description:
-# create a Falcon table with a latin1 column with a default collation.
-# The table is partitioned and indexed.
-# search for LIKE 'A%'.
-# get no rows, even though I inserted 'AA'.
-#
-# The result is similar to Bug#28527
-# But Bug#28527 requires an ascii() function, which should soon be
-# illegal, so it will probably disappear. 
-# This is different: a key partition, no
-# ascii() function, a non-ASCII value, and a default collation.
-
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1);
-SET NAMES utf8;
-CREATE INDEX id on t1 (s1);
-INSERT INTO t1 VALUES (0x8e);
-INSERT INTO t1 VALUES ('AA');
-SELECT s1, HEX(s1) FROM t1;
-
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1) partition by key(s1);
-SET NAMES utf8;
-CREATE INDEX id on t2 (s1);
-INSERT INTO t2 VALUES (0x8e);
-INSERT INTO t2 VALUES ('AA');
-SELECT s1, HEX(s1) FROM t2;
-
-SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'A%';
-SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'A%';
-
-# Final cleanup.
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_30480_B.test b/mysql-test/suite/falcon/t/falcon_bug_30480_B.test
--- a/mysql-test/suite/falcon/t/falcon_bug_30480_B.test	2007-09-29 06:30:38 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,36 +0,0 @@
---source include/have_falcon.inc
---disable_abort_on_error
-SET storage_engine = Falcon;
-#
-# Bug #30480: Falcon: searches fail if LIKE and key partition
-#
---echo *** Bug #30480 ***
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
-###########################################################################
-# Here is another test case, this time with a ucs2 column.
-# Both selects should return 0x00c3.
-
-CREATE TABLE t1 (s1 varchar(5) CHARACTER SET ucs2);
-CREATE INDEX i1 on t1 (s1);
-INSERT INTO t1 VALUES ('c'),('c'),(0x00c3);
-SET NAMES utf8;
-SELECT s1, HEX(s1) FROM t1;
-SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'Ã%';
-SELECT s1, HEX(s1) FROM t1 WHERE s1 = 'Ã';
-
-CREATE TABLE t2 (s1 varchar(5) CHARACTER SET ucs2) partition by key(s1);
-CREATE INDEX i1 on t2 (s1);
-INSERT INTO t2 VALUES ('c'),('c'),(0x00c3);
-SET NAMES utf8;
-SELECT s1, HEX(s1) FROM t2;
-SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'Ã%';
-SELECT s1, HEX(s1) FROM t2 WHERE s1 = 'Ã';
-
-# Final cleanup.
-DROP TABLE t1;
-DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_30826.test b/mysql-test/suite/falcon/t/falcon_bug_30826.test
--- a/mysql-test/suite/falcon/t/falcon_bug_30826.test	2007-12-19 19:55:30 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,48 +0,0 @@
---source include/have_falcon.inc
---source include/have_partition.inc
-#
-# Bug #30826: Falcon: crash if OPTIMIZE PARTITION and no records
-#
---echo *** Bug #30826 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-SET @@storage_engine = Falcon;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-# ----------------------------------------------------- #
-# --- Test 1 - optimize with records                --- #
-# ----------------------------------------------------- #
---echo ------- Test 1 - optimize with records  -------
-CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
-   `id` BIGINT NOT NULL  AUTO_INCREMENT ,
-   `field1` CHAR(50) NOT NULL)ENGINE = FALCON
-   PARTITION BY Hash (id) PARTITIONS 4;
-
-INSERT INTO t1 (`id`, `field1`) VALUES('3','value3');
-INSERT INTO t1 (`id`, `field1`) VALUES('5','value5');
-INSERT INTO t1 (`id`, `field1`) VALUES('7','value7');
-
-ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
-
-# ----------------------------------------------------- #
-# --- Test 2 - optimize without records                --- #
-# ----------------------------------------------------- #
---echo ------- Test 2 - optimize without records ------
-DROP TABLE t1;
-CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
-   `id` BIGINT NOT NULL  AUTO_INCREMENT ,
-   `field1` CHAR(50) NOT NULL)ENGINE = FALCON
-   PARTITION BY Hash (id) PARTITIONS 4;
-
-# This caused Falcon to crash...
-ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_32413.test b/mysql-test/suite/falcon/t/falcon_bug_32413.test
--- a/mysql-test/suite/falcon/t/falcon_bug_32413.test	2008-02-26 00:01:52 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,98 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #32413: Memory usage not constrained by falcon_record_memory_max, assertion failure
-#
---echo *** Bug #32413 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-SELECT @@GLOBAL.falcon_record_memory_max INTO @previous_falcon_record_memory_max;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-# Set a very low record cache size.
-SET GLOBAL falcon_record_memory_max = 16 * 1024 * 1024;
-
-CREATE TABLE t1 (
-  a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
-  b INT,
-  c VARCHAR(200),
-  d VARCHAR(1000),
-  INDEX (b,c),
-  INDEX (d)
-);
-
-# Force record cache out-of-memory condition.
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
---error 1296
-INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
-
-# Try again with sufficient record cache.
-SET GLOBAL falcon_record_memory_max = 128 * 1024 * 1024;
-
-CREATE TABLE t2 (
-  a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
-  b INT,
-  c VARCHAR(200),
-  d VARCHAR(1000),
-  INDEX (b,c),
-  INDEX (d)
-);
-
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-SELECT count(*) from t1;
-SELECT count(*) from t2;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
-DROP TABLE t2;
-SET GLOBAL falcon_record_memory_max = @previous_falcon_record_memory_max;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34892.test b/mysql-test/suite/falcon/t/falcon_bug_34892.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34892.test	2008-03-06 18:31:20 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,37 +0,0 @@
---source include/have_falcon.inc
-#
-# Bug #34892: Some falcon tests fail sporadically
-#
---echo *** Bug #34892 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-SET @@autocommit = 0;
---error ER_DUP_ENTRY
-CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
-
-# This CREATE TABLE provokes a
-# 1005: Can't create table 'test.t1' (errno: 156).
-CREATE TABLE t1 (a int);
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-# Check is not applicable here.
-# SELECT count(*) FROM t1;
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_deadlock.test b/mysql-test/suite/falcon/t/falcon_deadlock.test
--- a/mysql-test/suite/falcon/t/falcon_deadlock.test	2008-01-31 01:07:50 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,168 +0,0 @@
--- source include/have_falcon.inc
--- source include/not_embedded.inc
-#
-# This test was derived from innodb_deadlock.test,
-# which sources in include/deadlock.inc.
-#
-# As Falcon has different behavior than InnoDB,
-# we rewrote the parts in question.
-#
-let $engine = Falcon;
-eval SET @@storage_engine = $engine;
-
---echo # Establish connection con1 (user=root)
-connect (con1,localhost,root,,);
-eval SET @@storage_engine = $engine;
-
---echo # Establish connection con2 (user=root)
-connect (con2,localhost,root,,);
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
-#
-# Testing of FOR UPDATE, first take.
-#
---echo # Switch to connection con1
-connection con1;
-CREATE TABLE t1 (
-  id integer,
-  x integer
-);
-
-INSERT INTO t1 VALUES (0, 0);
-SET @@autocommit = 0;
-SELECT * FROM t1 WHERE id = 0 FOR UPDATE;
-
---echo # Switch to connection con2
-connection con2;
-SET @@autocommit = 0;
-
-# The following query should hang because con1 is locking the record
---send UPDATE t1 SET x = 2 WHERE id = 0;
---real_sleep 2
-
---echo # Switch to connection con1
-connection con1;
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-COMMIT;
-
---echo # Switch to connection con2
-connection con2;
-# With Falcon we should get a
-# Record has changed since last read in table 't1' here.
---error ER_CHECKREAD
---reap
-ROLLBACK;
-
---echo # Switch to connection con1
-connection con1;
-SELECT * FROM t1;
-COMMIT;
-
-DROP TABLE t1;
-
-#
-# Testing of FOR UPDATE, second take.
-#
---echo # Switch to connection con1
-connection con1;
-CREATE TABLE t1 (
-  id integer,
-  x integer
-);
-
-CREATE TABLE t2 (
-  b integer,
-  a integer
-);
-
-INSERT INTO t1 VALUES (0, 0), (300, 300);
-INSERT INTO t2 VALUES (0, 10), (1, 20), (2, 30);
-COMMIT;
-
-SELECT * FROM t2;
-UPDATE t2 SET a = 100 WHERE b = (SELECT x FROM t1 WHERE id = b FOR UPDATE);
-SELECT * FROM t2;
-SELECT * FROM t1;
-
---echo # Switch to connection con2
-connection con2;
-
-# The following query should hang because con1 is locking the record
---send UPDATE t1 SET x = 2 WHERE id = 0;
---real_sleep 2
-
---echo # Switch to connection con1
-connection con1;
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-COMMIT;
-
---echo # Switch to connection con2
-connection con2;
---reap
-COMMIT;
-
---echo # Switch to connection con1
-connection con1;
-SELECT * FROM t1;
-COMMIT;
-
-DROP TABLE t1;
-DROP TABLE t2;
-
-CREATE TABLE t1 (
-  id integer,
-  x integer
-);
-
-CREATE TABLE t2 (
-  b integer,
-  a integer
-);
-
-INSERT INTO t1 VALUES (0, 0), (300, 300);
-INSERT INTO t2 VALUES (0, 0), (1, 20), (2, 30);
-COMMIT;
-
-SELECT a, b FROM t2 UNION SELECT id, x FROM t1 FOR UPDATE;
-SELECT * FROM t2;
-SELECT * FROM t1;
-
---echo # Switch to connection con2
-connection con2;
-
-# The following query should hang because con1 is locking the record
-UPDATE t2 SET a = 2 WHERE b = 0;
-SELECT * FROM t2;
---send UPDATE t1 SET x = 2 WHERE id = 0;
---real_sleep 2
-
---echo # Switch to connection con1
-connection con1;
-UPDATE t1 SET x = 1 WHERE id = 0;
-SELECT * FROM t1;
-COMMIT;
-
---echo # Switch to connection con2
-connection con2;
---reap
-COMMIT;
-
---echo # Switch to connection con1
-connection con1;
-SELECT * FROM t1;
-COMMIT;
-
-# Cleanup
---echo # Switch to connection default + disconnect con1 and con2
-connection default;
-disconnect con1;
-disconnect con2;
-DROP TABLE t1,
-DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/t/ps_8falcon.test b/mysql-test/suite/falcon/t/ps_8falcon.test
--- a/mysql-test/suite/falcon/t/ps_8falcon.test	2007-09-20 17:43:46 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,26 +0,0 @@
-###############################################
-#                                             #
-#  Prepared Statements test on Falcon tables  #
-#                                             #
-###############################################
-
-#    
-# NOTE: PLEASE SEE ps_1general.test (bottom) 
-#       BEFORE ADDING NEW TEST CASES HERE !!!
-
-use test;
-
--- source include/have_falcon.inc
-
-let $type= 'Falcon' ;
--- source include/ps_create.inc
--- source include/ps_renew.inc
-
--- source include/ps_query.inc
--- source include/ps_modify.inc
--- source include/ps_modify1.inc
--- source include/ps_conv.inc
-
-drop table t1, t9;
-
-# End of 4.1 tests
diff -Nrup a/mysql-test/suite/falcon/t/read_many_rows_falcon.test b/mysql-test/suite/falcon/t/read_many_rows_falcon.test
--- a/mysql-test/suite/falcon/t/read_many_rows_falcon.test	2007-09-20 17:43:46 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,15 +0,0 @@
-# t/read_many_rows_falcon.test
-#
-# Check how filesort and buffered-record-reads works with InnoDB.
-# This test takes a long time.
-#
-# Last update:
-# 2006-08-30 ML create this test
-#
-
-
---source include/have_falcon.inc
-let $engine_type= Falcon;
-let $other_engine_type= MyISAM;
-
---source include/read_many_rows.inc
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22165.result b/mysql-test/suite/falcon_team/r/falcon_bug_22165.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22165.result	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,35 @@
+*** Bug #22165 ***
+SET @@storage_engine = 'Falcon';
+DROP PROCEDURE IF EXISTS db1.p1;
+DROP EVENT IF EXISTS db1.e1;
+DROP EVENT IF EXISTS db1.e2;
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+USE db1;
+CREATE PROCEDURE p1 ()
+begin
+declare v int default 0;
+declare continue handler for sqlexception
+begin
+declare continue handler for sqlexception begin end;
+ALTER TABLE t1 MODIFY COLUMN c timestamp;
+end;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+while v < 10 do
+START TRANSACTION;
+INSERT INTO t1 (a, b) VALUES (v, 'a');
+UPDATE t1 SET c = current_timestamp WHERE a = v;
+COMMIT;
+SET v = v + 1;
+end while;
+end//
+CREATE TABLE t1 (a bigint, b varchar(1000), c timestamp);
+CREATE EVENT e1 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
+CREATE EVENT e2 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
+SET GLOBAL event_scheduler = 1;
+SET GLOBAL event_scheduler = 0;
+USE test;
+DROP EVENT db1.e1;
+DROP EVENT db1.e2;
+DROP PROCEDURE db1.p1;
+DROP DATABASE db1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22166.result b/mysql-test/suite/falcon_team/r/falcon_bug_22166.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22166.result	2008-04-20 01:01:14 +02:00
@@ -0,0 +1,11 @@
+*** Bug #22166 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t;
+DROP TABLE IF EXISTS T;
+CREATE TABLE t(id int);
+CREATE TABLE T(id int);
+SELECT count(*) FROM t;
+count(*)
+0
+DROP TABLE t;
+DROP TABLE T;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22169.result b/mysql-test/suite/falcon_team/r/falcon_bug_22169.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22169.result	2008-04-20 01:02:06 +02:00
@@ -0,0 +1,10 @@
+SET STORAGE_ENGINE='Falcon';
+*** Bug #22169 ***
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
+SELECT COUNT(*) FROM t1 order by id;
+COUNT(*)
+4181000
+SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
+DROP TABLE t1;
+set @@read_buffer_size=default;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22187.result b/mysql-test/suite/falcon_team/r/falcon_bug_22187.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22187.result	2008-04-20 01:02:47 +02:00
@@ -0,0 +1,21 @@
+SET STORAGE_ENGINE = Falcon;
+*** Bug #22187 ***
+DROP TABLE IF EXISTS child;
+DROP TABLE IF EXISTS parent;
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id));
+CREATE TABLE child (
+id INT, 
+parent_id INT,
+INDEX par_ind (parent_id),
+FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
+);
+SHOW CREATE TABLE child;
+Table	Create Table
+child	CREATE TABLE `child` (
+  `id` int(11) DEFAULT NULL,
+  `parent_id` int(11) DEFAULT NULL,
+  KEY `par_ind` (`parent_id`),
+  CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE CASCADE
+) ENGINE=Falcon DEFAULT CHARSET=latin1
+DROP TABLE child;
+DROP TABLE parent;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22189.result b/mysql-test/suite/falcon_team/r/falcon_bug_22189.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22189.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,53 @@
+SET @@storage_engine = Falcon;
+*** Bug #22189 ***
+DROP DATABASE IF EXISTS db62;
+# Establish connection conn1 (user = root)
+SET @@storage_engine = Falcon;
+# Switch to connection default
+SET @@autocommit = 0;
+CREATE DATABASE db62;
+USE db62;
+DROP TABLE IF EXISTS x1;
+Warnings:
+Note	1051	Unknown table 'x1'
+CREATE TABLE x1 (x1 int primary key, x2 int);
+COMMIT;
+INSERT INTO x1 VALUES (0,0),(1,1);
+COMMIT;
+DROP TABLE IF EXISTS x1;
+CREATE TABLE x1 (x1 int primary key, x2 int);
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+START TRANSACTION;
+SELECT * FROM x1;
+x1	x2
+INSERT INTO x1 VALUES (0,0);
+# Switch to connection conn1
+SET @@autocommit = 1;
+USE db62;
+INSERT INTO x1 VALUES (1,1);
+# Switch to connection default
+INSERT INTO x1 VALUES (1,2);
+# Switch to connection conn1
+INSERT INTO x1 VALUES (0,3);
+# Switch to connection default
+ROLLBACK;
+UPDATE x1 SET x1 = 1, x2 = 4;
+SELECT * FROM x1;
+x1	x2
+1	4
+# Switch to connection conn1
+UPDATE x1 SET x1 = 0, x2 = 5;
+INSERT INTO x1 VALUES (0,6);
+# Switch to connection default
+ROLLBACK;
+# Switch to connection conn1
+INSERT INTO x1 VALUES (0,6);
+INSERT INTO x1 VALUES (0,6);
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+# Switch to connection default
+SELECT * FROM x1;
+x1	x2
+0	3
+1	1
+DROP DATABASE db62;
+USE test;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_22207.result b/mysql-test/suite/falcon_team/r/falcon_bug_22207.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_22207.result	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,58 @@
+SET STORAGE_ENGINE = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (c1 varchar(50), c2 int, c3 char(1));
+INSERT INTO t1 VALUES (repeat('A', 50), 0, 'A');
+INSERT INTO t1 VALUES (repeat('B', 50), 0, 'B');
+INSERT INTO t1 VALUES (repeat('C', 50), 0, 'C');
+COMMIT;
+SELECT c1 from t1;
+c1
+5000______AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+5000______BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+5000______CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+10000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+10000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+10000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+15000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+15000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+15000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+20000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+20000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+20000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+25000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+25000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+25000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+30000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+30000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+30000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+35000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+35000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+35000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+40000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+40000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+40000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+45000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+45000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+45000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+SELECT c1 from t1;
+c1
+50000_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+50000_____BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
+50000_____CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_23692.result b/mysql-test/suite/falcon_team/r/falcon_bug_23692.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_23692.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,78 @@
+SET @@storage_engine = Falcon;
+*** Bug #23692 ***
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+CREATE TABLE t1 (a char(1), key (a));
+INSERT INTO t1 VALUES (0x00);
+SELECT count(*) FROM t1 WHERE a < '';
+count(*)
+1
+SELECT count(*) FROM t1 WHERE a = '';
+count(*)
+0
+SELECT count(*) FROM t1 WHERE a > '';
+count(*)
+0
+CREATE TABLE t2 (a varbinary(5));
+CREATE INDEX i ON t2 (a);
+INSERT INTO t2 VALUES (0x02), (0x0202);
+SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
+count(*)
+2
+SELECT hex(a) FROM t2 WHERE a < 0x02;
+hex(a)
+SELECT hex(a) FROM t2 WHERE a = 0x02;
+hex(a)
+02
+SELECT hex(a) FROM t2 WHERE a > 0x02;
+hex(a)
+0202
+CREATE TABLE t3 (a char(5));
+CREATE INDEX i ON t3 (a);
+INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
+SELECT hex(a) FROM t3 WHERE a < 0x42;
+hex(a)
+4200
+4209
+SELECT hex(a) FROM t3 WHERE a = 0x42;
+hex(a)
+42
+4220
+SELECT hex(a) FROM t3 WHERE a > 0x42;
+hex(a)
+4242
+SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
+hex(a)
+4200
+4209
+42
+4220
+4242
+CREATE TABLE t4 (s1 varchar(5) character set ucs2, key(s1)) engine=falcon;
+INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
+SELECT hex(a) FROM t4 WHERE a < 'a';
+hex(a)
+00420000
+00420009
+0042001f
+SELECT hex(a) FROM t4 WHERE a = 'a';
+hex(a)
+0042
+00400220
+SELECT hex(a) FROM t4 WHERE a > 'a';
+hex(a)
+00420042
+SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
+hex(a)
+00420000
+00420009
+0042001f
+0042
+00420020
+00420042
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_23945.result b/mysql-test/suite/falcon_team/r/falcon_bug_23945.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_23945.result	2008-04-20 01:50:54 +02:00
@@ -0,0 +1,17 @@
+*** Bug #23945 ***
+SET STORAGE_ENGINE = Falcon;
+DROP TABLE IF EXISTS t1;
+SET AUTOCOMMIT = 1;
+CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * FROM t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+DROP TABLE t1;
+ERROR 42S02: Unknown table 't1'
+SET AUTOCOMMIT = 0;
+CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * FROM t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+DROP TABLE t1;
+ERROR 42S02: Unknown table 't1'
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_23962.result b/mysql-test/suite/falcon_team/r/falcon_bug_23962.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_23962.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,17 @@
+SET STORAGE_ENGINE = Falcon;
+*** Bug #23962 ***
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a char(5), KEY (a));
+INSERT INTO t1 VALUES ('a'), ('aa'), ('aaa'), ('abc'), ('bbb');
+SELECT * FROM t1 WHERE a > 'a'  ORDER BY a;
+a
+aa
+aaa
+abc
+bbb
+SELECT * FROM t1 WHERE a > 'aa' ORDER BY a;
+a
+aaa
+abc
+bbb
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_24024.result b/mysql-test/suite/falcon_team/r/falcon_bug_24024.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_24024.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,23 @@
+*** Bug #24024 ***
+SET SESSION STORAGE_ENGINE = Falcon;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT NOT NULL, b INT, primary key(a));
+INSERT INTO t1(a) VALUES (1);
+COMMIT;
+SET AUTOCOMMIT = 0;
+UPDATE t1 SET b = 5 WHERE a = 1;
+# Establish session con1 (user=root)
+INSERT INTO t1(a) VALUES(7);
+COMMIT;
+SELECT * FROM t1;
+a	b
+1	NULL
+7	NULL
+DROP TABLE t1;
+!!! Error message has to be decided.
+!!! Something like "Cannot drop locked table" or similar would be fine.
+!!! But never the misleading    ERROR 42S02: Unknown table 't1'
+COMMIT;
+# Switch to session default and disconnect session con1
+COMMIT;
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_26058.result b/mysql-test/suite/falcon_team/r/falcon_bug_26058.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_26058.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,13 @@
+*** Bug #26058 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+SET NAMES utf8;
+CREATE TABLE t1 (a varchar(5) character set ujis);
+INSERT INTO t1 values ('¥'),('‾');
+SELECT count(*) FROM t1 WHERE a IS NOT NULL;
+count(*)
+2
+SELECT count(*) FROM t1;
+count(*)
+2
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_27997.result b/mysql-test/suite/falcon_team/r/falcon_bug_27997.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_27997.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,31 @@
+*** Bug #27997 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+SET @@autocommit = 0;
+CREATE TABLE t1 (a int, b int);
+CREATE UNIQUE INDEX i1 on t1 (a, b);
+INSERT INTO t1 VALUES (5, NULL), (5, NULL);
+COMMIT;
+SELECT * FROM t1 FOR UPDATE;
+a	b
+5	NULL
+5	NULL
+UPDATE t1 SET b = 2;
+ERROR 23000: Duplicate entry '5-2' for key 'i1'
+COMMIT;
+UPDATE t1 SET b = 2;
+ERROR 23000: Duplicate entry '5-2' for key 'i1'
+COMMIT;
+UPDATE t1 SET a = 3, b = 2 WHERE a = 5 LIMIT 1;
+COMMIT;
+SELECT count(*) FROM t1;
+count(*)
+2
+SELECT count(*) FROM t1 WHERE a = 5;
+count(*)
+1
+SELECT count(*) FROM t1 WHERE a = 3;
+count(*)
+1
+COMMIT;
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_28006.result b/mysql-test/suite/falcon_team/r/falcon_bug_28006.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_28006.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,33 @@
+*** Bug #28006 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+SET @@tx_isolation = 'REPEATABLE-READ';
+SET @@autocommit = 0;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1);
+COMMIT;
+# Establish connection conn1
+SET storage_engine = 'Falcon';
+SET @@tx_isolation = 'REPEATABLE-READ';
+SET @@autocommit = 0;
+# Switch to connection default
+BEGIN;
+SELECT * FROM t1;
+a
+1
+# Switch to connection conn1
+ALTER TABLE t1 ADD COLUMN b int;
+ALTER TABLE t1 DROP COLUMN a;
+# Switch to connection default
+SELECT * FROM t1;
+a
+1
+COMMIT;
+SELECT count(*) FROM t1;
+count(*)
+1
+COMMIT;
+# Switch to connection conn1
+COMMIT;
+# Switch to connection default
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_29246.result b/mysql-test/suite/falcon_team/r/falcon_bug_29246.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_29246.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,13 @@
+*** Bug #29246 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a varchar(2) CHARACTER SET latin1 COLLATE latin1_german2_ci);
+INSERT INTO t1 VALUES (0xdc);
+CREATE INDEX i1 ON t1 (a(1));
+SELECT count(*) FROM t1 WHERE a = 'ue';
+count(*)
+1
+SELECT count(*) FROM t1;
+count(*)
+1
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_30282.result b/mysql-test/suite/falcon_team/r/falcon_bug_30282.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_30282.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,17 @@
+*** Bug #30282 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a char(1));
+INSERT INTO t1 VALUES (0x00);
+INSERT INTO t1 VALUES (0x20);
+SELECT hex(a) FROM t1 WHERE a = 0x00;
+hex(a)
+00
+SELECT hex(a) FROM t1 WHERE a = 0x20;
+hex(a)
+
+CREATE UNIQUE INDEX i1 ON t1 (a);
+SELECT count(*) FROM t1;
+count(*)
+2
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result b/mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_30480_A.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,28 @@
+SET storage_engine = Falcon;
+*** Bug #30480 ***
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+CREATE TABLE t1 (s1 varchar(5) CHARACTER SET latin1);
+SET NAMES utf8;
+CREATE INDEX id on t1 (s1);
+INSERT INTO t1 VALUES (0x8e);
+INSERT INTO t1 VALUES ('AA');
+SELECT s1, HEX(s1) FROM t1;
+s1	HEX(s1)
+Ž	8E
+AA	4141
+CREATE TABLE t2 (s1 varchar(5) CHARACTER SET latin1) partition by key(s1);
+SET NAMES utf8;
+CREATE INDEX id on t2 (s1);
+INSERT INTO t2 VALUES (0x8e);
+INSERT INTO t2 VALUES ('AA');
+SELECT s1, HEX(s1) FROM t2;
+s1	HEX(s1)
+Ž	8E
+AA	4141
+SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'A%';
+s1	HEX(s1)
+AA	4141
+SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'A%';
+s1	HEX(s1)
+AA	4141
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_30480_B.result b/mysql-test/suite/falcon_team/r/falcon_bug_30480_B.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_30480_B.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,36 @@
+SET storage_engine = Falcon;
+*** Bug #30480 ***
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+CREATE TABLE t1 (s1 varchar(5) CHARACTER SET ucs2);
+CREATE INDEX i1 on t1 (s1);
+INSERT INTO t1 VALUES ('c'),('c'),(0x00c3);
+SET NAMES utf8;
+SELECT s1, HEX(s1) FROM t1;
+s1	HEX(s1)
+c	0063
+c	0063
+Ã	00C3
+SELECT s1, HEX(s1) FROM t1 WHERE s1 like 'Ã%';
+s1	HEX(s1)
+Ã	00C3
+SELECT s1, HEX(s1) FROM t1 WHERE s1 = 'Ã';
+s1	HEX(s1)
+Ã	00C3
+CREATE TABLE t2 (s1 varchar(5) CHARACTER SET ucs2) partition by key(s1);
+CREATE INDEX i1 on t2 (s1);
+INSERT INTO t2 VALUES ('c'),('c'),(0x00c3);
+SET NAMES utf8;
+SELECT s1, HEX(s1) FROM t2;
+s1	HEX(s1)
+c	0063
+c	0063
+Ã	00C3
+SELECT s1, HEX(s1) FROM t2 WHERE s1 like 'Ã%';
+s1	HEX(s1)
+Ã	00C3
+SELECT s1, HEX(s1) FROM t2 WHERE s1 = 'Ã';
+s1	HEX(s1)
+Ã	00C3
+DROP TABLE t1;
+DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_30826.result b/mysql-test/suite/falcon_team/r/falcon_bug_30826.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_30826.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,20 @@
+*** Bug #30826 ***
+SET @@storage_engine = Falcon;
+DROP TABLE IF EXISTS t1;
+------- Test 1 - optimize with records  -------
+CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
+`id` BIGINT NOT NULL  AUTO_INCREMENT ,
+`field1` CHAR(50) NOT NULL)ENGINE = FALCON
+PARTITION BY Hash (id) PARTITIONS 4;
+INSERT INTO t1 (`id`, `field1`) VALUES('3','value3');
+INSERT INTO t1 (`id`, `field1`) VALUES('5','value5');
+INSERT INTO t1 (`id`, `field1`) VALUES('7','value7');
+ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
+------- Test 2 - optimize without records ------
+DROP TABLE t1;
+CREATE TABLE  t1 (PRIMARY KEY  (`id`), 
+`id` BIGINT NOT NULL  AUTO_INCREMENT ,
+`field1` CHAR(50) NOT NULL)ENGINE = FALCON
+PARTITION BY Hash (id) PARTITIONS 4;
+ALTER TABLE t1 OPTIMIZE PARTITION `p1`;
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_32413.result b/mysql-test/suite/falcon_team/r/falcon_bug_32413.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_32413.result	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,70 @@
+*** Bug #32413 ***
+SET @@storage_engine = 'Falcon';
+SELECT @@GLOBAL.falcon_record_memory_max INTO @previous_falcon_record_memory_max;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+SET GLOBAL falcon_record_memory_max = 16 * 1024 * 1024;
+CREATE TABLE t1 (
+a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+b INT,
+c VARCHAR(200),
+d VARCHAR(1000),
+INDEX (b,c),
+INDEX (d)
+);
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+INSERT INTO t1 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t1;
+ERROR HY000: Got error 305 'record memory is exhausted' from Falcon
+SET GLOBAL falcon_record_memory_max = 128 * 1024 * 1024;
+CREATE TABLE t2 (
+a INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+b INT,
+c VARCHAR(200),
+d VARCHAR(1000),
+INDEX (b,c),
+INDEX (d)
+);
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF'));
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+INSERT INTO t2 SELECT NULL, 12345, SHA('12345'), CONCAT(SHA('12345'), SHA('ABCDEF')) FROM t2;
+SELECT count(*) from t1;
+count(*)
+65536
+SELECT count(*) from t2;
+count(*)
+262144
+DROP TABLE t1;
+DROP TABLE t2;
+SET GLOBAL falcon_record_memory_max = @previous_falcon_record_memory_max;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_bug_34892.result b/mysql-test/suite/falcon_team/r/falcon_bug_34892.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_bug_34892.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,8 @@
+*** Bug #34892 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+SET @@autocommit = 0;
+CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+CREATE TABLE t1 (a int);
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/r/falcon_deadlock.result b/mysql-test/suite/falcon_team/r/falcon_deadlock.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/falcon_deadlock.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,130 @@
+# Establish connection con1 (user=root)
+# Establish connection con2 (user=root)
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+# Switch to connection con1
+CREATE TABLE t1 (
+id integer,
+x integer
+);
+INSERT INTO t1 VALUES (0, 0);
+SET @@autocommit = 0;
+SELECT * FROM t1 WHERE id = 0 FOR UPDATE;
+id	x
+0	0
+# Switch to connection con2
+SET @@autocommit = 0;
+UPDATE t1 SET x = 2 WHERE id = 0;
+# Switch to connection con1
+UPDATE t1 SET x = 1 WHERE id = 0;
+SELECT * FROM t1;
+id	x
+0	1
+COMMIT;
+# Switch to connection con2
+COMMIT;
+# Switch to connection con1
+SELECT * FROM t1;
+id	x
+0	2
+COMMIT;
+DROP TABLE t1;
+# Switch to connection con1
+CREATE TABLE t1 (
+id integer,
+x integer
+);
+CREATE TABLE t2 (
+b integer,
+a integer
+);
+INSERT INTO t1 VALUES (0, 0), (300, 300);
+INSERT INTO t2 VALUES (0, 10), (1, 20), (2, 30);
+COMMIT;
+SELECT * FROM t2;
+b	a
+0	10
+1	20
+2	30
+UPDATE t2 SET a = 100 WHERE b = (SELECT x FROM t1 WHERE id = b FOR UPDATE);
+SELECT * FROM t2;
+b	a
+0	100
+1	20
+2	30
+SELECT * FROM t1;
+id	x
+0	0
+300	300
+# Switch to connection con2
+UPDATE t1 SET x = 2 WHERE id = 0;
+# Switch to connection con1
+UPDATE t1 SET x = 1 WHERE id = 0;
+SELECT * FROM t1;
+id	x
+0	1
+300	300
+COMMIT;
+# Switch to connection con2
+COMMIT;
+# Switch to connection con1
+SELECT * FROM t1;
+id	x
+0	2
+300	300
+COMMIT;
+DROP TABLE t1;
+DROP TABLE t2;
+CREATE TABLE t1 (
+id integer,
+x integer
+);
+CREATE TABLE t2 (
+b integer,
+a integer
+);
+INSERT INTO t1 VALUES (0, 0), (300, 300);
+INSERT INTO t2 VALUES (0, 0), (1, 20), (2, 30);
+COMMIT;
+# Switch to connection con1
+SELECT a, b FROM t2 UNION SELECT id, x FROM t1 FOR UPDATE;
+a	b
+0	0
+20	1
+30	2
+300	300
+SELECT * FROM t2;
+b	a
+0	0
+1	20
+2	30
+SELECT * FROM t1;
+id	x
+0	0
+300	300
+# Switch to connection con2
+UPDATE t2 SET a = 2 WHERE b = 0;
+SELECT * FROM t2;
+b	a
+0	2
+1	20
+2	30
+UPDATE t1 SET x = 2 WHERE id = 0;
+# Switch to connection con1
+UPDATE t1 SET x = 1 WHERE id = 0;
+SELECT * FROM t1;
+id	x
+0	1
+300	300
+COMMIT;
+# Switch to connection con2
+COMMIT;
+# Switch to connection con1
+SELECT * FROM t1;
+id	x
+0	2
+300	300
+COMMIT;
+# Switch to connection default + disconnect con1 and con2
+DROP TABLE t1;
+DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon_team/r/ps_8falcon.result b/mysql-test/suite/falcon_team/r/ps_8falcon.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/ps_8falcon.result	2008-04-20 01:07:39 +02:00
@@ -0,0 +1,3128 @@
+use test;
+drop table if exists t1, t9 ;
+create table t1
+(
+a int, b varchar(30),
+primary key(a)
+) engine = 'Falcon'  ;
+create table t9 
+(
+c1  tinyint, c2  smallint, c3  mediumint, c4  int,
+c5  integer, c6  bigint, c7  float, c8  double,
+c9  double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
+c13 date, c14 datetime, c15 timestamp, c16 time,
+c17 year, c18 tinyint, c19 bool, c20 char,
+c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
+c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
+c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
+c32 set('monday', 'tuesday', 'wednesday'),
+primary key(c1)
+) engine = 'Falcon'  ;
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+test_sequence
+------ simple select tests ------
+prepare stmt1 from ' select * from t9 order by c1 ' ;
+execute stmt1;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def	test	t9	t9	c1	c1	1	4	1	N	49155	0	63
+def	test	t9	t9	c2	c2	2	6	1	Y	32768	0	63
+def	test	t9	t9	c3	c3	9	9	1	Y	32768	0	63
+def	test	t9	t9	c4	c4	3	11	1	Y	32768	0	63
+def	test	t9	t9	c5	c5	3	11	1	Y	32768	0	63
+def	test	t9	t9	c6	c6	8	20	1	Y	32768	0	63
+def	test	t9	t9	c7	c7	4	12	1	Y	32768	31	63
+def	test	t9	t9	c8	c8	5	22	1	Y	32768	31	63
+def	test	t9	t9	c9	c9	5	22	1	Y	32768	31	63
+def	test	t9	t9	c10	c10	5	22	1	Y	32768	31	63
+def	test	t9	t9	c11	c11	246	9	6	Y	0	4	63
+def	test	t9	t9	c12	c12	246	10	6	Y	0	4	63
+def	test	t9	t9	c13	c13	10	10	10	Y	128	0	63
+def	test	t9	t9	c14	c14	12	19	19	Y	128	0	63
+def	test	t9	t9	c15	c15	7	19	19	N	9441	0	63
+def	test	t9	t9	c16	c16	11	8	8	Y	128	0	63
+def	test	t9	t9	c17	c17	13	4	4	Y	32864	0	63
+def	test	t9	t9	c18	c18	1	4	1	Y	32768	0	63
+def	test	t9	t9	c19	c19	1	1	1	Y	32768	0	63
+def	test	t9	t9	c20	c20	254	1	1	Y	0	0	8
+def	test	t9	t9	c21	c21	254	10	10	Y	0	0	8
+def	test	t9	t9	c22	c22	253	30	30	Y	0	0	8
+def	test	t9	t9	c23	c23	252	255	8	Y	144	0	63
+def	test	t9	t9	c24	c24	252	255	8	Y	16	0	8
+def	test	t9	t9	c25	c25	252	65535	4	Y	144	0	63
+def	test	t9	t9	c26	c26	252	65535	4	Y	16	0	8
+def	test	t9	t9	c27	c27	252	16777215	10	Y	144	0	63
+def	test	t9	t9	c28	c28	252	16777215	10	Y	16	0	8
+def	test	t9	t9	c29	c29	252	4294967295	8	Y	144	0	63
+def	test	t9	t9	c30	c30	252	4294967295	8	Y	16	0	8
+def	test	t9	t9	c31	c31	254	5	3	Y	256	0	8
+def	test	t9	t9	c32	c32	254	24	7	Y	2048	0	8
+c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+9	9	9	9	9	9	9	9	9	9	9.0000	9.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	0	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	two	tuesday
+set @arg00='SELECT' ;
+@arg00 a from t1 where a=1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1
+prepare stmt1 from ' ? a from t1 where a=1 ';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1
+set @arg00=1 ;
+select @arg00, b from t1 where a=1 ;
+@arg00	b
+1	one
+prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+?	b
+1	one
+set @arg00='lion' ;
+select @arg00, b from t1 where a=1 ;
+@arg00	b
+lion	one
+prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+?	b
+lion	one
+set @arg00=NULL ;
+select @arg00, b from t1 where a=1 ;
+@arg00	b
+NULL	one
+prepare stmt1 from ' select ?, b from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+?	b
+NULL	one
+set @arg00=1 ;
+select b, a - @arg00 from t1 where a=1 ;
+b	a - @arg00
+one	0
+prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+b	a - ?
+one	0
+set @arg00=null ;
+select @arg00 as my_col ;
+my_col
+NULL
+prepare stmt1 from ' select ? as my_col';
+execute stmt1 using @arg00 ;
+my_col
+NULL
+select @arg00 + 1 as my_col ;
+my_col
+NULL
+prepare stmt1 from ' select ? + 1 as my_col';
+execute stmt1 using @arg00 ;
+my_col
+NULL
+select 1 + @arg00 as my_col ;
+my_col
+NULL
+prepare stmt1 from ' select 1 + ? as my_col';
+execute stmt1 using @arg00 ;
+my_col
+NULL
+set @arg00='MySQL' ;
+select substr(@arg00,1,2) from t1 where a=1 ;
+substr(@arg00,1,2)
+My
+prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+substr(?,1,2)
+My
+set @arg00=3 ;
+select substr('MySQL',@arg00,5) from t1 where a=1 ;
+substr('MySQL',@arg00,5)
+SQL
+prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+substr('MySQL',?,5)
+SQL
+select substr('MySQL',1,@arg00) from t1 where a=1 ;
+substr('MySQL',1,@arg00)
+MyS
+prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ;
+execute stmt1 using @arg00 ;
+substr('MySQL',1,?)
+MyS
+set @arg00='MySQL' ;
+select a , concat(@arg00,b) from t1 order by a;
+a	concat(@arg00,b)
+1	MySQLone
+2	MySQLtwo
+3	MySQLthree
+4	MySQLfour
+prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ;
+execute stmt1 using @arg00;
+a	concat(?,b)
+1	MySQLone
+2	MySQLtwo
+3	MySQLthree
+4	MySQLfour
+select a , concat(b,@arg00) from t1 order by a ;
+a	concat(b,@arg00)
+1	oneMySQL
+2	twoMySQL
+3	threeMySQL
+4	fourMySQL
+prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ;
+execute stmt1 using @arg00;
+a	concat(b,?)
+1	oneMySQL
+2	twoMySQL
+3	threeMySQL
+4	fourMySQL
+set @arg00='MySQL' ;
+select group_concat(@arg00,b order by a) from t1 
+group by 'a' ;
+group_concat(@arg00,b order by a)
+MySQLone,MySQLtwo,MySQLthree,MySQLfour
+prepare stmt1 from ' select group_concat(?,b order by a) from t1
+group by ''a'' ' ;
+execute stmt1 using @arg00;
+group_concat(?,b order by a)
+MySQLone,MySQLtwo,MySQLthree,MySQLfour
+select group_concat(b,@arg00 order by a) from t1 
+group by 'a' ;
+group_concat(b,@arg00 order by a)
+oneMySQL,twoMySQL,threeMySQL,fourMySQL
+prepare stmt1 from ' select group_concat(b,? order by a) from t1
+group by ''a'' ' ;
+execute stmt1 using @arg00;
+group_concat(b,? order by a)
+oneMySQL,twoMySQL,threeMySQL,fourMySQL
+set @arg00='first' ;
+set @arg01='second' ;
+set @arg02=NULL;
+select @arg00, @arg01 from t1 where a=1 ;
+@arg00	@arg01
+first	second
+prepare stmt1 from ' select ?, ? from t1 where a=1 ' ;
+execute stmt1 using @arg00, @arg01 ;
+?	?
+first	second
+execute stmt1 using @arg02, @arg01 ;
+?	?
+NULL	second
+execute stmt1 using @arg00, @arg02 ;
+?	?
+first	NULL
+execute stmt1 using @arg02, @arg02 ;
+?	?
+NULL	NULL
+drop table if exists t5 ;
+create table t5 (id1 int(11) not null default '0',
+value2 varchar(100), value1 varchar(100)) ;
+insert into t5 values (1,'hh','hh'),(2,'hh','hh'),
+(1,'ii','ii'),(2,'ii','ii') ;
+prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ;
+set @arg00=1 ;
+set @arg01='hh' ;
+execute stmt1 using @arg00, @arg01 ;
+id1	value1
+1	hh
+1	ii
+2	hh
+drop table t5 ;
+drop table if exists t5 ;
+create table t5(session_id  char(9) not null) ;
+insert into t5 values ('abc') ;
+prepare stmt1 from ' select * from t5
+where ?=''1111'' and session_id = ''abc'' ' ;
+set @arg00='abc' ;
+execute stmt1 using @arg00 ;
+session_id
+set @arg00='1111' ;
+execute stmt1 using @arg00 ;
+session_id
+abc
+set @arg00='abc' ;
+execute stmt1 using @arg00 ;
+session_id
+drop table t5 ;
+set @arg00='FROM' ;
+select a @arg00 t1 where a=1 ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1
+prepare stmt1 from ' select a ? t1 where a=1 ' ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1
+set @arg00='t1' ;
+select a from @arg00 where a=1 ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1
+prepare stmt1 from ' select a from ? where a=1 ' ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1
+set @arg00='WHERE' ;
+select a from t1 @arg00 a=1 ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1
+prepare stmt1 from ' select a from t1 ? a=1 ' ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1
+set @arg00=1 ;
+select a FROM t1 where a=@arg00 ;
+a
+1
+prepare stmt1 from ' select a FROM t1 where a=? ' ;
+execute stmt1 using @arg00 ;
+a
+1
+set @arg00=1000 ;
+execute stmt1 using @arg00 ;
+a
+set @arg00=NULL ;
+select a FROM t1 where a=@arg00 ;
+a
+prepare stmt1 from ' select a FROM t1 where a=? ' ;
+execute stmt1 using @arg00 ;
+a
+set @arg00=4 ;
+select a FROM t1 where a=sqrt(@arg00) ;
+a
+2
+prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ;
+execute stmt1 using @arg00 ;
+a
+2
+set @arg00=NULL ;
+select a FROM t1 where a=sqrt(@arg00) ;
+a
+prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ;
+execute stmt1 using @arg00 ;
+a
+set @arg00=2 ;
+set @arg01=3 ;
+select a FROM t1 where a in (@arg00,@arg01) order by a;
+a
+2
+3
+prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a ';
+execute stmt1 using @arg00, @arg01;
+a
+2
+3
+set @arg00= 'one' ;
+set @arg01= 'two' ;
+set @arg02= 'five' ;
+prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
+execute stmt1 using @arg00, @arg01, @arg02 ;
+b
+one
+two
+prepare stmt1 from ' select b FROM t1 where b like ? ';
+set @arg00='two' ;
+execute stmt1 using @arg00 ;
+b
+two
+set @arg00='tw%' ;
+execute stmt1 using @arg00 ;
+b
+two
+set @arg00='%wo' ;
+execute stmt1 using @arg00 ;
+b
+two
+set @arg00=null ;
+insert into t9 set c1= 0, c5 = NULL ;
+select c5 from t9 where c5 > NULL ;
+c5
+prepare stmt1 from ' select c5 from t9 where c5 > ? ';
+execute stmt1 using @arg00 ;
+c5
+select c5 from t9 where c5 < NULL ;
+c5
+prepare stmt1 from ' select c5 from t9 where c5 < ? ';
+execute stmt1 using @arg00 ;
+c5
+select c5 from t9 where c5 = NULL ;
+c5
+prepare stmt1 from ' select c5 from t9 where c5 = ? ';
+execute stmt1 using @arg00 ;
+c5
+select c5 from t9 where c5 <=> NULL ;
+c5
+NULL
+prepare stmt1 from ' select c5 from t9 where c5 <=> ? ';
+execute stmt1 using @arg00 ;
+c5
+NULL
+delete from t9 where c1= 0 ;
+set @arg00='>' ;
+select a FROM t1 where a @arg00 1 ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1
+prepare stmt1 from ' select a FROM t1 where a ? 1 ' ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1
+set @arg00=1 ;
+select a,b FROM t1 where a is not NULL
+AND b is not NULL group by a - @arg00 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+prepare stmt1 from ' select a,b FROM t1 where a is not NULL
+AND b is not NULL group by a - ? ' ;
+execute stmt1 using @arg00 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+set @arg00='two' ;
+select a,b FROM t1 where a is not NULL
+AND b is not NULL having b <> @arg00 order by a ;
+a	b
+1	one
+3	three
+4	four
+prepare stmt1 from ' select a,b FROM t1 where a is not NULL
+AND b is not NULL having b <> ? order by a ' ;
+execute stmt1 using @arg00 ;
+a	b
+1	one
+3	three
+4	four
+set @arg00=1 ;
+select a,b FROM t1 where a is not NULL
+AND b is not NULL order by a - @arg00 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+prepare stmt1 from ' select a,b FROM t1 where a is not NULL
+AND b is not NULL order by a - ? ' ;
+execute stmt1 using @arg00 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+set @arg00=2 ;
+select a,b from t1 order by 2 ;
+a	b
+4	four
+1	one
+3	three
+2	two
+prepare stmt1 from ' select a,b from t1
+order by ? ';
+execute stmt1 using @arg00;
+a	b
+4	four
+1	one
+3	three
+2	two
+set @arg00=1 ;
+execute stmt1 using @arg00;
+a	b
+1	one
+2	two
+3	three
+4	four
+set @arg00=0 ;
+execute stmt1 using @arg00;
+ERROR 42S22: Unknown column '?' in 'order clause'
+set @arg00=1;
+prepare stmt1 from ' select a,b from t1 order by a
+limit 1 ';
+execute stmt1 ;
+a	b
+1	one
+prepare stmt1 from ' select a,b from t1 order by a limit ? ';
+execute stmt1 using @arg00;
+a	b
+1	one
+set @arg00='b' ;
+set @arg01=0 ;
+set @arg02=2 ;
+set @arg03=2 ;
+select sum(a), @arg00 from t1 where a > @arg01
+and b is not null group by substr(b,@arg02)
+having sum(a) <> @arg03 ;
+sum(a)	@arg00
+3	b
+1	b
+4	b
+prepare stmt1 from ' select sum(a), ? from t1 where a > ?
+and b is not null group by substr(b,?)
+having sum(a) <> ? ';
+execute stmt1 using @arg00, @arg01, @arg02, @arg03;
+sum(a)	?
+3	b
+1	b
+4	b
+test_sequence
+------ join tests ------
+select first.a as a1, second.a as a2 
+from t1 first, t1 second
+where first.a = second.a order by a1 ;
+a1	a2
+1	1
+2	2
+3	3
+4	4
+prepare stmt1 from ' select first.a as a1, second.a as a2 
+        from t1 first, t1 second
+        where first.a = second.a order by a1 ';
+execute stmt1 ;
+a1	a2
+1	1
+2	2
+3	3
+4	4
+set @arg00='ABC';
+set @arg01='two';
+set @arg02='one';
+select first.a, @arg00, second.a FROM t1 first, t1 second
+where @arg01 = first.b or first.a = second.a or second.b = @arg02
+order by second.a, first.a;
+a	@arg00	a
+1	ABC	1
+2	ABC	1
+3	ABC	1
+4	ABC	1
+2	ABC	2
+2	ABC	3
+3	ABC	3
+2	ABC	4
+4	ABC	4
+prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second
+                    where ? = first.b or first.a = second.a or second.b = ?
+                    order by second.a, first.a';
+execute stmt1 using @arg00, @arg01, @arg02;
+a	?	a
+1	ABC	1
+2	ABC	1
+3	ABC	1
+4	ABC	1
+2	ABC	2
+2	ABC	3
+3	ABC	3
+2	ABC	4
+4	ABC	4
+drop table if exists t2 ;
+create table t2 as select * from t1 ;
+set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+the join statement is:
+SELECT * FROM t2 right join t1 using(a) order by t2.a 
+prepare stmt1 from @query9  ;
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+the join statement is:
+SELECT * FROM t2 natural right join t1 order by t2.a 
+prepare stmt1 from @query8 ;
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+the join statement is:
+SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
+prepare stmt1 from @query7 ;
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+the join statement is:
+SELECT * FROM t2 left join t1 using(a) order by t2.a 
+prepare stmt1 from @query6 ;
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+the join statement is:
+SELECT * FROM t2 natural left join t1 order by t2.a 
+prepare stmt1 from @query5 ;
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+the join statement is:
+SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
+prepare stmt1 from @query4 ;
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+the join statement is:
+SELECT * FROM t2 join t1 using(a) order by t2.a 
+prepare stmt1 from @query3 ;
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+the join statement is:
+SELECT * FROM t2 natural join t1 order by t2.a 
+prepare stmt1 from @query2 ;
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+the join statement is:
+SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a 
+prepare stmt1 from @query1 ;
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+execute stmt1 ;
+a	b	a	b
+1	one	1	one
+2	two	2	two
+3	three	3	three
+4	four	4	four
+drop table t2 ;
+test_sequence
+------ subquery tests ------
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where b = ''two'') ';
+execute stmt1 ;
+a	b
+2	two
+set @arg00='two' ;
+select a, b FROM t1 outer_table where
+a = (select a from t1 where b = 'two' ) and b=@arg00 ;
+a	b
+2	two
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where b = ''two'') and b=? ';
+execute stmt1 using @arg00;
+a	b
+2	two
+set @arg00='two' ;
+select a, b FROM t1 outer_table where
+a = (select a from t1 where b = @arg00 ) and b='two' ;
+a	b
+2	two
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where b = ? ) and b=''two'' ' ;
+execute stmt1 using @arg00;
+a	b
+2	two
+set @arg00=3 ;
+set @arg01='three' ;
+select a,b FROM t1 where (a,b) in (select 3, 'three');
+a	b
+3	three
+select a FROM t1 where (a,b) in (select @arg00,@arg01);
+a
+3
+prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) ';
+execute stmt1 using @arg00, @arg01;
+a
+3
+set @arg00=1 ;
+set @arg01='two' ;
+set @arg02=2 ;
+set @arg03='two' ;
+select a, @arg00, b FROM t1 outer_table where
+b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ;
+a	@arg00	b
+2	1	two
+prepare stmt1 from ' select a, ?, b FROM t1 outer_table where
+   b=? and a = (select ? from t1 where b = ? ) ' ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
+a	?	b
+2	1	two
+prepare stmt1 from 'select c4 FROM t9 where
+    c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ;
+execute stmt1 using @arg01, @arg02;
+c4
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where b = outer_table.b ) order by a ';
+execute stmt1 ;
+a	b
+1	one
+2	two
+3	three
+4	four
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
+execute stmt1 ;
+ccc
+1
+deallocate prepare stmt1 ;
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
+execute stmt1 ;
+ccc
+1
+deallocate prepare stmt1 ;
+prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
+                           (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
+execute stmt1 ;
+ccc
+1
+deallocate prepare stmt1 ;
+set @arg00='two' ;
+select a, b FROM t1 outer_table where
+a = (select a from t1 where b = outer_table.b ) and b=@arg00 ;
+a	b
+2	two
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where b = outer_table.b) and b=? ';
+execute stmt1 using @arg00;
+a	b
+2	two
+set @arg00=2 ;
+select a, b FROM t1 outer_table where
+a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ;
+a	b
+2	two
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ;
+execute stmt1 using @arg00;
+a	b
+2	two
+set @arg00=2 ;
+select a, b FROM t1 outer_table where
+a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ;
+a	b
+2	two
+prepare stmt1 from ' select a, b FROM t1 outer_table where
+   a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ;
+execute stmt1 using @arg00;
+a	b
+2	two
+set @arg00=1 ;
+set @arg01='two' ;
+set @arg02=2 ;
+set @arg03='two' ;
+select a, @arg00, b FROM t1 outer_table where
+b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03
+and outer_table.a=a ) ;
+a	@arg00	b
+2	1	two
+prepare stmt1 from ' select a, ?, b FROM t1 outer_table where
+   b=? and a = (select ? from t1 where outer_table.b = ? 
+                   and outer_table.a=a ) ' ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
+a	?	b
+2	1	two
+set @arg00=1 ;
+set @arg01=0 ;
+select a, @arg00 
+from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2
+where a=@arg01;
+a	@arg00
+0	1
+prepare stmt1 from ' select a, ? 
+                    from ( select a - ? as a from t1 where a=? ) as t2
+                    where a=? ';
+execute stmt1 using @arg00, @arg00, @arg00, @arg01 ;
+a	?
+0	1
+drop table if exists t2 ;
+create table t2 as select * from t1;
+prepare stmt1 from ' select a in (select a from t2) from t1 ' ;
+execute stmt1 ;
+a in (select a from t2)
+1
+1
+1
+1
+drop table if exists t5, t6, t7 ;
+create table t5 (a int , b int) ;
+create table t6 like t5 ;
+create table t7 like t5 ;
+insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7),
+(2, -1), (3, 10) ;
+insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ;
+insert into t7 values (3, 3), (2, 2), (1, 1) ;
+prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6
+                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
+                     group by t5.a order by sum limit 1) from t7 ' ;
+execute stmt1 ;
+a	(select count(distinct t5.b) as sum from t5, t6
+                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
+                     group by t5.a order by sum limit 1)
+3	1
+2	2
+1	2
+execute stmt1 ;
+a	(select count(distinct t5.b) as sum from t5, t6
+                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
+                     group by t5.a order by sum limit 1)
+3	1
+2	2
+1	2
+execute stmt1 ;
+a	(select count(distinct t5.b) as sum from t5, t6
+                     where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b
+                     group by t5.a order by sum limit 1)
+3	1
+2	2
+1	2
+drop table t5, t6, t7 ;
+drop table if exists t2 ;
+create table t2 as select * from t9;
+set @stmt= ' SELECT
+   (SELECT SUM(c1 + c12 + 0.0) FROM t2 
+    where (t9.c2 - 0e-3) = t2.c2
+    GROUP BY t9.c15 LIMIT 1) as scalar_s,
+   exists (select 1.0e+0 from t2 
+           where t2.c3 * 9.0000000000 = t9.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 t9,
+(select c25 x, c32 y from t2) tt WHERE x = c25 ' ;
+prepare stmt1 from @stmt ;
+execute stmt1 ;
+execute stmt1 ;
+set @stmt= concat('explain ',@stmt);
+prepare stmt1 from @stmt ;
+execute stmt1 ;
+execute stmt1 ;
+set @stmt= ' SELECT
+   (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2
+    GROUP BY t9.c15 LIMIT 1) as scalar_s,
+   exists (select ? from t2 
+           where t2.c3*?=t9.c4) as exists_s,
+   c5*? in (select c6+? from t2) as in_s,
+   (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s
+FROM t9,
+(select c25 x, c32 y from t2) tt WHERE x =c25 ' ;
+set @arg00= 0.0 ;
+set @arg01= 0e-3 ;
+set @arg02= 1.0e+0 ;
+set @arg03= 9.0000000000 ;
+set @arg04= 4 ;
+set @arg05= 0.3e+1 ;
+set @arg06= 4 ;
+set @arg07= 4 ;
+set @arg08= 4.0 ;
+set @arg09= 40e-1 ;
+prepare stmt1 from @stmt ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
+@arg07, @arg08, @arg09 ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
+@arg07, @arg08, @arg09 ;
+set @stmt= concat('explain ',@stmt);
+prepare stmt1 from @stmt ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
+@arg07, @arg08, @arg09 ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06,
+@arg07, @arg08, @arg09 ;
+drop table t2 ;
+select 1 < (select a from t1) ;
+ERROR 21000: Subquery returns more than 1 row
+prepare stmt1 from ' select 1 < (select a from t1) ' ;
+execute stmt1 ;
+ERROR 21000: Subquery returns more than 1 row
+select 1 as my_col ;
+my_col
+1
+test_sequence
+------ union tests ------
+prepare stmt1 from ' select a FROM t1 where a=1
+                     union distinct
+                     select a FROM t1 where a=1 ';
+execute stmt1 ;
+a
+1
+execute stmt1 ;
+a
+1
+prepare stmt1 from ' select a FROM t1 where a=1
+                     union all
+                     select a FROM t1 where a=1 ';
+execute stmt1 ;
+a
+1
+1
+prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ;
+ERROR 21000: The used SELECT statements have a different number of columns
+prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ;
+ERROR 21000: The used SELECT statements have a different number of columns
+prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ;
+ERROR 21000: The used SELECT statements have a different number of columns
+prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ;
+ERROR 21000: The used SELECT statements have a different number of columns
+set @arg00=1 ;
+select @arg00 FROM t1 where a=1
+union distinct
+select 1 FROM t1 where a=1;
+@arg00
+1
+prepare stmt1 from ' select ? FROM t1 where a=1
+                     union distinct
+                     select 1 FROM t1 where a=1 ' ;
+execute stmt1 using @arg00;
+?
+1
+set @arg00=1 ;
+select 1 FROM t1 where a=1
+union distinct
+select @arg00 FROM t1 where a=1;
+1
+1
+prepare stmt1 from ' select 1 FROM t1 where a=1
+                     union distinct
+                     select ? FROM t1 where a=1 ' ;
+execute stmt1 using @arg00;
+1
+1
+set @arg00='a' ;
+select @arg00 FROM t1 where a=1
+union distinct
+select @arg00 FROM t1 where a=1;
+@arg00
+a
+prepare stmt1 from ' select ? FROM t1 where a=1
+                     union distinct
+                     select ? FROM t1 where a=1 ';
+execute stmt1 using @arg00, @arg00;
+?
+a
+prepare stmt1 from ' select ? 
+                     union distinct
+                     select ? ';
+execute stmt1 using @arg00, @arg00;
+?
+a
+set @arg00='a' ;
+set @arg01=1 ;
+set @arg02='a' ;
+set @arg03=2 ;
+select @arg00 FROM t1 where a=@arg01
+union distinct
+select @arg02 FROM t1 where a=@arg03;
+@arg00
+a
+prepare stmt1 from ' select ? FROM t1 where a=?
+                     union distinct
+                     select ? FROM t1 where a=? ' ;
+execute stmt1 using @arg00, @arg01, @arg02, @arg03;
+?
+a
+set @arg00=1 ;
+prepare stmt1 from ' select sum(a) + 200, ? from t1
+union distinct
+select sum(a) + 200, 1 from t1
+group by b ' ;
+execute stmt1 using @arg00;
+sum(a) + 200	?
+210	1
+204	1
+201	1
+203	1
+202	1
+set @Oporto='Oporto' ;
+set @Lisboa='Lisboa' ;
+set @0=0 ;
+set @1=1 ;
+set @2=2 ;
+set @3=3 ;
+set @4=4 ;
+select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ;
+@Oporto	@Lisboa	@0	@1	@2	@3	@4
+Oporto	Lisboa	0	1	2	3	4
+select sum(a) + 200 as the_sum, @Oporto as the_town from t1
+group by b
+union distinct
+select sum(a) + 200, @Lisboa from t1
+group by b ;
+the_sum	the_town
+204	Oporto
+201	Oporto
+203	Oporto
+202	Oporto
+204	Lisboa
+201	Lisboa
+203	Lisboa
+202	Lisboa
+prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
+                     group by b
+                     union distinct
+                     select sum(a) + 200, ? from t1
+                     group by b ' ;
+execute stmt1 using @Oporto, @Lisboa;
+the_sum	the_town
+204	Oporto
+201	Oporto
+203	Oporto
+202	Oporto
+204	Lisboa
+201	Lisboa
+203	Lisboa
+202	Lisboa
+select sum(a) + 200 as the_sum, @Oporto as the_town from t1
+where a > @1
+group by b
+union distinct
+select sum(a) + 200, @Lisboa from t1
+where a > @2
+group by b ;
+the_sum	the_town
+204	Oporto
+203	Oporto
+202	Oporto
+204	Lisboa
+203	Lisboa
+prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
+                     where a > ?
+                     group by b
+                     union distinct
+                     select sum(a) + 200, ? from t1
+                     where a > ?
+                     group by b ' ;
+execute stmt1 using @Oporto, @1, @Lisboa, @2;
+the_sum	the_town
+204	Oporto
+203	Oporto
+202	Oporto
+204	Lisboa
+203	Lisboa
+select sum(a) + 200 as the_sum, @Oporto as the_town from t1
+where a > @1
+group by b
+having avg(a) > @2
+union distinct
+select sum(a) + 200, @Lisboa from t1
+where a > @2
+group by b 
+having avg(a) > @3;
+the_sum	the_town
+204	Oporto
+203	Oporto
+204	Lisboa
+prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1
+                     where a > ?
+                     group by b
+                     having avg(a) > ?
+                     union distinct
+                     select sum(a) + 200, ? from t1
+                     where a > ?
+                     group by b
+                     having avg(a) > ? ';
+execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3;
+the_sum	the_town
+204	Oporto
+203	Oporto
+204	Lisboa
+test_sequence
+------ explain select tests ------
+prepare stmt1 from ' explain select * from t9 ' ;
+execute stmt1;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					id	8	3	1	N	32929	0	63
+def					select_type	253	19	6	N	1	31	8
+def					table	253	64	2	Y	0	31	8
+def					type	253	10	3	Y	0	31	8
+def					possible_keys	253	4096	0	Y	0	31	8
+def					key	253	64	0	Y	0	31	8
+def					key_len	253	1365	0	Y	0	31	8
+def					ref	253	1024	0	Y	0	31	8
+def					rows	8	10	1	Y	32928	0	63
+def					Extra	253	255	0	N	1	31	8
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t9	ALL	NULL	NULL	NULL	NULL	2	
+test_sequence
+------ delete tests ------
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+prepare stmt1 from 'delete from t1 where a=2' ;
+execute stmt1;
+select a,b from t1 where a=2;
+a	b
+execute stmt1;
+insert into t1 values(0,NULL);
+set @arg00=NULL;
+prepare stmt1 from 'delete from t1 where b=?' ;
+execute stmt1 using @arg00;
+select a,b from t1 where b is NULL ;
+a	b
+0	NULL
+set @arg00='one';
+execute stmt1 using @arg00;
+select a,b from t1 where b=@arg00;
+a	b
+prepare stmt1 from 'truncate table t1' ;
+test_sequence
+------ update tests ------
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ;
+execute stmt1;
+select a,b from t1 where a=2;
+a	b
+2	a=two
+execute stmt1;
+select a,b from t1 where a=2;
+a	b
+2	a=two
+set @arg00=NULL;
+prepare stmt1 from 'update t1 set b=? where a=2' ;
+execute stmt1 using @arg00;
+select a,b from t1 where a=2;
+a	b
+2	NULL
+set @arg00='two';
+execute stmt1 using @arg00;
+select a,b from t1 where a=2;
+a	b
+2	two
+set @arg00=2;
+prepare stmt1 from 'update t1 set b=NULL where a=?' ;
+execute stmt1 using @arg00;
+select a,b from t1 where a=@arg00;
+a	b
+2	NULL
+update t1 set b='two' where a=@arg00;
+set @arg00=2000;
+execute stmt1 using @arg00;
+select a,b from t1 where a=@arg00;
+a	b
+set @arg00=2;
+set @arg01=22;
+prepare stmt1 from 'update t1 set a=? where a=?' ;
+execute stmt1 using @arg00, @arg00;
+select a,b from t1 where a=@arg00;
+a	b
+2	two
+execute stmt1 using @arg01, @arg00;
+select a,b from t1 where a=@arg01;
+a	b
+22	two
+execute stmt1 using @arg00, @arg01;
+select a,b from t1 where a=@arg00;
+a	b
+2	two
+set @arg00=NULL;
+set @arg01=2;
+execute stmt1 using @arg00, @arg01;
+Warnings:
+Warning	1048	Column 'a' cannot be null
+select a,b from t1 order by a;
+a	b
+0	two
+1	one
+3	three
+4	four
+set @arg00=0;
+execute stmt1 using @arg01, @arg00;
+select a,b from t1 order by a;
+a	b
+1	one
+2	two
+3	three
+4	four
+set @arg00=23;
+set @arg01='two';
+set @arg02=2;
+set @arg03='two';
+set @arg04=2;
+drop table if exists t2;
+create table t2 as select a,b from t1 ;
+prepare stmt1 from 'update t1 set a=? where b=?
+                    and a in (select ? from t2
+                              where b = ? or a = ?)';
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
+affected rows: 1
+info: Rows matched: 1  Changed: 1  Warnings: 0
+select a,b from t1 where a = @arg00 ;
+a	b
+23	two
+prepare stmt1 from 'update t1 set a=? where b=?
+                    and a not in (select ? from t2
+                              where b = ? or a = ?)';
+execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
+affected rows: 1
+info: Rows matched: 1  Changed: 1  Warnings: 0
+select a,b from t1 order by a ;
+a	b
+1	one
+2	two
+3	three
+4	four
+drop table t2 ;
+create table t2
+(
+a int, b varchar(30),
+primary key(a)
+) engine = 'Falcon'  ;
+insert into t2(a,b) select a, b from t1 ;
+prepare stmt1 from 'update t1 set a=? where b=?
+                    and a in (select ? from t2
+                              where b = ? or a = ?)';
+execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
+affected rows: 1
+info: Rows matched: 1  Changed: 1  Warnings: 0
+select a,b from t1 where a = @arg00 ;
+a	b
+23	two
+prepare stmt1 from 'update t1 set a=? where b=?
+                    and a not in (select ? from t2
+                              where b = ? or a = ?)';
+execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
+affected rows: 1
+info: Rows matched: 1  Changed: 1  Warnings: 0
+select a,b from t1 order by a ;
+a	b
+1	one
+2	two
+3	three
+4	four
+drop table t2 ;
+set @arg00=1;
+prepare stmt1 from 'update t1 set b=''bla''
+where a=2
+limit 1';
+execute stmt1 ;
+select a,b from t1 where b = 'bla' ;
+a	b
+2	bla
+prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?';
+execute stmt1 using @arg00;
+test_sequence
+------ insert tests ------
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+prepare stmt1 from 'insert into t1 values(5, ''five'' )';
+execute stmt1;
+select a,b from t1 where a = 5;
+a	b
+5	five
+set @arg00='six' ;
+prepare stmt1 from 'insert into t1 values(6, ? )';
+execute stmt1 using @arg00;
+select a,b from t1 where b = @arg00;
+a	b
+6	six
+execute stmt1 using @arg00;
+ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
+set @arg00=NULL ;
+prepare stmt1 from 'insert into t1 values(0, ? )';
+execute stmt1 using @arg00;
+select a,b from t1 where b is NULL;
+a	b
+0	NULL
+set @arg00=8 ;
+set @arg01='eight' ;
+prepare stmt1 from 'insert into t1 values(?, ? )';
+execute stmt1 using @arg00, @arg01 ;
+select a,b from t1 where b = @arg01;
+a	b
+8	eight
+set @NULL= null ;
+set @arg00= 'abc' ;
+execute stmt1 using @NULL, @NULL ;
+ERROR 23000: Column 'a' cannot be null
+execute stmt1 using @NULL, @NULL ;
+ERROR 23000: Column 'a' cannot be null
+execute stmt1 using @NULL, @arg00 ;
+ERROR 23000: Column 'a' cannot be null
+execute stmt1 using @NULL, @arg00 ;
+ERROR 23000: Column 'a' cannot be null
+set @arg01= 10000 + 2 ;
+execute stmt1 using @arg01, @arg00 ;
+set @arg01= 10000 + 1 ;
+execute stmt1 using @arg01, @arg00 ;
+select * from t1 where a > 10000 order by a ;
+a	b
+10001	abc
+10002	abc
+delete from t1 where a > 10000 ;
+set @arg01= 10000 + 2 ;
+execute stmt1 using @arg01, @NULL ;
+set @arg01= 10000 + 1 ;
+execute stmt1 using @arg01, @NULL ;
+select * from t1 where a > 10000 order by a ;
+a	b
+10001	NULL
+10002	NULL
+delete from t1 where a > 10000 ;
+set @arg01= 10000 + 10 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 9 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 8 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 7 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 6 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 5 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 4 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 3 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 2 ;
+execute stmt1 using @arg01, @arg01 ;
+set @arg01= 10000 + 1 ;
+execute stmt1 using @arg01, @arg01 ;
+select * from t1 where a > 10000 order by a ;
+a	b
+10001	10001
+10002	10002
+10003	10003
+10004	10004
+10005	10005
+10006	10006
+10007	10007
+10008	10008
+10009	10009
+10010	10010
+delete from t1 where a > 10000 ;
+set @arg00=81 ;
+set @arg01='8-1' ;
+set @arg02=82 ;
+set @arg03='8-2' ;
+prepare stmt1 from 'insert into t1 values(?,?),(?,?)';
+execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
+select a,b from t1 where a in (@arg00,@arg02) ;
+a	b
+81	8-1
+82	8-2
+set @arg00=9 ;
+set @arg01='nine' ;
+prepare stmt1 from 'insert into t1 set a=?, b=? ';
+execute stmt1 using @arg00, @arg01 ;
+select a,b from t1 where a = @arg00 ;
+a	b
+9	nine
+set @arg00=6 ;
+set @arg01=1 ;
+prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
+                    on duplicate key update a=a + ?, b=concat(b,''modified'') ';
+execute stmt1 using @arg00, @arg01;
+select * from t1 order by a;
+a	b
+0	NULL
+1	one
+2	two
+3	three
+4	four
+5	five
+7	sixmodified
+8	eight
+9	nine
+81	8-1
+82	8-2
+set @arg00=81 ;
+set @arg01=1 ;
+execute stmt1 using @arg00, @arg01;
+ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
+drop table if exists t2 ;
+create table t2 (id int auto_increment primary key) 
+ENGINE= 'Falcon'  ;
+prepare stmt1 from ' select last_insert_id() ' ;
+insert into t2 values (NULL) ;
+execute stmt1 ;
+last_insert_id()
+1
+insert into t2 values (NULL) ;
+execute stmt1 ;
+last_insert_id()
+2
+drop table t2 ;
+set @1000=1000 ;
+set @x1000_2="x1000_2" ;
+set @x1000_3="x1000_3" ;
+set @x1000="x1000" ;
+set @1100=1100 ;
+set @x1100="x1100" ;
+set @100=100 ;
+set @updated="updated" ;
+insert into t1 values(1000,'x1000_1') ;
+insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
+on duplicate key update a = a + @100, b = concat(b,@updated) ;
+select a,b from t1 where a >= 1000 order by a ;
+a	b
+1000	x1000_3
+1100	x1000_1updated
+delete from t1 where a >= 1000 ;
+insert into t1 values(1000,'x1000_1') ;
+prepare stmt1 from ' insert into t1 values(?,?),(?,?)
+               on duplicate key update a = a + ?, b = concat(b,?) ';
+execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
+select a,b from t1 where a >= 1000 order by a ;
+a	b
+1000	x1000_3
+1100	x1000_1updated
+delete from t1 where a >= 1000 ;
+insert into t1 values(1000,'x1000_1') ;
+execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
+select a,b from t1 where a >= 1000 order by a ;
+a	b
+1200	x1000_1updatedupdated
+delete from t1 where a >= 1000 ;
+prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
+execute stmt1;
+execute stmt1;
+execute stmt1;
+test_sequence
+------ multi table tests ------
+delete from t1 ;
+delete from t9 ;
+insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ;
+insert into t9 (c1,c21)
+values (1, 'one'), (2, 'two'), (3, 'three') ;
+prepare stmt_delete from " delete t1, t9 
+  from t1, t9 where t1.a=t9.c1 and t1.b='updated' ";
+prepare stmt_update from " update t1, t9 
+  set t1.b='updated', t9.c21='updated'
+  where t1.a=t9.c1 and t1.a=? ";
+prepare stmt_select1 from " select a, b from t1 order by a" ;
+prepare stmt_select2 from " select c1, c21 from t9 order by c1" ;
+set @arg00= 1 ;
+execute stmt_update using @arg00 ;
+execute stmt_delete ;
+execute stmt_select1 ;
+a	b
+2	two
+3	three
+execute stmt_select2 ;
+c1	c21
+2	two
+3	three
+set @arg00= @arg00 + 1 ;
+execute stmt_update using @arg00 ;
+execute stmt_delete ;
+execute stmt_select1 ;
+a	b
+3	three
+execute stmt_select2 ;
+c1	c21
+3	three
+set @arg00= @arg00 + 1 ;
+execute stmt_update using @arg00 ;
+execute stmt_delete ;
+execute stmt_select1 ;
+a	b
+execute stmt_select2 ;
+c1	c21
+set @arg00= @arg00 + 1 ;
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+insert into t1 values(0,NULL) ;
+set @duplicate='duplicate ' ;
+set @1000=1000 ;
+set @5=5 ;
+select a,b from t1 where a < 5 order by a ;
+a	b
+0	NULL
+1	one
+2	two
+3	three
+4	four
+insert into t1 select a + @1000, concat(@duplicate,b) from t1
+where a < @5 ;
+affected rows: 5
+info: Records: 5  Duplicates: 0  Warnings: 0
+select a,b from t1 where a >= 1000 order by a ;
+a	b
+1000	NULL
+1001	duplicate one
+1002	duplicate two
+1003	duplicate three
+1004	duplicate four
+delete from t1 where a >= 1000 ;
+prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
+where a < ? ' ;
+execute stmt1 using @1000, @duplicate, @5;
+affected rows: 5
+info: Records: 5  Duplicates: 0  Warnings: 0
+select a,b from t1 where a >= 1000 order by a ;
+a	b
+1000	NULL
+1001	duplicate one
+1002	duplicate two
+1003	duplicate three
+1004	duplicate four
+delete from t1 where a >= 1000 ;
+set @1=1 ;
+set @2=2 ;
+set @100=100 ;
+set @float=1.00;
+set @five='five' ;
+drop table if exists t2;
+create table t2 like t1 ;
+insert into t2 (b,a) 
+select @duplicate, sum(first.a) from t1 first, t1 second
+where first.a <> @5 and second.b = first.b
+and second.b <> @five
+group by second.b
+having sum(second.a) > @2
+union
+select b, a + @100 from t1
+where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b 
+from t1);
+affected rows: 3
+info: Records: 3  Duplicates: 0  Warnings: 0
+select a,b from t2 order by a ;
+a	b
+3	duplicate 
+4	duplicate 
+103	three
+delete from t2 ;
+prepare stmt1 from ' insert into t2 (b,a) 
+select ?, sum(first.a)
+  from t1 first, t1 second 
+  where first.a <> ? and second.b = first.b and second.b <> ?
+  group by second.b
+  having sum(second.a) > ?
+union
+select b, a + ? from t1
+  where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b 
+                 from t1 ) ' ;
+execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
+affected rows: 3
+info: Records: 3  Duplicates: 0  Warnings: 0
+select a,b from t2 order by a ;
+a	b
+3	duplicate 
+4	duplicate 
+103	three
+drop table t2;
+drop table if exists t5 ;
+set @arg01= 8;
+set @arg02= 8.0;
+set @arg03= 80.00000000000e-1;
+set @arg04= 'abc' ;
+set @arg05= CAST('abc' as binary) ;
+set @arg06= '1991-08-05' ;
+set @arg07= CAST('1991-08-05' as date);
+set @arg08= '1991-08-05 01:01:01' ;
+set @arg09= CAST('1991-08-05 01:01:01' as datetime) ;
+set @arg10= unix_timestamp('1991-01-01 01:01:01');
+set @arg11= YEAR('1991-01-01 01:01:01');
+set @arg12= 8 ;
+set @arg12= NULL ;
+set @arg13= 8.0 ;
+set @arg13= NULL ;
+set @arg14= 'abc';
+set @arg14= NULL ;
+set @arg15= CAST('abc' as binary) ;
+set @arg15= NULL ;
+create table t5 as select
+8                           as const01, @arg01 as param01,
+8.0                         as const02, @arg02 as param02,
+80.00000000000e-1           as const03, @arg03 as param03,
+'abc'                       as const04, @arg04 as param04,
+CAST('abc' as binary)       as const05, @arg05 as param05,
+'1991-08-05'                as const06, @arg06 as param06,
+CAST('1991-08-05' as date)  as const07, @arg07 as param07,
+'1991-08-05 01:01:01'       as const08, @arg08 as param08,
+CAST('1991-08-05 01:01:01'  as datetime) as const09, @arg09 as param09,
+unix_timestamp('1991-01-01 01:01:01')    as const10, @arg10 as param10,
+YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, 
+NULL                        as const12, @arg12 as param12,
+@arg13 as param13,
+@arg14 as param14,
+@arg15 as param15;
+show create table t5 ;
+Table	Create Table
+t5	CREATE TABLE `t5` (
+  `const01` int(1) NOT NULL DEFAULT '0',
+  `param01` bigint(20) DEFAULT NULL,
+  `const02` decimal(2,1) NOT NULL DEFAULT '0.0',
+  `param02` decimal(65,30) DEFAULT NULL,
+  `const03` double NOT NULL DEFAULT '0',
+  `param03` double DEFAULT NULL,
+  `const04` varchar(3) NOT NULL DEFAULT '',
+  `param04` longtext,
+  `const05` varbinary(3) NOT NULL DEFAULT '',
+  `param05` longblob,
+  `const06` varchar(10) NOT NULL DEFAULT '',
+  `param06` longtext,
+  `const07` date DEFAULT NULL,
+  `param07` longblob,
+  `const08` varchar(19) NOT NULL DEFAULT '',
+  `param08` longtext,
+  `const09` datetime DEFAULT NULL,
+  `param09` longblob,
+  `const10` int(10) NOT NULL DEFAULT '0',
+  `param10` bigint(20) DEFAULT NULL,
+  `const11` int(4) DEFAULT NULL,
+  `param11` bigint(20) DEFAULT NULL,
+  `const12` binary(0) DEFAULT NULL,
+  `param12` bigint(20) DEFAULT NULL,
+  `param13` decimal(65,30) DEFAULT NULL,
+  `param14` longtext,
+  `param15` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from t5 ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def	test	t5	t5	const01	const01	3	1	1	N	32769	0	63
+def	test	t5	t5	param01	param01	8	20	1	Y	32768	0	63
+def	test	t5	t5	const02	const02	246	4	3	N	1	1	63
+def	test	t5	t5	param02	param02	246	67	32	Y	0	30	63
+def	test	t5	t5	const03	const03	5	17	1	N	32769	31	63
+def	test	t5	t5	param03	param03	5	23	1	Y	32768	31	63
+def	test	t5	t5	const04	const04	253	3	3	N	1	0	8
+def	test	t5	t5	param04	param04	252	4294967295	3	Y	16	0	8
+def	test	t5	t5	const05	const05	253	3	3	N	129	0	63
+def	test	t5	t5	param05	param05	252	4294967295	3	Y	144	0	63
+def	test	t5	t5	const06	const06	253	10	10	N	1	0	8
+def	test	t5	t5	param06	param06	252	4294967295	10	Y	16	0	8
+def	test	t5	t5	const07	const07	10	10	10	Y	128	0	63
+def	test	t5	t5	param07	param07	252	4294967295	10	Y	144	0	63
+def	test	t5	t5	const08	const08	253	19	19	N	1	0	8
+def	test	t5	t5	param08	param08	252	4294967295	19	Y	16	0	8
+def	test	t5	t5	const09	const09	12	19	19	Y	128	0	63
+def	test	t5	t5	param09	param09	252	4294967295	19	Y	144	0	63
+def	test	t5	t5	const10	const10	3	10	9	N	32769	0	63
+def	test	t5	t5	param10	param10	8	20	9	Y	32768	0	63
+def	test	t5	t5	const11	const11	3	4	4	Y	32768	0	63
+def	test	t5	t5	param11	param11	8	20	4	Y	32768	0	63
+def	test	t5	t5	const12	const12	254	0	0	Y	128	0	63
+def	test	t5	t5	param12	param12	8	20	0	Y	32768	0	63
+def	test	t5	t5	param13	param13	246	67	0	Y	0	30	63
+def	test	t5	t5	param14	param14	252	4294967295	0	Y	16	0	8
+def	test	t5	t5	param15	param15	252	4294967295	0	Y	144	0	63
+const01	8
+param01	8
+const02	8.0
+param02	8.000000000000000000000000000000
+const03	8
+param03	8
+const04	abc
+param04	abc
+const05	abc
+param05	abc
+const06	1991-08-05
+param06	1991-08-05
+const07	1991-08-05
+param07	1991-08-05
+const08	1991-08-05 01:01:01
+param08	1991-08-05 01:01:01
+const09	1991-08-05 01:01:01
+param09	1991-08-05 01:01:01
+const10	662680861
+param10	662680861
+const11	1991
+param11	1991
+const12	NULL
+param12	NULL
+param13	NULL
+param14	NULL
+param15	NULL
+drop table t5 ;
+test_sequence
+------ data type conversion tests ------
+delete from t1 ;
+insert into t1 values (1,'one');
+insert into t1 values (2,'two');
+insert into t1 values (3,'three');
+insert into t1 values (4,'four');
+commit ;
+delete from t9 ;
+insert into t9
+set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
+c10= 1, c11= 1, c12 = 1,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=true, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
+insert into t9
+set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
+c10= 9, c11= 9, c12 = 9,
+c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
+c16= '11:11:11', c17= '2004',
+c18= 1, c19=false, c20= 'a', c21= '123456789a', 
+c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
+c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
+c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
+commit ;
+insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ;
+select * from t9 order by c1 ;
+c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16	c17	c18	c19	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30	c31	c32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+9	9	9	9	9	9	9	9	9	9	9.0000	9.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	0	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	two	tuesday
+test_sequence
+------ select @parameter:= column ------
+prepare full_info from "select @arg01, @arg02, @arg03, @arg04,
+       @arg05, @arg06, @arg07, @arg08,
+       @arg09, @arg10, @arg11, @arg12,
+       @arg13, @arg14, @arg15, @arg16,
+       @arg17, @arg18, @arg19, @arg20,
+       @arg21, @arg22, @arg23, @arg24,
+       @arg25, @arg26, @arg27, @arg28,
+       @arg29, @arg30, @arg31, @arg32" ;
+select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
+@arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
+@arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
+@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
+@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
+@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
+@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
+@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
+from t9 where c1= 1 ;
+@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	1	Y	32896	0	63
+def					@arg03	8	20	1	Y	32896	0	63
+def					@arg04	8	20	1	Y	32896	0	63
+def					@arg05	8	20	1	Y	32896	0	63
+def					@arg06	8	20	1	Y	32896	0	63
+def					@arg07	5	23	1	Y	32896	31	63
+def					@arg08	5	23	1	Y	32896	31	63
+def					@arg09	5	23	1	Y	32896	31	63
+def					@arg10	5	23	1	Y	32896	31	63
+def					@arg11	246	83	6	Y	128	30	63
+def					@arg12	246	83	6	Y	128	30	63
+def					@arg13	251	16777216	10	Y	128	31	63
+def					@arg14	251	16777216	19	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg17	8	20	4	Y	32928	0	63
+def					@arg18	8	20	1	Y	32896	0	63
+def					@arg19	8	20	1	Y	32896	0	63
+def					@arg20	251	16777216	1	Y	0	31	8
+def					@arg21	251	16777216	10	Y	0	31	8
+def					@arg22	251	16777216	30	Y	0	31	8
+def					@arg23	251	16777216	8	Y	128	31	63
+def					@arg24	251	16777216	8	Y	0	31	8
+def					@arg25	251	16777216	4	Y	128	31	63
+def					@arg26	251	16777216	4	Y	0	31	8
+def					@arg27	251	16777216	10	Y	128	31	63
+def					@arg28	251	16777216	10	Y	0	31	8
+def					@arg29	251	16777216	8	Y	128	31	63
+def					@arg30	251	16777216	8	Y	0	31	8
+def					@arg31	251	16777216	3	Y	0	31	8
+def					@arg32	251	16777216	6	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+select @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
+@arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
+@arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
+@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
+@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
+@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
+@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
+@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
+from t9 where c1= 0 ;
+@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	0	Y	32896	0	63
+def					@arg03	8	20	0	Y	32896	0	63
+def					@arg04	8	20	0	Y	32896	0	63
+def					@arg05	8	20	0	Y	32896	0	63
+def					@arg06	8	20	0	Y	32896	0	63
+def					@arg07	5	23	0	Y	32896	31	63
+def					@arg08	5	23	0	Y	32896	31	63
+def					@arg09	5	23	0	Y	32896	31	63
+def					@arg10	5	23	0	Y	32896	31	63
+def					@arg11	246	83	0	Y	128	30	63
+def					@arg12	246	83	0	Y	128	30	63
+def					@arg13	251	16777216	0	Y	128	31	63
+def					@arg14	251	16777216	0	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg17	8	20	0	Y	32928	0	63
+def					@arg18	8	20	0	Y	32896	0	63
+def					@arg19	8	20	0	Y	32896	0	63
+def					@arg20	251	16777216	0	Y	0	31	8
+def					@arg21	251	16777216	0	Y	0	31	8
+def					@arg22	251	16777216	0	Y	0	31	8
+def					@arg23	251	16777216	0	Y	128	31	63
+def					@arg24	251	16777216	0	Y	0	31	8
+def					@arg25	251	16777216	0	Y	128	31	63
+def					@arg26	251	16777216	0	Y	0	31	8
+def					@arg27	251	16777216	0	Y	128	31	63
+def					@arg28	251	16777216	0	Y	0	31	8
+def					@arg29	251	16777216	0	Y	128	31	63
+def					@arg30	251	16777216	0	Y	0	31	8
+def					@arg31	251	16777216	0	Y	0	31	8
+def					@arg32	251	16777216	0	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+prepare stmt1 from "select 
+       @arg01:=  c1, @arg02:=  c2, @arg03:=  c3, @arg04:=  c4,
+       @arg05:=  c5, @arg06:=  c6, @arg07:=  c7, @arg08:=  c8,
+       @arg09:=  c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
+       @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16,
+       @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20,
+       @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24,
+       @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28,
+       @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32
+from t9 where c1= ?" ;
+set @my_key= 1 ;
+execute stmt1 using @my_key ;
+@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	1	Y	32896	0	63
+def					@arg03	8	20	1	Y	32896	0	63
+def					@arg04	8	20	1	Y	32896	0	63
+def					@arg05	8	20	1	Y	32896	0	63
+def					@arg06	8	20	1	Y	32896	0	63
+def					@arg07	5	23	1	Y	32896	31	63
+def					@arg08	5	23	1	Y	32896	31	63
+def					@arg09	5	23	1	Y	32896	31	63
+def					@arg10	5	23	1	Y	32896	31	63
+def					@arg11	246	83	6	Y	128	30	63
+def					@arg12	246	83	6	Y	128	30	63
+def					@arg13	251	16777216	10	Y	128	31	63
+def					@arg14	251	16777216	19	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg17	8	20	4	Y	32928	0	63
+def					@arg18	8	20	1	Y	32896	0	63
+def					@arg19	8	20	1	Y	32896	0	63
+def					@arg20	251	16777216	1	Y	0	31	8
+def					@arg21	251	16777216	10	Y	0	31	8
+def					@arg22	251	16777216	30	Y	0	31	8
+def					@arg23	251	16777216	8	Y	128	31	63
+def					@arg24	251	16777216	8	Y	0	31	8
+def					@arg25	251	16777216	4	Y	128	31	63
+def					@arg26	251	16777216	4	Y	0	31	8
+def					@arg27	251	16777216	10	Y	128	31	63
+def					@arg28	251	16777216	10	Y	0	31	8
+def					@arg29	251	16777216	8	Y	128	31	63
+def					@arg30	251	16777216	8	Y	0	31	8
+def					@arg31	251	16777216	3	Y	0	31	8
+def					@arg32	251	16777216	6	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+set @my_key= 0 ;
+execute stmt1 using @my_key ;
+@arg01:=  c1	@arg02:=  c2	@arg03:=  c3	@arg04:=  c4	@arg05:=  c5	@arg06:=  c6	@arg07:=  c7	@arg08:=  c8	@arg09:=  c9	@arg10:= c10	@arg11:= c11	@arg12:= c12	@arg13:= c13	@arg14:= c14	@arg15:= c15	@arg16:= c16	@arg17:= c17	@arg18:= c18	@arg19:= c19	@arg20:= c20	@arg21:= c21	@arg22:= c22	@arg23:= c23	@arg24:= c24	@arg25:= c25	@arg26:= c26	@arg27:= c27	@arg28:= c28	@arg29:= c29	@arg30:= c30	@arg31:= c31	@arg32:= c32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	0	Y	32896	0	63
+def					@arg03	8	20	0	Y	32896	0	63
+def					@arg04	8	20	0	Y	32896	0	63
+def					@arg05	8	20	0	Y	32896	0	63
+def					@arg06	8	20	0	Y	32896	0	63
+def					@arg07	5	23	0	Y	32896	31	63
+def					@arg08	5	23	0	Y	32896	31	63
+def					@arg09	5	23	0	Y	32896	31	63
+def					@arg10	5	23	0	Y	32896	31	63
+def					@arg11	246	83	0	Y	128	30	63
+def					@arg12	246	83	0	Y	128	30	63
+def					@arg13	251	16777216	0	Y	128	31	63
+def					@arg14	251	16777216	0	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg17	8	20	0	Y	32928	0	63
+def					@arg18	8	20	0	Y	32896	0	63
+def					@arg19	8	20	0	Y	32896	0	63
+def					@arg20	251	16777216	0	Y	0	31	8
+def					@arg21	251	16777216	0	Y	0	31	8
+def					@arg22	251	16777216	0	Y	0	31	8
+def					@arg23	251	16777216	0	Y	128	31	63
+def					@arg24	251	16777216	0	Y	0	31	8
+def					@arg25	251	16777216	0	Y	128	31	63
+def					@arg26	251	16777216	0	Y	0	31	8
+def					@arg27	251	16777216	0	Y	128	31	63
+def					@arg28	251	16777216	0	Y	0	31	8
+def					@arg29	251	16777216	0	Y	128	31	63
+def					@arg30	251	16777216	0	Y	0	31	8
+def					@arg31	251	16777216	0	Y	0	31	8
+def					@arg32	251	16777216	0	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1
+test_sequence
+------ select column, .. into @parm,.. ------
+select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
+c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
+c25, c26, c27, c28, c29, c30, c31, c32
+into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
+@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
+@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
+@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
+from t9 where c1= 1 ;
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	1	Y	32896	0	63
+def					@arg03	8	20	1	Y	32896	0	63
+def					@arg04	8	20	1	Y	32896	0	63
+def					@arg05	8	20	1	Y	32896	0	63
+def					@arg06	8	20	1	Y	32896	0	63
+def					@arg07	5	23	1	Y	32896	31	63
+def					@arg08	5	23	1	Y	32896	31	63
+def					@arg09	5	23	1	Y	32896	31	63
+def					@arg10	5	23	1	Y	32896	31	63
+def					@arg11	246	83	6	Y	128	30	63
+def					@arg12	246	83	6	Y	128	30	63
+def					@arg13	251	16777216	10	Y	128	31	63
+def					@arg14	251	16777216	19	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg17	8	20	4	Y	32928	0	63
+def					@arg18	8	20	1	Y	32896	0	63
+def					@arg19	8	20	1	Y	32896	0	63
+def					@arg20	251	16777216	1	Y	0	31	8
+def					@arg21	251	16777216	10	Y	0	31	8
+def					@arg22	251	16777216	30	Y	0	31	8
+def					@arg23	251	16777216	8	Y	128	31	63
+def					@arg24	251	16777216	8	Y	0	31	8
+def					@arg25	251	16777216	4	Y	128	31	63
+def					@arg26	251	16777216	4	Y	0	31	8
+def					@arg27	251	16777216	10	Y	128	31	63
+def					@arg28	251	16777216	10	Y	0	31	8
+def					@arg29	251	16777216	8	Y	128	31	63
+def					@arg30	251	16777216	8	Y	0	31	8
+def					@arg31	251	16777216	3	Y	0	31	8
+def					@arg32	251	16777216	6	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
+c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
+c25, c26, c27, c28, c29, c30, c31, c32
+into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
+@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
+@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
+@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
+from t9 where c1= 0 ;
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	0	Y	32896	0	63
+def					@arg03	8	20	0	Y	32896	0	63
+def					@arg04	8	20	0	Y	32896	0	63
+def					@arg05	8	20	0	Y	32896	0	63
+def					@arg06	8	20	0	Y	32896	0	63
+def					@arg07	5	23	0	Y	32896	31	63
+def					@arg08	5	23	0	Y	32896	31	63
+def					@arg09	5	23	0	Y	32896	31	63
+def					@arg10	5	23	0	Y	32896	31	63
+def					@arg11	246	83	0	Y	128	30	63
+def					@arg12	246	83	0	Y	128	30	63
+def					@arg13	251	16777216	0	Y	128	31	63
+def					@arg14	251	16777216	0	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg17	8	20	0	Y	32928	0	63
+def					@arg18	8	20	0	Y	32896	0	63
+def					@arg19	8	20	0	Y	32896	0	63
+def					@arg20	251	16777216	0	Y	0	31	8
+def					@arg21	251	16777216	0	Y	0	31	8
+def					@arg22	251	16777216	0	Y	0	31	8
+def					@arg23	251	16777216	0	Y	128	31	63
+def					@arg24	251	16777216	0	Y	0	31	8
+def					@arg25	251	16777216	0	Y	128	31	63
+def					@arg26	251	16777216	0	Y	0	31	8
+def					@arg27	251	16777216	0	Y	128	31	63
+def					@arg28	251	16777216	0	Y	0	31	8
+def					@arg29	251	16777216	0	Y	128	31	63
+def					@arg30	251	16777216	0	Y	0	31	8
+def					@arg31	251	16777216	0	Y	0	31	8
+def					@arg32	251	16777216	0	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
+       c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
+       c25, c26, c27, c28, c29, c30, c31, c32
+into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
+     @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16,
+     @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
+     @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
+from t9 where c1= ?" ;
+set @my_key= 1 ;
+execute stmt1 using @my_key ;
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	1	Y	32896	0	63
+def					@arg03	8	20	1	Y	32896	0	63
+def					@arg04	8	20	1	Y	32896	0	63
+def					@arg05	8	20	1	Y	32896	0	63
+def					@arg06	8	20	1	Y	32896	0	63
+def					@arg07	5	23	1	Y	32896	31	63
+def					@arg08	5	23	1	Y	32896	31	63
+def					@arg09	5	23	1	Y	32896	31	63
+def					@arg10	5	23	1	Y	32896	31	63
+def					@arg11	246	83	6	Y	128	30	63
+def					@arg12	246	83	6	Y	128	30	63
+def					@arg13	251	16777216	10	Y	128	31	63
+def					@arg14	251	16777216	19	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	8	Y	128	31	63
+def					@arg17	8	20	4	Y	32928	0	63
+def					@arg18	8	20	1	Y	32896	0	63
+def					@arg19	8	20	1	Y	32896	0	63
+def					@arg20	251	16777216	1	Y	0	31	8
+def					@arg21	251	16777216	10	Y	0	31	8
+def					@arg22	251	16777216	30	Y	0	31	8
+def					@arg23	251	16777216	8	Y	128	31	63
+def					@arg24	251	16777216	8	Y	0	31	8
+def					@arg25	251	16777216	4	Y	128	31	63
+def					@arg26	251	16777216	4	Y	0	31	8
+def					@arg27	251	16777216	10	Y	128	31	63
+def					@arg28	251	16777216	10	Y	0	31	8
+def					@arg29	251	16777216	8	Y	128	31	63
+def					@arg30	251	16777216	8	Y	0	31	8
+def					@arg31	251	16777216	3	Y	0	31	8
+def					@arg32	251	16777216	6	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+1	1	1	1	1	1	1	1	1	1	1.0000	1.0000	2004-02-29	2004-02-29 11:11:11	2004-02-29 11:11:11	11:11:11	2004	1	1	a	123456789a	123456789a123456789b123456789c	tinyblob	tinytext	blob	text	mediumblob	mediumtext	longblob	longtext	one	monday
+set @my_key= 0 ;
+execute stmt1 using @my_key ;
+execute full_info ;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					@arg01	8	20	1	Y	32896	0	63
+def					@arg02	8	20	0	Y	32896	0	63
+def					@arg03	8	20	0	Y	32896	0	63
+def					@arg04	8	20	0	Y	32896	0	63
+def					@arg05	8	20	0	Y	32896	0	63
+def					@arg06	8	20	0	Y	32896	0	63
+def					@arg07	5	23	0	Y	32896	31	63
+def					@arg08	5	23	0	Y	32896	31	63
+def					@arg09	5	23	0	Y	32896	31	63
+def					@arg10	5	23	0	Y	32896	31	63
+def					@arg11	246	83	0	Y	128	30	63
+def					@arg12	246	83	0	Y	128	30	63
+def					@arg13	251	16777216	0	Y	128	31	63
+def					@arg14	251	16777216	0	Y	128	31	63
+def					@arg15	251	16777216	19	Y	128	31	63
+def					@arg16	251	16777216	0	Y	128	31	63
+def					@arg17	8	20	0	Y	32928	0	63
+def					@arg18	8	20	0	Y	32896	0	63
+def					@arg19	8	20	0	Y	32896	0	63
+def					@arg20	251	16777216	0	Y	0	31	8
+def					@arg21	251	16777216	0	Y	0	31	8
+def					@arg22	251	16777216	0	Y	0	31	8
+def					@arg23	251	16777216	0	Y	128	31	63
+def					@arg24	251	16777216	0	Y	0	31	8
+def					@arg25	251	16777216	0	Y	128	31	63
+def					@arg26	251	16777216	0	Y	0	31	8
+def					@arg27	251	16777216	0	Y	128	31	63
+def					@arg28	251	16777216	0	Y	0	31	8
+def					@arg29	251	16777216	0	Y	128	31	63
+def					@arg30	251	16777216	0	Y	0	31	8
+def					@arg31	251	16777216	0	Y	0	31	8
+def					@arg32	251	16777216	0	Y	0	31	8
+@arg01	@arg02	@arg03	@arg04	@arg05	@arg06	@arg07	@arg08	@arg09	@arg10	@arg11	@arg12	@arg13	@arg14	@arg15	@arg16	@arg17	@arg18	@arg19	@arg20	@arg21	@arg22	@arg23	@arg24	@arg25	@arg26	@arg27	@arg28	@arg29	@arg30	@arg31	@arg32
+0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	1991-01-01 01:01:01	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1
+test_sequence
+-- insert into numeric columns --
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ;
+set @arg00= 21 ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt1 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ;
+execute stmt1 ;
+set @arg00= 23;
+prepare stmt2 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values 
+  (  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0,
+30.0, 30.0, 30.0 ) ;
+set @arg00= 31.0 ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt1 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0,
+    32.0, 32.0, 32.0 )" ;
+execute stmt1 ;
+set @arg00= 33.0;
+prepare stmt2 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values 
+  (  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,   ?,   ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( '40', '40', '40', '40', '40', '40', '40', '40',
+'40', '40', '40' ) ;
+set @arg00= '41' ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt1 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( '42', '42', '42', '42', '42', '42', '42', '42',
+    '42', '42', '42' )" ;
+execute stmt1 ;
+set @arg00= '43';
+prepare stmt2 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values 
+  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( CAST('50' as binary), CAST('50' as binary), 
+CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), 
+CAST('50' as binary), CAST('50' as binary), CAST('50' as binary),
+CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ;
+set @arg00= CAST('51' as binary) ;
+insert into t9 
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt1 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( CAST('52' as binary), CAST('52' as binary),
+  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), 
+  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary),
+  CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ;
+execute stmt1 ;
+set @arg00= CAST('53' as binary) ;
+prepare stmt2 from "insert into t9 
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values 
+  ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+set @arg00= 2 ;
+set @arg00= NULL ;
+insert into t9
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+NULL, NULL, NULL ) ;
+insert into t9
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 61, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt1 from "insert into t9
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL )" ;
+execute stmt1 ;
+prepare stmt2 from "insert into t9
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00 ;
+set @arg00= 8.0 ;
+set @arg00= NULL ;
+insert into t9
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 71, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt2 from "insert into t9
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00 ;
+set @arg00= 'abc' ;
+set @arg00= NULL ;
+insert into t9
+( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+( 81, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ) ;
+prepare stmt2 from "insert into t9
+  ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values
+  ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
+execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00 ;
+select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
+from t9 where c1 >= 20
+order by c1 ;
+c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c12
+20	20	20	20	20	20	20	20	20	20	20.0000
+21	21	21	21	21	21	21	21	21	21	21.0000
+22	22	22	22	22	22	22	22	22	22	22.0000
+23	23	23	23	23	23	23	23	23	23	23.0000
+30	30	30	30	30	30	30	30	30	30	30.0000
+31	31	31	31	31	31	31	31	31	31	31.0000
+32	32	32	32	32	32	32	32	32	32	32.0000
+33	33	33	33	33	33	33	33	33	33	33.0000
+40	40	40	40	40	40	40	40	40	40	40.0000
+41	41	41	41	41	41	41	41	41	41	41.0000
+42	42	42	42	42	42	42	42	42	42	42.0000
+43	43	43	43	43	43	43	43	43	43	43.0000
+50	50	50	50	50	50	50	50	50	50	50.0000
+51	51	51	51	51	51	51	51	51	51	51.0000
+52	52	52	52	52	52	52	52	52	52	52.0000
+53	53	53	53	53	53	53	53	53	53	53.0000
+60	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+61	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+62	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+63	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+71	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+73	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+81	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+83	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+test_sequence
+-- select .. where numeric column = .. --
+set @arg00= 20;
+select 'true' as found from t9 
+where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20
+and c8= 20 and c9= 20 and c10= 20 and c12= 20;
+found
+true
+select 'true' as found from t9 
+where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
+and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
+and c12= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20
+  and c8= 20 and c9= 20 and c10= 20 and c12= 20 ";
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
+  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
+  and c12= ? ";
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= 20.0;
+select 'true' as found from t9 
+where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0
+and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0;
+found
+true
+select 'true' as found from t9 
+where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
+and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
+and c12= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0
+  and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 ";
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
+  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
+  and c12= ? ";
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+found
+true
+select 'true' as found from t9 
+where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20'
+  and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20';
+found
+true
+prepare stmt1 from "select 'true' as found from t9
+where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20'
+  and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' ";
+execute stmt1 ;
+found
+true
+set @arg00= '20';
+select 'true' as found from t9 
+where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
+and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
+and c12= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
+  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
+  and c12= ? ";
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+found
+true
+select 'true' as found from t9 
+where c1= CAST('20' as binary) and c2= CAST('20' as binary) and 
+c3= CAST('20' as binary) and c4= CAST('20' as binary) and 
+c5= CAST('20' as binary) and c6= CAST('20' as binary) and 
+c7= CAST('20' as binary) and c8= CAST('20' as binary) and 
+c9= CAST('20' as binary) and c10= CAST('20' as binary) and 
+c12= CAST('20' as binary);
+found
+true
+prepare stmt1 from "select 'true' as found from t9
+where c1= CAST('20' as binary) and c2= CAST('20' as binary) and 
+      c3= CAST('20' as binary) and c4= CAST('20' as binary) and 
+      c5= CAST('20' as binary) and c6= CAST('20' as binary) and 
+      c7= CAST('20' as binary) and c8= CAST('20' as binary) and 
+      c9= CAST('20' as binary) and c10= CAST('20' as binary) and 
+      c12= CAST('20' as binary) ";
+execute stmt1 ;
+found
+true
+set @arg00= CAST('20' as binary) ;
+select 'true' as found from t9 
+where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 
+and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00
+and c12= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? 
+  and c6= ? and c7= ? and c8= ? and c9= ? and c10= ?
+  and c12= ? ";
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00 ;
+found
+true
+delete from t9 ;
+test_sequence
+-- some numeric overflow experiments --
+prepare my_insert from "insert into t9 
+   ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 )
+values 
+   ( 'O',  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,  ?,   ?,   ? )" ;
+prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
+from t9 where c21 = 'O' ";
+prepare my_delete from "delete from t9 where c21 = 'O' ";
+set @arg00= 9223372036854775807 ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
+c7	9.22337e+18
+c8	9.22337203685478e+18
+c9	9.22337203685478e+18
+c10	9.22337203685478e+18
+c12	9999.9999
+execute my_delete ;
+set @arg00= '9223372036854775807' ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
+c7	9.22337e+18
+c8	9.22337203685478e+18
+c9	9.22337203685478e+18
+c10	9.22337203685478e+18
+c12	9999.9999
+execute my_delete ;
+set @arg00= -9223372036854775808 ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
+c7	-9.22337e+18
+c8	-9.22337203685478e+18
+c9	-9.22337203685478e+18
+c10	-9.22337203685478e+18
+c12	-9999.9999
+execute my_delete ;
+set @arg00= '-9223372036854775808' ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
+c7	-9.22337e+18
+c8	-9.22337203685478e+18
+c9	-9.22337203685478e+18
+c10	-9.22337203685478e+18
+c12	-9999.9999
+execute my_delete ;
+set @arg00= 1.11111111111111111111e+50 ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
+c7	3.40282e+38
+c8	1.11111111111111e+50
+c9	1.11111111111111e+50
+c10	1.11111111111111e+50
+c12	9999.9999
+execute my_delete ;
+set @arg00= '1.11111111111111111111e+50' ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	127
+c2	32767
+c3	8388607
+c4	2147483647
+c5	2147483647
+c6	9223372036854775807
+c7	3.40282e+38
+c8	1.11111111111111e+50
+c9	1.11111111111111e+50
+c10	1.11111111111111e+50
+c12	9999.9999
+execute my_delete ;
+set @arg00= -1.11111111111111111111e+50 ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
+c7	-3.40282e+38
+c8	-1.11111111111111e+50
+c9	-1.11111111111111e+50
+c10	-1.11111111111111e+50
+c12	-9999.9999
+execute my_delete ;
+set @arg00= '-1.11111111111111111111e+50' ;
+execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+Warnings:
+Warning	1264	Out of range value for column 'c1' at row 1
+Warning	1264	Out of range value for column 'c2' at row 1
+Warning	1264	Out of range value for column 'c3' at row 1
+Warning	1264	Out of range value for column 'c4' at row 1
+Warning	1264	Out of range value for column 'c5' at row 1
+Warning	1264	Out of range value for column 'c6' at row 1
+Warning	1264	Out of range value for column 'c7' at row 1
+Warning	1264	Out of range value for column 'c12' at row 1
+execute my_select ;
+c1	-128
+c2	-32768
+c3	-8388608
+c4	-2147483648
+c5	-2147483648
+c6	-9223372036854775808
+c7	-3.40282e+38
+c8	-1.11111111111111e+50
+c9	-1.11111111111111e+50
+c10	-1.11111111111111e+50
+c12	-9999.9999
+execute my_delete ;
+test_sequence
+-- insert into string columns --
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c20' at row 1
+select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30
+from t9 where c1 >= 20
+order by c1 ;
+c1	c20	c21	c22	c23	c24	c25	c26	c27	c28	c29	c30
+20	2	20	20	20	20	20	20	20	20	20	20
+21	2	21	21	21	21	21	21	21	21	21	21
+22	2	22	22	22	22	22	22	22	22	22	22
+23	2	23	23	23	23	23	23	23	23	23	23
+30	3	30	30	30	30	30	30	30	30	30	30
+31	3	31	31	31	31	31	31	31	31	31	31
+32	3	32	32	32	32	32	32	32	32	32	32
+33	3	33	33	33	33	33	33	33	33	33	33
+40	4	40	40	40	40	40	40	40	40	40	40
+41	4	41	41	41	41	41	41	41	41	41	41
+42	4	42	42	42	42	42	42	42	42	42	42
+43	4	43	43	43	43	43	43	43	43	43	43
+50	5	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0	50.0
+51	5	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0	51.0
+52	5	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0	52.0
+53	5	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0	53.0
+54	5	54	54	54.00	54.00	54.00	54.00	54.00	54.00	54.00	54.00
+55	5	55	55	55	55	55	55	55	55	55	55
+56	6	56	56	56.00	56.00	56.00	56.00	56.00	56.00	56.00	56.00
+57	6	57	57	57.00	57.00	57.00	57.00	57.00	57.00	57.00	57.00
+60	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+61	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+62	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+63	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+71	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+73	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+81	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+83	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+test_sequence
+-- select .. where string column = .. --
+set @arg00= '20';
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and
+c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and
+c27= '20' and c28= '20' and c29= '20' and c30= '20' ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
+c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
+c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and
+  c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and
+  c27= '20' and c28= '20' and c29= '20' and c30= '20'" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
+  c21= ? and c22= ? and c23= ? and c25= ? and
+  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= CAST('20' as binary);
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20)))
+= CAST('20' as binary) and c21= CAST('20' as binary)
+and c22= CAST('20' as binary) and c23= CAST('20' as binary) and
+c24= CAST('20' as binary) and c25= CAST('20' as binary) and
+c26= CAST('20' as binary) and c27= CAST('20' as binary) and
+c28= CAST('20' as binary) and c29= CAST('20' as binary) and
+c30= CAST('20' as binary) ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and
+c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
+c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and
+c30= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20)))
+                 = CAST('20' as binary) and c21= CAST('20' as binary)
+  and c22= CAST('20' as binary) and c23= CAST('20' as binary) and
+  c24= CAST('20' as binary) and c25= CAST('20' as binary) and
+  c26= CAST('20' as binary) and c27= CAST('20' as binary) and
+  c28= CAST('20' as binary) and c29= CAST('20' as binary) and
+  c30= CAST('20' as binary)" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and
+  c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and
+  c29= ? and c30= ?";
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= 20;
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and
+c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and
+c27= 20 and c28= 20 and c29= 20 and c30= 20 ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
+c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
+c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and
+  c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and
+  c27= 20 and c28= 20 and c29= 20 and c30= 20" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
+  c21= ? and c22= ? and c23= ? and c25= ? and
+  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= 20.0;
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and
+c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and
+c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and
+c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and
+c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and
+  c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and
+  c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and
+  c21= ? and c22= ? and c23= ? and c25= ? and
+  c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ;
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, 
+@arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+delete from t9 ;
+test_sequence
+-- insert into date/time columns --
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Note	1265	Data truncated for column 'c13' at row 1
+Warning	1265	Data truncated for column 'c17' at row 1
+Warnings:
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1264	Out of range value for column 'c13' at row 1
+Warning	1264	Out of range value for column 'c14' at row 1
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+Warnings:
+Warning	1265	Data truncated for column 'c15' at row 1
+Warning	1264	Out of range value for column 'c16' at row 1
+Warning	1264	Out of range value for column 'c17' at row 1
+select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
+c1	c13	c14	c15	c16	c17
+20	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+21	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+22	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+23	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+30	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+31	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+32	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+33	1991-01-01	1991-01-01 01:01:01	1991-01-01 01:01:01	01:01:01	1991
+40	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+41	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+42	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+43	0000-00-00	0000-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+50	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+51	2010-00-00	2010-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+52	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+53	2001-00-00	2001-00-00 00:00:00	0000-00-00 00:00:00	838:59:59	0000
+60	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+61	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+62	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+63	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+71	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+73	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+81	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+83	NULL	NULL	1991-01-01 01:01:01	NULL	NULL
+test_sequence
+-- select .. where date/time column = .. --
+set @arg00= '1991-01-01 01:01:01' ;
+select 'true' as found from t9 
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
+c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
+c17= '1991-01-01 01:01:01' ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
+and c17= @arg00 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
+  c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
+  c17= '1991-01-01 01:01:01'" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= CAST('1991-01-01 01:01:01' as datetime) ;
+select 'true' as found from t9 
+where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and
+c14= CAST('1991-01-01 01:01:01' as datetime) and
+c15= CAST('1991-01-01 01:01:01' as datetime) and
+c16= CAST('1991-01-01 01:01:01' as datetime) and
+c17= CAST('1991-01-01 01:01:01' as datetime) ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
+and c17= @arg00 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and
+  c14= CAST('1991-01-01 01:01:01' as datetime) and
+  c15= CAST('1991-01-01 01:01:01' as datetime) and
+  c16= CAST('1991-01-01 01:01:01' as datetime) and
+  c17= CAST('1991-01-01 01:01:01' as datetime)" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
+execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
+found
+true
+set @arg00= 1991 ;
+select 'true' as found from t9 
+where c1= 20 and c17= 1991 ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and c17= @arg00 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and c17= 1991" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9
+where c1= 20 and c17= ?" ;
+execute stmt1 using @arg00 ;
+found
+true
+set @arg00= 1.991e+3 ;
+select 'true' as found from t9 
+where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ;
+found
+true
+select 'true' as found from t9 
+where c1= 20 and abs(c17 - @arg00) < 0.01 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9 
+where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ;
+execute stmt1 ;
+found
+true
+prepare stmt1 from "select 'true' as found from t9
+where c1= 20 and abs(c17 - ?) < 0.01" ;
+execute stmt1 using @arg00 ;
+found
+true
+drop table t1, t9;
diff -Nrup a/mysql-test/suite/falcon_team/r/read_many_rows_falcon.result b/mysql-test/suite/falcon_team/r/read_many_rows_falcon.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/r/read_many_rows_falcon.result	2008-04-20 01:07:41 +02:00
@@ -0,0 +1,35 @@
+SET SESSION STORAGE_ENGINE = Falcon;
+DROP TABLE IF EXISTS t1, t2, t3, t4;
+CREATE TABLE t1 (id INTEGER) ENGINE=MyISAM;
+CREATE TABLE t2 (id INTEGER PRIMARY KEY);
+CREATE TABLE t3 (a CHAR(32) PRIMARY KEY,id INTEGER);
+CREATE TABLE t4 (a CHAR(32) PRIMARY KEY,id INTEGER) ENGINE=MyISAM;
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t1 SELECT id+1 FROM t1;
+INSERT INTO t1 SELECT id+2 FROM t1;
+INSERT INTO t1 SELECT id+4 FROM t1;
+INSERT INTO t1 SELECT id+8 FROM t1;
+INSERT INTO t1 SELECT id+16 FROM t1;
+INSERT INTO t1 SELECT id+32 FROM t1;
+INSERT INTO t1 SELECT id+64 FROM t1;
+INSERT INTO t1 SELECT id+128 FROM t1;
+INSERT INTO t1 SELECT id+256 FROM t1;
+INSERT INTO t1 SELECT id+512 FROM t1;
+INSERT INTO t1 SELECT id+1024 FROM t1;
+INSERT INTO t1 SELECT id+2048 FROM t1;
+INSERT INTO t1 SELECT id+4096 FROM t1;
+INSERT INTO t1 SELECT id+8192 FROM t1;
+INSERT INTO t1 SELECT id+16384 FROM t1;
+INSERT INTO t1 SELECT id+32768 FROM t1;
+INSERT INTO t1 SELECT id+65536 FROM t1;
+INSERT INTO t1 SELECT id+131072 FROM t1;
+INSERT INTO t1 SELECT id+262144 FROM t1;
+INSERT INTO t1 SELECT id+524288 FROM t1;
+INSERT INTO t1 SELECT id+1048576 FROM t1;
+INSERT INTO t2 SELECT * FROM t1;
+INSERT INTO t3 SELECT CONCAT(id),id FROM t2 ORDER BY -id;
+INSERT INTO t4 SELECT * FROM t3 ORDER BY CONCAT(a);
+SELECT SUM(id) FROM t3;
+SUM(id)
+2199024304128
+DROP TABLE t1,t2,t3,t4;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22165.test b/mysql-test/suite/falcon_team/t/falcon_bug_22165.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22165.test	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,67 @@
+--source include/have_falcon.inc
+#
+# Bug #22165: ALTER crash if two interleaving transactions
+#
+--echo *** Bug #22165 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS db1.p1;
+DROP EVENT IF EXISTS db1.e1;
+DROP EVENT IF EXISTS db1.e2;
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+CREATE DATABASE db1;
+USE db1;
+delimiter //;
+CREATE PROCEDURE p1 ()
+begin
+  declare v int default 0;
+  declare continue handler for sqlexception
+  begin
+    declare continue handler for sqlexception begin end;
+    ALTER TABLE t1 MODIFY COLUMN c timestamp;
+  end;
+  SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+  while v < 10 do
+    START TRANSACTION;
+    INSERT INTO t1 (a, b) VALUES (v, 'a');
+    UPDATE t1 SET c = current_timestamp WHERE a = v;
+    COMMIT;
+    SET v = v + 1;
+  end while;
+end//
+delimiter ;//
+
+CREATE TABLE t1 (a bigint, b varchar(1000), c timestamp);
+
+CREATE EVENT e1 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
+CREATE EVENT e2 ON SCHEDULE EVERY 1 second DO CALL db1.p1();
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+SET GLOBAL event_scheduler = 1;
+--sleep 60
+SET GLOBAL event_scheduler = 0;
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+# Checking row count is not applicable here.
+#SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+USE test;
+DROP EVENT db1.e1;
+DROP EVENT db1.e2;
+DROP PROCEDURE db1.p1;
+DROP DATABASE db1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22166.test b/mysql-test/suite/falcon_team/t/falcon_bug_22166.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22166.test	2008-04-20 01:00:51 +02:00
@@ -0,0 +1,33 @@
+--source include/have_falcon.inc
+#
+# Bug #22166: Case insensitive table names
+#
+--echo *** Bug #22166 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t;
+DROP TABLE IF EXISTS T;
+--enable_warnings
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+CREATE TABLE t(id int);
+CREATE TABLE T(id int);
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+DROP TABLE t;
+DROP TABLE T;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22169.test b/mysql-test/suite/falcon_team/t/falcon_bug_22169.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22169.test	2008-04-20 01:01:57 +02:00
@@ -0,0 +1,63 @@
+--source include/have_falcon.inc
+SET STORAGE_ENGINE='Falcon';
+#
+# Bug #22169: Crash with count(distinct)
+#
+--echo *** Bug #22169 ***
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
+
+--disable_query_log
+SET @rnd_max= 2147483647;
+let $1 = 1000;
+while ($1)
+{
+  SET @rnd= RAND();
+  SET @id = CAST(@rnd * @rnd_max AS UNSIGNED);
+  SET @id_rev= @rnd_max - @id;
+  SET @grp= CAST(127.0 * @rnd AS UNSIGNED);
+  INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
+  dec $1;
+}
+set @@read_buffer_size=2*1024*1024;
+CREATE TABLE t2 SELECT * FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
+INSERT INTO t2 (id, grp, id_rev) SELECT id, grp, id_rev FROM t1;
+DROP TABLE t2;
+--enable_query_log
+
+# adding order by to make sure results match between engines
+SELECT COUNT(*) FROM t1 order by id;
+
+# As t1 contains random numbers, results are different from test to test.
+# That's okay, because we test only that select doesn't yield an
+# error. Note, that --disable_result_log doesn't suppress error output.
+
+# adding order by to make sure results match between engines
+
+--disable_result_log
+SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
+--enable_result_log
+DROP TABLE t1;
+
+set @@read_buffer_size=default;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22187.test b/mysql-test/suite/falcon_team/t/falcon_bug_22187.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22187.test	2008-04-20 01:02:34 +02:00
@@ -0,0 +1,25 @@
+--source include/have_falcon.inc
+SET STORAGE_ENGINE = Falcon;
+#
+# Bug #22187: Can't create FOREIGN KEY
+#
+--echo *** Bug #22187 ***
+--disable_warnings
+DROP TABLE IF EXISTS child;
+DROP TABLE IF EXISTS parent;
+--enable_warnings
+
+
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id));
+CREATE TABLE child (
+  id INT, 
+  parent_id INT,
+  INDEX par_ind (parent_id),
+  FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
+);
+
+SHOW CREATE TABLE child;
+
+# Final cleanup
+DROP TABLE child;
+DROP TABLE parent;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22189.test b/mysql-test/suite/falcon_team/t/falcon_bug_22189.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22189.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,75 @@
+--source include/have_falcon.inc
+SET @@storage_engine = Falcon;
+#
+# Bug #22189: Duplicate entry '1' for key 'PRIMARY'
+#
+--echo *** Bug #22189 ***
+--disable_warnings
+DROP DATABASE IF EXISTS db62;
+--enable_warnings
+
+--echo # Establish connection conn1 (user = root)
+connect (conn1,localhost,root,,);
+SET @@storage_engine = Falcon;
+
+--echo # Switch to connection default
+connection default;
+SET @@autocommit = 0;
+CREATE DATABASE db62;
+USE db62;
+DROP TABLE IF EXISTS x1;
+CREATE TABLE x1 (x1 int primary key, x2 int);
+COMMIT;
+INSERT INTO x1 VALUES (0,0),(1,1);
+COMMIT;
+DROP TABLE IF EXISTS x1;
+CREATE TABLE x1 (x1 int primary key, x2 int);
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+START TRANSACTION;
+SELECT * FROM x1;
+INSERT INTO x1 VALUES (0,0);
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @@autocommit = 1;
+USE db62;
+--send INSERT INTO x1 VALUES (1,1)
+
+--echo # Switch to connection default
+connection default;
+INSERT INTO x1 VALUES (1,2);
+
+--echo # Switch to connection conn1
+connection conn1;
+--send INSERT INTO x1 VALUES (0,3)
+
+--echo # Switch to connection default
+connection default;
+ROLLBACK;
+UPDATE x1 SET x1 = 1, x2 = 4;
+SELECT * FROM x1;
+
+--echo # Switch to connection conn1
+connection conn1;
+--send UPDATE x1 SET x1 = 0, x2 = 5
+--send INSERT INTO x1 VALUES (0,6)
+
+--echo # Switch to connection default
+connection default;
+ROLLBACK;
+
+--echo # Switch to connection conn1
+connection conn1;
+INSERT INTO x1 VALUES (0,6);
+--error ER_DUP_ENTRY
+INSERT INTO x1 VALUES (0,6);
+
+--echo # Switch to connection default
+connection default;
+SELECT * FROM x1;
+
+# Final cleanup
+disconnect conn1;
+connection default;
+DROP DATABASE db62;
+USE test;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_22207.test b/mysql-test/suite/falcon_team/t/falcon_bug_22207.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_22207.test	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,56 @@
+--source include/have_falcon.inc
+#
+# Record cache memory leak test inspired by Kevin.
+#
+# Note: Do not run in ramdisk!
+#   For Mantis bug #257, set the inner loop to 10 and the middle loop to 10,000.
+#   We set the middle loop to 500 to cope with run time on various Pushbuild machines.
+#
+SET STORAGE_ENGINE = 'Falcon';
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (c1 varchar(50), c2 int, c3 char(1));
+INSERT INTO t1 VALUES (repeat('A', 50), 0, 'A');
+INSERT INTO t1 VALUES (repeat('B', 50), 0, 'B');
+INSERT INTO t1 VALUES (repeat('C', 50), 0, 'C');
+#INSERT INTO t1 VALUES (repeat('D', 50), 0, 'D');
+#INSERT INTO t1 VALUES (repeat('E', 50), 0, 'E');
+#INSERT INTO t1 VALUES (repeat('F', 50), 0, 'F');
+#INSERT INTO t1 VALUES (repeat('G', 50), 0, 'G');
+#INSERT INTO t1 VALUES (repeat('H', 50), 0, 'H');
+#INSERT INTO t1 VALUES (repeat('I', 50), 0, 'I');
+COMMIT;
+
+# During this series of updates, there should be no increase in memory
+# since each previous record version should be freed once it is replaced.
+
+# Outer loop controls how many SELECTs are done.
+let $i= 10;
+while ($i) 
+{
+    # Next loop controls how often a COMMIT is done
+    --disable_query_log
+    let $j= 500;
+    while ($j) 
+    {
+        # Inner loop controls how many UPDATES are done.
+        BEGIN;
+        let $k= 10;
+        while ($k) 
+        {
+            UPDATE t1 SET c2 = c2 + 1, c1 = concat(rpad(conv(c2,10,10),10,'_'), repeat(c3, 40));
+            dec $k;
+        }
+        dec $j;
+        COMMIT;
+    }
+    --enable_query_log
+    SELECT c1 from t1;
+    dec $i;
+}
+
+
+# Final cleanup.
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_23692.test b/mysql-test/suite/falcon_team/t/falcon_bug_23692.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_23692.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,47 @@
+--source include/have_falcon.inc
+SET @@storage_engine = Falcon;
+#
+# Bug #23692: Falcon: searches fail if data is 0x00
+#
+--echo *** Bug #23692 ***
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+--enable_warnings
+
+CREATE TABLE t1 (a char(1), key (a));
+INSERT INTO t1 VALUES (0x00);
+SELECT count(*) FROM t1 WHERE a < '';
+SELECT count(*) FROM t1 WHERE a = '';
+SELECT count(*) FROM t1 WHERE a > '';
+
+CREATE TABLE t2 (a varbinary(5));
+CREATE INDEX i ON t2 (a);
+INSERT INTO t2 VALUES (0x02), (0x0202);
+SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
+SELECT hex(a) FROM t2 WHERE a < 0x02;
+SELECT hex(a) FROM t2 WHERE a = 0x02;
+SELECT hex(a) FROM t2 WHERE a > 0x02;
+
+CREATE TABLE t3 (a char(5));
+CREATE INDEX i ON t3 (a);
+INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
+SELECT hex(a) FROM t3 WHERE a < 0x42;
+SELECT hex(a) FROM t3 WHERE a = 0x42;
+SELECT hex(a) FROM t3 WHERE a > 0x42;
+SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
+
+CREATE TABLE t4 (s1 varchar(5) character set ucs2, key(s1)) engine=falcon;
+INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
+SELECT hex(a) FROM t4 WHERE a < 'a';
+SELECT hex(a) FROM t4 WHERE a = 'a';
+SELECT hex(a) FROM t4 WHERE a > 'a';
+SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
+
+# Final cleanup.
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP TABLE t4;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_23945.test b/mysql-test/suite/falcon_team/t/falcon_bug_23945.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_23945.test	2008-04-20 01:50:53 +02:00
@@ -0,0 +1,31 @@
+#
+# Bug #23945: crash during drop table, AUTOCOMMIT=0, CREATE TABLE .. AS SELECT
+#
+--echo *** Bug #23945 ***
+
+
+# --source include/have_innodb.inc
+# SET STORAGE_ENGINE = InnoDB;
+--source include/have_falcon.inc
+SET STORAGE_ENGINE = Falcon;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SET AUTOCOMMIT = 1;
+--error ER_DUP_ENTRY
+CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t1;
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+
+SET AUTOCOMMIT = 0;
+--error ER_DUP_ENTRY
+CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t1;
+# Here comes a server crash.
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_23962.test b/mysql-test/suite/falcon_team/t/falcon_bug_23962.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_23962.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,18 @@
+--source include/have_falcon.inc
+SET STORAGE_ENGINE = Falcon;
+#
+# Bug #23962: Wrong results with > search
+#
+--echo *** Bug #23962 ***
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a char(5), KEY (a));
+INSERT INTO t1 VALUES ('a'), ('aa'), ('aaa'), ('abc'), ('bbb');
+
+SELECT * FROM t1 WHERE a > 'a'  ORDER BY a;
+SELECT * FROM t1 WHERE a > 'aa' ORDER BY a;
+
+# Final cleanup.
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_24024.test b/mysql-test/suite/falcon_team/t/falcon_bug_24024.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_24024.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,36 @@
+#
+# Bug#24024 wrong error message when drop table (used by pending transaction) fails
+#
+# This test is a derivate of a subtestcase in mix2.inc.
+# Therefore please delete this test when mix2_falcon is pushed.
+#
+
+--echo *** Bug #24024 ***
+
+
+--source include/have_falcon.inc
+SET SESSION STORAGE_ENGINE = Falcon;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1(a INT NOT NULL, b INT, primary key(a));
+INSERT INTO t1(a) VALUES (1);
+COMMIT;
+SET AUTOCOMMIT = 0;
+UPDATE t1 SET b = 5 WHERE a = 1;
+--echo # Establish session con1 (user=root)
+connect (con1,localhost,root);
+INSERT INTO t1(a) VALUES(7);
+COMMIT;
+SELECT * FROM t1;
+
+--disable_abort_on_error
+DROP TABLE t1;
+COMMIT;
+
+--echo # Switch to session default and disconnect session con1
+connection default;
+disconnect con1;
+COMMIT;
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_26058.test b/mysql-test/suite/falcon_team/t/falcon_bug_26058.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_26058.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,34 @@
+--source include/have_falcon.inc
+#
+# Bug #26058: Falcon: warnings with yen sign and overline in ujis
+#
+--echo *** Bug #26058 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SET NAMES utf8;
+CREATE TABLE t1 (a varchar(5) character set ujis);
+INSERT INTO t1 values ('¥'),('‾');
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1 WHERE a IS NOT NULL;
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_27997.test b/mysql-test/suite/falcon_team/t/falcon_bug_27997.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_27997.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,47 @@
+--source include/have_falcon.inc
+#
+# Bug #27997: Falcon: unique violation after select for update
+#
+--echo *** Bug #27997 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SET @@autocommit = 0;
+CREATE TABLE t1 (a int, b int);
+CREATE UNIQUE INDEX i1 on t1 (a, b);
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+INSERT INTO t1 VALUES (5, NULL), (5, NULL);
+COMMIT;
+SELECT * FROM t1 FOR UPDATE;
+--error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+UPDATE t1 SET b = 2;
+COMMIT;
+--error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
+UPDATE t1 SET b = 2;
+COMMIT;
+UPDATE t1 SET a = 3, b = 2 WHERE a = 5 LIMIT 1;
+COMMIT;
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+SELECT count(*) FROM t1 WHERE a = 5;
+SELECT count(*) FROM t1 WHERE a = 3;
+COMMIT;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/falcon_team/t/falcon_bug_28006.test b/mysql-test/suite/falcon_team/t/falcon_bug_28006.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon_team/t/falcon_bug_28006.test	2008-04-20 01:03:55 +02:00
@@ -0,0 +1,63 @@
+--source include/have_falcon.inc
+#
+# Bug #28006: Falcon: isolation failed after alter
+# Note: related to Bug#15491 "ALTER TABLE violates REPEATABLE READ"
+#
+--echo *** Bug #28006 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
Thread
bk commit into 6.0 tree (hakank:1.2624)Hakan Kuecuekyilmaz20 Apr