1
DROP TABLE IF EXISTS t1;
2
DROP TABLE IF EXISTS t2;
3
DROP TABLE IF EXISTS t3;
4
DROP TABLE IF EXISTS t4;
6
SET character_set_database = ujis;
7
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = InnoDB;
8
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = InnoDB;
13
)DEFAULT CHARSET = ujis ENGINE = InnoDB;
14
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE = InnoDB;
15
INSERT INTO t1 VALUES ('xxx');
16
INSERT INTO t2 VALUES ('�������');
17
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
18
INSERT INTO t4 VALUES ('��'),('��'),('���');
19
PREPARE stmt1 FROM 'SELECT ? FROM t3';
20
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
21
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
22
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
23
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
24
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
25
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
26
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
27
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
28
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
29
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
30
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
31
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
32
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';
34
EXECUTE stmt1 USING @arg;
42
EXECUTE stmt2 USING @arg;
50
EXECUTE stmt3 USING @arg;
53
EXECUTE stmt4 USING @arg;
56
EXECUTE stmt5 USING @arg;
59
EXECUTE stmt6 USING @arg;
62
EXECUTE stmt7 USING @arg;
65
EXECUTE stmt8 USING @arg;
68
EXECUTE stmt9 USING @arg;
71
EXECUTE stmt10 USING @arg;
74
EXECUTE stmt11 USING @arg;
77
EXECUTE stmt12 USING @arg;
80
EXECUTE stmt13 USING @arg;
86
EXECUTE stmt14 USING @arg;
93
EXECUTE stmt1 USING @arg;
101
EXECUTE stmt2 USING @arg;
109
EXECUTE stmt3 USING @arg;
112
EXECUTE stmt4 USING @arg;
115
EXECUTE stmt5 USING @arg;
118
EXECUTE stmt6 USING @arg;
121
EXECUTE stmt7 USING @arg;
124
EXECUTE stmt8 USING @arg;
127
EXECUTE stmt9 USING @arg;
130
EXECUTE stmt10 USING @arg;
133
EXECUTE stmt11 USING @arg;
136
EXECUTE stmt12 USING @arg;
139
EXECUTE stmt13 USING @arg;
145
EXECUTE stmt14 USING @arg;
152
EXECUTE stmt1 USING @arg;
160
EXECUTE stmt2 USING @arg;
168
EXECUTE stmt3 USING @arg;
171
EXECUTE stmt4 USING @arg;
174
EXECUTE stmt5 USING @arg;
177
EXECUTE stmt6 USING @arg;
180
EXECUTE stmt7 USING @arg;
183
EXECUTE stmt8 USING @arg;
186
EXECUTE stmt9 USING @arg;
189
EXECUTE stmt10 USING @arg;
192
EXECUTE stmt11 USING @arg;
195
EXECUTE stmt12 USING @arg;
198
EXECUTE stmt13 USING @arg;
204
EXECUTE stmt14 USING @arg;
210
DEALLOCATE PREPARE stmt1;
211
DEALLOCATE PREPARE stmt2;
212
DEALLOCATE PREPARE stmt3;
213
DEALLOCATE PREPARE stmt4;
214
DEALLOCATE PREPARE stmt5;
215
DEALLOCATE PREPARE stmt6;
216
DEALLOCATE PREPARE stmt7;
217
DEALLOCATE PREPARE stmt8;
218
DEALLOCATE PREPARE stmt9;
219
DEALLOCATE PREPARE stmt10;
220
DEALLOCATE PREPARE stmt11;
221
DEALLOCATE PREPARE stmt12;
222
DEALLOCATE PREPARE stmt13;
223
DEALLOCATE PREPARE stmt14;
228
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MyISAM;
229
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = MyISAM;
234
)DEFAULT CHARSET = ujis ENGINE = MyISAM;
235
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE = MyISAM;
236
INSERT INTO t1 VALUES ('xxx');
237
INSERT INTO t2 VALUES ('�������');
238
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
239
INSERT INTO t4 VALUES ('��'),('��'),('���' );
240
PREPARE stmt1 FROM 'SELECT ? FROM t3';
241
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
242
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
243
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
244
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
245
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
246
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
247
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
248
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
249
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
250
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
251
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
252
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
253
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';
255
EXECUTE stmt1 USING @arg;
263
EXECUTE stmt2 USING @arg;
271
EXECUTE stmt3 USING @arg;
274
EXECUTE stmt4 USING @arg;
277
EXECUTE stmt5 USING @arg;
280
EXECUTE stmt6 USING @arg;
283
EXECUTE stmt7 USING @arg;
286
EXECUTE stmt8 USING @arg;
289
EXECUTE stmt9 USING @arg;
292
EXECUTE stmt10 USING @arg;
295
EXECUTE stmt11 USING @arg;
298
EXECUTE stmt12 USING @arg;
301
EXECUTE stmt13 USING @arg;
307
EXECUTE stmt14 USING @arg;
314
EXECUTE stmt1 USING @arg;
322
EXECUTE stmt2 USING @arg;
330
EXECUTE stmt3 USING @arg;
333
EXECUTE stmt4 USING @arg;
336
EXECUTE stmt5 USING @arg;
339
EXECUTE stmt6 USING @arg;
342
EXECUTE stmt7 USING @arg;
345
EXECUTE stmt8 USING @arg;
348
EXECUTE stmt9 USING @arg;
351
EXECUTE stmt10 USING @arg;
354
EXECUTE stmt11 USING @arg;
357
EXECUTE stmt12 USING @arg;
360
EXECUTE stmt13 USING @arg;
366
EXECUTE stmt14 USING @arg;
373
EXECUTE stmt1 USING @arg;
381
EXECUTE stmt2 USING @arg;
389
EXECUTE stmt3 USING @arg;
392
EXECUTE stmt4 USING @arg;
395
EXECUTE stmt5 USING @arg;
398
EXECUTE stmt6 USING @arg;
401
EXECUTE stmt7 USING @arg;
404
EXECUTE stmt8 USING @arg;
407
EXECUTE stmt9 USING @arg;
410
EXECUTE stmt10 USING @arg;
413
EXECUTE stmt11 USING @arg;
416
EXECUTE stmt12 USING @arg;
419
EXECUTE stmt13 USING @arg;
425
EXECUTE stmt14 USING @arg;
431
DEALLOCATE PREPARE stmt1;
432
DEALLOCATE PREPARE stmt2;
433
DEALLOCATE PREPARE stmt3;
434
DEALLOCATE PREPARE stmt4;
435
DEALLOCATE PREPARE stmt5;
436
DEALLOCATE PREPARE stmt6;
437
DEALLOCATE PREPARE stmt7;
438
DEALLOCATE PREPARE stmt8;
439
DEALLOCATE PREPARE stmt9;
440
DEALLOCATE PREPARE stmt10;
441
DEALLOCATE PREPARE stmt11;
442
DEALLOCATE PREPARE stmt12;
443
DEALLOCATE PREPARE stmt13;
444
DEALLOCATE PREPARE stmt14;
449
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = HEAP;
450
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = HEAP;
455
)DEFAULT CHARSET = ujis ENGINE = HEAP;
456
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE =HEAP;
457
INSERT INTO t1 VALUES ('xxx');
458
INSERT INTO t2 VALUES ('�������');
459
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
460
INSERT INTO t4 VALUES ('��'),('��'),('���' );
461
PREPARE stmt1 FROM 'SELECT ? FROM t3';
462
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
463
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
464
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
465
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
466
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
467
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
468
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
469
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
470
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
471
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
472
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
473
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
474
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';
476
EXECUTE stmt1 USING @arg;
484
EXECUTE stmt2 USING @arg;
492
EXECUTE stmt3 USING @arg;
495
EXECUTE stmt4 USING @arg;
498
EXECUTE stmt5 USING @arg;
501
EXECUTE stmt6 USING @arg;
504
EXECUTE stmt7 USING @arg;
507
EXECUTE stmt8 USING @arg;
510
EXECUTE stmt9 USING @arg;
513
EXECUTE stmt10 USING @arg;
516
EXECUTE stmt11 USING @arg;
519
EXECUTE stmt12 USING @arg;
522
EXECUTE stmt13 USING @arg;
528
EXECUTE stmt14 USING @arg;
535
EXECUTE stmt1 USING @arg;
543
EXECUTE stmt2 USING @arg;
551
EXECUTE stmt3 USING @arg;
554
EXECUTE stmt4 USING @arg;
557
EXECUTE stmt5 USING @arg;
560
EXECUTE stmt6 USING @arg;
563
EXECUTE stmt7 USING @arg;
566
EXECUTE stmt8 USING @arg;
569
EXECUTE stmt9 USING @arg;
572
EXECUTE stmt10 USING @arg;
575
EXECUTE stmt11 USING @arg;
578
EXECUTE stmt12 USING @arg;
581
EXECUTE stmt13 USING @arg;
587
EXECUTE stmt14 USING @arg;
594
EXECUTE stmt1 USING @arg;
602
EXECUTE stmt2 USING @arg;
610
EXECUTE stmt3 USING @arg;
613
EXECUTE stmt4 USING @arg;
616
EXECUTE stmt5 USING @arg;
619
EXECUTE stmt6 USING @arg;
622
EXECUTE stmt7 USING @arg;
625
EXECUTE stmt8 USING @arg;
628
EXECUTE stmt9 USING @arg;
631
EXECUTE stmt10 USING @arg;
634
EXECUTE stmt11 USING @arg;
637
EXECUTE stmt12 USING @arg;
640
EXECUTE stmt13 USING @arg;
646
EXECUTE stmt14 USING @arg;
652
DEALLOCATE PREPARE stmt1;
653
DEALLOCATE PREPARE stmt2;
654
DEALLOCATE PREPARE stmt3;
655
DEALLOCATE PREPARE stmt4;
656
DEALLOCATE PREPARE stmt5;
657
DEALLOCATE PREPARE stmt6;
658
DEALLOCATE PREPARE stmt7;
659
DEALLOCATE PREPARE stmt8;
660
DEALLOCATE PREPARE stmt9;
661
DEALLOCATE PREPARE stmt10;
662
DEALLOCATE PREPARE stmt11;
663
DEALLOCATE PREPARE stmt12;
664
DEALLOCATE PREPARE stmt13;
665
DEALLOCATE PREPARE stmt14;
670
CREATE TABLE t1(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = BDB;
671
CREATE TABLE t2(c1 char(3)) DEFAULT CHARSET = ujis ENGINE = BDB;
676
)DEFAULT CHARSET = ujis ENGINE = BDB;
677
CREATE TABLE t4(c1 char(1)) DEFAULT CHARSET = ujis ENGINE = BDB;
678
INSERT INTO t1 VALUES ('xxx');
679
INSERT INTO t2 VALUES ('�������');
680
INSERT INTO t3 VALUES ('x','x','x'),('x','x','x'),('y','y','y'),('y','y','y'),('z','z','z'),('z','z','z');
681
INSERT INTO t4 VALUES ('��'),('��'),('���' );
682
PREPARE stmt1 FROM 'SELECT ? FROM t3';
683
PREPARE stmt2 FROM 'SELECT * FROM t3 ORDER BY ?';
684
PREPARE stmt3 FROM 'SELECT COUNT(*) FROM t3 GROUP BY ?';
685
PREPARE stmt4 FROM 'SELECT CHAR_LENGTH(?)';
686
PREPARE stmt5 FROM 'SELECT CHARSET(?)';
687
PREPARE stmt6 FROM 'SELECT INSERT(c1,1,1,?) FROM t1';
688
PREPARE stmt7 FROM 'SELECT INSTR(c1,?) FROM t2';
689
PREPARE stmt8 FROM 'SELECT LOCATE(?,c1) FROM t2';
690
PREPARE stmt9 FROM 'SELECT LPAD(c1,9,?) FROM t1';
691
PREPARE stmt10 FROM 'SELECT REPLACE(c1,?,\'x\') FROM t2';
692
PREPARE stmt11 FROM 'SELECT REPLACE(c1,\'x\',?) FROM t1';
693
PREPARE stmt12 FROM 'SELECT RPAD(c1,9,?) FROM t1';
694
PREPARE stmt13 FROM 'UPDATE t4 SET c1=\'x\' WHERE c1=?';
695
PREPARE stmt14 FROM 'UPDATE t4 SET c1=? WHERE c1=\'x\'';
697
EXECUTE stmt1 USING @arg;
705
EXECUTE stmt2 USING @arg;
713
EXECUTE stmt3 USING @arg;
716
EXECUTE stmt4 USING @arg;
719
EXECUTE stmt5 USING @arg;
722
EXECUTE stmt6 USING @arg;
725
EXECUTE stmt7 USING @arg;
728
EXECUTE stmt8 USING @arg;
731
EXECUTE stmt9 USING @arg;
734
EXECUTE stmt10 USING @arg;
737
EXECUTE stmt11 USING @arg;
740
EXECUTE stmt12 USING @arg;
743
EXECUTE stmt13 USING @arg;
752
EXECUTE stmt14 USING @arg;
762
EXECUTE stmt1 USING @arg;
770
EXECUTE stmt2 USING @arg;
778
EXECUTE stmt3 USING @arg;
781
EXECUTE stmt4 USING @arg;
784
EXECUTE stmt5 USING @arg;
787
EXECUTE stmt6 USING @arg;
790
EXECUTE stmt7 USING @arg;
793
EXECUTE stmt8 USING @arg;
796
EXECUTE stmt9 USING @arg;
799
EXECUTE stmt10 USING @arg;
802
EXECUTE stmt11 USING @arg;
805
EXECUTE stmt12 USING @arg;
808
EXECUTE stmt13 USING @arg;
814
EXECUTE stmt14 USING @arg;
821
EXECUTE stmt1 USING @arg;
829
EXECUTE stmt2 USING @arg;
837
EXECUTE stmt3 USING @arg;
840
EXECUTE stmt4 USING @arg;
843
EXECUTE stmt5 USING @arg;
846
EXECUTE stmt6 USING @arg;
849
EXECUTE stmt7 USING @arg;
852
EXECUTE stmt8 USING @arg;
855
EXECUTE stmt9 USING @arg;
858
EXECUTE stmt10 USING @arg;
861
EXECUTE stmt11 USING @arg;
864
EXECUTE stmt12 USING @arg;
867
EXECUTE stmt13 USING @arg;
873
EXECUTE stmt14 USING @arg;
879
DEALLOCATE PREPARE stmt1;
880
DEALLOCATE PREPARE stmt2;
881
DEALLOCATE PREPARE stmt3;
882
DEALLOCATE PREPARE stmt4;
883
DEALLOCATE PREPARE stmt5;
884
DEALLOCATE PREPARE stmt6;
885
DEALLOCATE PREPARE stmt7;
886
DEALLOCATE PREPARE stmt8;
887
DEALLOCATE PREPARE stmt9;
888
DEALLOCATE PREPARE stmt10;
889
DEALLOCATE PREPARE stmt11;
890
DEALLOCATE PREPARE stmt12;
891
DEALLOCATE PREPARE stmt13;
892
DEALLOCATE PREPARE stmt14;