diff options
author | gshchepa/uchum@gleb.loc <> | 2007-07-07 20:14:06 +0500 |
---|---|---|
committer | gshchepa/uchum@gleb.loc <> | 2007-07-07 20:14:06 +0500 |
commit | e657075fcb6e5ca65cb0d84ad77266ef096f6493 (patch) | |
tree | a95fb8d593c69b8db4fa05ae09a5b11c223c117c /mysql-test/t | |
parent | 23a30b0c0aea7e7c2365cb375da85ccaaf362e07 (diff) | |
parent | 5b1e1eeae5f0743d8f8f01010211432a17bb04b3 (diff) | |
download | mariadb-git-e657075fcb6e5ca65cb0d84ad77266ef096f6493.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/gis.test | 20 | ||||
-rw-r--r-- | mysql-test/t/loaddata.test | 25 | ||||
-rw-r--r-- | mysql-test/t/view.test | 54 |
3 files changed, 99 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 426eec4be6d..d7182e36e3a 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -571,6 +571,26 @@ create table t2 as select f2 as a from t1 union select f3 from t1; desc t2; select AsText(a) from t2; drop table t1, t2; + +# +# Bug #29166: MYsql crash when query is run +# + +# The test query itself is not logged : too large output. +# The real test is the second query : see if the first hasn't crashed the +# server +--disable_query_log +--disable_result_log +SELECT AsText(GeometryFromText(CONCAT( + 'MULTIPOLYGON(((', + REPEAT ('-0.00000000001234567890123456789012 -0.123456789012345678,', 1000), + '-0.00000000001234567890123456789012 -0.123456789012345678', + ')))' +))) AS a; +--enable_result_log +--enable_query_log +SELECT 1; + --echo End of 5.0 tests diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 82fafbf6e73..4a4f667d3ea 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -217,6 +217,31 @@ select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; --exec rm $MYSQLTEST_VARDIR/tmp/t2 drop table t1,t2; +# +# Bug#29442: SELECT INTO OUTFILE FIELDS ENCLOSED BY digit, minus sign etc +# corrupts non-string fields containing this character. +# + +CREATE TABLE t1 (c1 INT, c2 TIMESTAMP, c3 REAL, c4 DOUBLE); + +INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100); +SELECT * FROM t1; + +--exec rm -f $MYSQLTEST_VARDIR/tmp/t1 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; +--exec cat $MYSQLTEST_VARDIR/tmp/t1 +--exec echo EOF + +TRUNCATE t1; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-'; +SELECT * FROM t1; + +--exec rm $MYSQLTEST_VARDIR/tmp/t1 +DROP TABLE t1; + # End of 5.0 tests diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index ee807a1ae25..68b2a38aa27 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3348,6 +3348,60 @@ EXPLAIN SELECT a, SUM(b) FROM v1 WHERE a=1 GROUP BY a; DROP VIEW v1; DROP TABLE t1; +# +# Bug #29392: SELECT over a multi-table view with ORDER BY +# selecting the same view column with two different aliases +# + +CREATE TABLE t1 ( + person_id int NOT NULL PRIMARY KEY, + username varchar(40) default NULL, + status_flg char(1) NOT NULL default 'A' +); + +CREATE TABLE t2 ( + person_role_id int NOT NULL auto_increment PRIMARY KEY, + role_id int NOT NULL, + person_id int NOT NULL, + INDEX idx_person_id (person_id), + INDEX idx_role_id (role_id) +); + +CREATE TABLE t3 ( + role_id int NOT NULL auto_increment PRIMARY KEY, + role_name varchar(100) default NULL, + app_name varchar(40) NOT NULL, + INDEX idx_app_name(app_name) +); + +CREATE VIEW v1 AS +SELECT profile.person_id AS person_id + FROM t1 profile, t2 userrole, t3 role + WHERE userrole.person_id = profile.person_id AND + role.role_id = userrole.role_id AND + profile.status_flg = 'A' + ORDER BY profile.person_id,role.app_name,role.role_name; + +INSERT INTO t1 VALUES + (6,'Sw','A'), (-1136332546,'ols','e'), (0,' *\n','0'), + (-717462680,'ENTS Ta','0'), (-904346964,'ndard SQL\n','0'); + +INSERT INTO t2 VALUES + (1,3,6),(2,4,7),(3,5,8),(4,6,9),(5,1,6),(6,1,7),(7,1,8),(8,1,9),(9,1,10); + +INSERT INTO t3 VALUES + (1,'NUCANS_APP_USER','NUCANSAPP'),(2,'NUCANS_TRGAPP_USER','NUCANSAPP'), + (3,'IA_INTAKE_COORDINATOR','IACANS'),(4,'IA_SCREENER','IACANS'), + (5,'IA_SUPERVISOR','IACANS'),(6,'IA_READONLY','IACANS'), + (7,'SOC_USER','SOCCANS'),(8,'CAYIT_USER','CAYITCANS'), + (9,'RTOS_DCFSPOS_SUPERVISOR','RTOS'); + +EXPLAIN SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; +SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; + +DROP VIEW v1; +DROP TABLE t1,t2,t3; + --echo End of 5.0 tests. # |