summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2006-02-07 00:06:28 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2006-02-07 00:06:28 +0100
commit79cc96647afbc74af1059df4751b0236cd7ff398 (patch)
treeb9533ddc22ac9fb0f670dedf7771da617616a0b8 /mysql-test
parent2ba25676d7d835d53f591b8d8eb4cde84445b313 (diff)
parent8deb6616bc80eb883b6243077acd9a01ae5fae03 (diff)
downloadmariadb-git-79cc96647afbc74af1059df4751b0236cd7ff398.tar.gz
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 sql/ha_ndbcluster.cc: Auto merged sql/sql_load.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ndb_load.result80
-rw-r--r--mysql-test/t/ndb_load.test24
2 files changed, 104 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_load.result b/mysql-test/r/ndb_load.result
new file mode 100644
index 00000000000..76da5b2a215
--- /dev/null
+++ b/mysql-test/r/ndb_load.result
@@ -0,0 +1,80 @@
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ;
+ERROR 23000: Can't write; duplicate key in table 't1'
+DROP TABLE t1;
+CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ;
+SELECT * FROM t1 ORDER BY word;
+word
+Aarhus
+Aarhus
+Aaron
+Aaron
+Ababa
+Ababa
+aback
+aback
+abaft
+abaft
+abandon
+abandon
+abandoned
+abandoned
+abandoning
+abandoning
+abandonment
+abandonment
+abandons
+abandons
+abase
+abased
+abasement
+abasements
+abases
+abash
+abashed
+abashes
+abashing
+abasing
+abate
+abated
+abatement
+abatements
+abater
+abates
+abating
+Abba
+abbe
+abbey
+abbeys
+abbot
+abbots
+Abbott
+abbreviate
+abbreviated
+abbreviates
+abbreviating
+abbreviation
+abbreviations
+Abby
+abdomen
+abdomens
+abdominal
+abduct
+abducted
+abduction
+abductions
+abductor
+abductors
+abducts
+Abe
+abed
+Abel
+Abelian
+Abelson
+Aberdeen
+Abernathy
+aberrant
+aberration
+DROP TABLE t1;
diff --git a/mysql-test/t/ndb_load.test b/mysql-test/t/ndb_load.test
new file mode 100644
index 00000000000..72a5b53eaad
--- /dev/null
+++ b/mysql-test/t/ndb_load.test
@@ -0,0 +1,24 @@
+-- source include/have_ndb.inc
+-- source include/not_embedded.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+#
+# Basic test for different types of loading data
+#
+
+# should give duplicate key
+CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB;
+--error 1022
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ;
+DROP TABLE t1;
+
+# now without a primary key we should be ok
+CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB;
+LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ;
+SELECT * FROM t1 ORDER BY word;
+DROP TABLE t1;
+
+# End of 4.1 tests