Debian Codegraph @

mysql-test/suite/ndb/r/ndb_load.result

raw
1 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB;
2 LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
3 ERROR 23000: Can't write; duplicate key in table 't1'
4 DROP TABLE t1;
5 CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB;
6 LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ;
7 SELECT * FROM t1 ORDER BY word;
8 word
9 Aarhus
10 Aarhus
11 Aaron
12 Aaron
13 Ababa
14 Ababa
15 aback
16 aback
17 abaft
18 abaft
19 abandon
20 abandon
21 abandoned
22 abandoned
23 abandoning
24 abandoning
25 abandonment
26 abandonment
27 abandons
28 abandons
29 abase
30 abased
31 abasement
32 abasements
33 abases
34 abash
35 abashed
36 abashes
37 abashing
38 abasing
39 abate
40 abated
41 abatement
42 abatements
43 abater
44 abates
45 abating
46 Abba
47 abbe
48 abbey
49 abbeys
50 abbot
51 abbots
52 Abbott
53 abbreviate
54 abbreviated
55 abbreviates
56 abbreviating
57 abbreviation
58 abbreviations
59 Abby
60 abdomen
61 abdomens
62 abdominal
63 abduct
64 abducted
65 abduction
66 abductions
67 abductor
68 abductors
69 abducts
70 Abe
71 abed
72 Abel
73 Abelian
74 Abelson
75 Aberdeen
76 Abernathy
77 aberrant
78 aberration
79 DROP TABLE t1;
80 Test single statement load from MyISAM table with and
81 without ndb_use_transactions
82 (Bug#43236)
83 ndb_use_transactions = 0 should allow bulk inserts to
84 succeed by automatically splitting into smaller
85 transactions.
86 CREATE TABLE t1 (a int) engine=MyIsam;
87 show tables;
88 Tables_in_test
89 t1
90 CREATE PROCEDURE bulkinsert (in num int)
91 BEGIN
92 set @total= num;
93 repeat
94 insert into t1 values (@total);
95 set @total= @total -1;
96 until @total = 0 end repeat;
97 end %
98 Insert 15000 rows which should exceed default number
99 of concurrent operations (include/default_ndbd.cnf)
100 when trying to move over to ndb.
101 CALL bulkinsert(15000);
102 show tables;
103 Tables_in_test
104 t1
105 SELECT COUNT(*) FROM t1;
106 COUNT(*)
107 15000
108 SET ndb_use_transactions= 1;
109 CREATE TABLE t2 (a int) engine=Ndb;
110 Will fail with too many concurrent operations error
111 INSERT INTO t2 SELECT * FROM t1;
112 Got one of the listed errors
113 SELECT COUNT(*) FROM t2;
114 COUNT(*)
115 0
116 SET ndb_use_transactions= 0;
117 Should pass as insert is split
118 into multiple transactions
119 INSERT INTO t2 SELECT * FROM t1;
120 SELECT COUNT(*) FROM t2;
121 COUNT(*)
122 15000
123 DROP PROCEDURE bulkinsert;
124 DROP TABLE t2;
125 Now check bulk insert using create .. as select.
126 SHOW VARIABLES LIKE 'default_storage_engine';
127 Variable_name Value
128 default_storage_engine InnoDB
129 SET default_storage_engine="ndb";
130 CREATE TABLE t2 AS SELECT * FROM t1;
131 SELECT COUNT(*) FROM t2;
132 COUNT(*)
133 15000
134 DROP TABLE t2;
135 SET default_storage_engine="InnoDB";
136 Now check Alter table to Ndb
137 ALTER TABLE t1 ENGINE= Ndb;
138 SELECT COUNT(*) FROM t1;
139 COUNT(*)
140 15000
141 Now check Alter table within Ndb
142 ALTER TABLE t1 ADD COLUMN extra int default 6;
143 SELECT COUNT(*) FROM t1;
144 COUNT(*)
145 15000
146 DROP TABLE t1;