summaryrefslogtreecommitdiff
path: root/mysql-test/r/loaddata.result
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@quad.opbmk>2008-03-28 23:54:14 +0300
committerunknown <anozdrin/alik@quad.opbmk>2008-03-28 23:54:14 +0300
commit45ffe7183d52cff39415e032cf9d17764b195fc0 (patch)
tree85242b633c62e746d21c1dad825299b1b1ad2b1e /mysql-test/r/loaddata.result
parente44403fe31963ef9fe8a574f0e159b9b0b67e196 (diff)
parent7021064aaee66583e8fb2775a335739d6c66fbe5 (diff)
downloadmariadb-git-45ffe7183d52cff39415e032cf9d17764b195fc0.tar.gz
Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-bt
into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-bt-merged mysql-test/t/loaddata.test: Auto merged mysql-test/r/loaddata.result: Manually merged. sql/share/errmsg.txt: Manually merged. sql/sql_load.cc: Manually merged.
Diffstat (limited to 'mysql-test/r/loaddata.result')
-rw-r--r--mysql-test/r/loaddata.result76
1 files changed, 76 insertions, 0 deletions
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 98e221b0dea..0ceef10ec5d 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -288,3 +288,79 @@ SET character_set_filesystem=default;
select @@character_set_filesystem;
@@character_set_filesystem
binary
+
+# --
+# -- Bug#35469: server crash with LOAD DATA INFILE to a VIEW.
+# --
+
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+DROP VIEW IF EXISTS v3;
+
+CREATE TABLE t1(c1 INT, c2 VARCHAR(255));
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1;
+CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2;
+
+LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v1
+FIELDS ESCAPED BY '\\'
+ TERMINATED BY ','
+ ENCLOSED BY '"'
+ LINES TERMINATED BY '\n' (c1, c2);
+
+SELECT * FROM t1;
+c1 c2
+1 "string1"
+2 "string2"
+3 "string3"
+
+SELECT * FROM v1;
+c1 c2
+1 "string1"
+2 "string2"
+3 "string3"
+
+DELETE FROM t1;
+
+LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2
+FIELDS ESCAPED BY '\\'
+ TERMINATED BY ','
+ ENCLOSED BY '"'
+ LINES TERMINATED BY '\n' (c1, c2);
+
+SELECT * FROM t1;
+c1 c2
+1 "string1"
+2 "string2"
+3 "string3"
+
+SELECT * FROM v2;
+c0 c1 c2
+3 1 "string1"
+3 2 "string2"
+3 3 "string3"
+
+DELETE FROM t1;
+
+LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2
+FIELDS ESCAPED BY '\\'
+ TERMINATED BY ','
+ ENCLOSED BY '"'
+ LINES TERMINATED BY '\n' (c0, c2);
+ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA
+
+LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v3
+FIELDS ESCAPED BY '\\'
+ TERMINATED BY ','
+ ENCLOSED BY '"'
+ LINES TERMINATED BY '\n' (d1, d2);
+ERROR HY000: The target table v3 of the LOAD is not updatable
+
+DROP TABLE t1;
+DROP VIEW v1;
+DROP VIEW v2;
+DROP VIEW v3;
+
+# -- End of Bug#35469.