~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/suite/funcs_1/r/myisam_storedproc_08.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
1
2
 
2
3
--source suite/funcs_1/storedproc/load_sp_tb.inc
3
4
--------------------------------------------------------------------------------
9
10
CREATE DATABASE db_storedproc;
10
11
CREATE DATABASE db_storedproc_1;
11
12
USE db_storedproc;
12
 
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
13
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
14
 
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
15
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
16
 
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
17
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
18
 
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
19
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
 
13
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
14
engine = <engine_to_be_tested>;
 
15
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
 
16
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
17
engine = <engine_to_be_tested>;
 
18
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
 
19
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
 
20
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
 
21
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
22
engine = <engine_to_be_tested>;
 
23
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
20
24
USE db_storedproc_1;
21
 
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
22
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
 
25
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
26
engine = <engine_to_be_tested>;
 
27
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
23
28
USE db_storedproc;
24
 
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
25
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
26
 
Warnings:
27
 
Warning 1265    Data truncated for column 'f3' at row 1
28
 
Warning 1265    Data truncated for column 'f3' at row 2
29
 
Warning 1265    Data truncated for column 'f3' at row 3
30
 
Warning 1265    Data truncated for column 'f3' at row 4
31
 
Warning 1265    Data truncated for column 'f3' at row 5
32
 
Warning 1265    Data truncated for column 'f3' at row 6
33
 
Warning 1265    Data truncated for column 'f3' at row 7
34
 
Warning 1265    Data truncated for column 'f3' at row 8
35
 
Warning 1265    Data truncated for column 'f3' at row 9
36
 
Warning 1265    Data truncated for column 'f3' at row 10
37
 
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
38
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
39
 
Warnings:
40
 
Warning 1265    Data truncated for column 'f3' at row 1
41
 
Warning 1265    Data truncated for column 'f3' at row 2
42
 
Warning 1265    Data truncated for column 'f3' at row 3
43
 
Warning 1265    Data truncated for column 'f3' at row 4
44
 
Warning 1265    Data truncated for column 'f3' at row 5
45
 
Warning 1265    Data truncated for column 'f3' at row 6
46
 
Warning 1265    Data truncated for column 'f3' at row 7
47
 
Warning 1265    Data truncated for column 'f3' at row 8
48
 
Warning 1265    Data truncated for column 'f3' at row 9
49
 
Warning 1265    Data truncated for column 'f3' at row 10
50
 
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
51
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
52
 
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
53
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
54
 
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
55
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
 
29
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
 
30
engine = <engine_to_be_tested>;
 
31
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
 
32
Warnings:
 
33
Warning 1265    Data truncated for column 'f3' at row 1
 
34
Warning 1265    Data truncated for column 'f3' at row 2
 
35
Warning 1265    Data truncated for column 'f3' at row 3
 
36
Warning 1265    Data truncated for column 'f3' at row 4
 
37
Warning 1265    Data truncated for column 'f3' at row 5
 
38
Warning 1265    Data truncated for column 'f3' at row 6
 
39
Warning 1265    Data truncated for column 'f3' at row 7
 
40
Warning 1265    Data truncated for column 'f3' at row 8
 
41
Warning 1265    Data truncated for column 'f3' at row 9
 
42
Warning 1265    Data truncated for column 'f3' at row 10
 
43
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
 
44
engine = <engine_to_be_tested>;
 
45
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
 
46
Warnings:
 
47
Warning 1265    Data truncated for column 'f3' at row 1
 
48
Warning 1265    Data truncated for column 'f3' at row 2
 
49
Warning 1265    Data truncated for column 'f3' at row 3
 
50
Warning 1265    Data truncated for column 'f3' at row 4
 
51
Warning 1265    Data truncated for column 'f3' at row 5
 
52
Warning 1265    Data truncated for column 'f3' at row 6
 
53
Warning 1265    Data truncated for column 'f3' at row 7
 
54
Warning 1265    Data truncated for column 'f3' at row 8
 
55
Warning 1265    Data truncated for column 'f3' at row 9
 
56
Warning 1265    Data truncated for column 'f3' at row 10
 
57
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
 
58
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
 
59
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
60
engine = <engine_to_be_tested>;
 
61
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
 
62
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
 
63
engine = <engine_to_be_tested>;
 
64
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
56
65
 
57
66
Section 3.1.8 - SHOW statement checks:
58
67
--------------------------------------------------------------------------------
124
133
SECURITY_TYPE   DEFINER
125
134
CREATED <created>
126
135
LAST_ALTERED    <modified>
127
 
SQL_MODE        
 
136
SQL_MODE        NO_ENGINE_SUBSTITUTION
128
137
ROUTINE_COMMENT 
129
138
DEFINER root@localhost
130
139
CHARACTER_SET_CLIENT    latin1
158
167
SECURITY_TYPE   INVOKER
159
168
CREATED <created>
160
169
LAST_ALTERED    <modified>
161
 
SQL_MODE        
 
170
SQL_MODE        NO_ENGINE_SUBSTITUTION
162
171
ROUTINE_COMMENT created with INVOKER
163
172
DEFINER root@localhost
164
173
CHARACTER_SET_CLIENT    latin1
190
199
SECURITY_TYPE   DEFINER
191
200
CREATED <created>
192
201
LAST_ALTERED    <modified>
193
 
SQL_MODE        
 
202
SQL_MODE        NO_ENGINE_SUBSTITUTION
194
203
ROUTINE_COMMENT 
195
204
DEFINER root@localhost
196
205
CHARACTER_SET_CLIENT    latin1
222
231
SECURITY_TYPE   INVOKER
223
232
CREATED <created>
224
233
LAST_ALTERED    <modified>
225
 
SQL_MODE        
 
234
SQL_MODE        NO_ENGINE_SUBSTITUTION
226
235
ROUTINE_COMMENT created with INVOKER
227
236
DEFINER root@localhost
228
237
CHARACTER_SET_CLIENT    latin1
230
239
DATABASE_COLLATION      latin1_swedish_ci
231
240
SHOW CREATE FUNCTION  fn_1;
232
241
Function        fn_1
233
 
sql_mode        
 
242
sql_mode        NO_ENGINE_SUBSTITUTION
234
243
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
235
244
BEGIN
236
245
set @x=i1;
242
251
Database Collation      latin1_swedish_ci
243
252
SHOW CREATE FUNCTION  fn_2;
244
253
Function        fn_2
245
 
sql_mode        
 
254
sql_mode        NO_ENGINE_SUBSTITUTION
246
255
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
247
256
    SQL SECURITY INVOKER
248
257
    COMMENT 'created with INVOKER'
256
265
Database Collation      latin1_swedish_ci
257
266
SHOW CREATE PROCEDURE sp_1;
258
267
Procedure       sp_1
259
 
sql_mode        
 
268
sql_mode        NO_ENGINE_SUBSTITUTION
260
269
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
261
270
BEGIN
262
271
set @x=i1;
266
275
Database Collation      latin1_swedish_ci
267
276
SHOW CREATE PROCEDURE sp_2;
268
277
Procedure       sp_2
269
 
sql_mode        
 
278
sql_mode        NO_ENGINE_SUBSTITUTION
270
279
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
271
280
    SQL SECURITY INVOKER
272
281
    COMMENT 'created with INVOKER'
370
379
SECURITY_TYPE   INVOKER
371
380
CREATED <created>
372
381
LAST_ALTERED    <modified>
373
 
SQL_MODE        
 
382
SQL_MODE        NO_ENGINE_SUBSTITUTION
374
383
ROUTINE_COMMENT new comment, FN changed to INVOKER
375
384
DEFINER root@localhost
376
385
CHARACTER_SET_CLIENT    latin1
404
413
SECURITY_TYPE   DEFINER
405
414
CREATED <created>
406
415
LAST_ALTERED    <modified>
407
 
SQL_MODE        
 
416
SQL_MODE        NO_ENGINE_SUBSTITUTION
408
417
ROUTINE_COMMENT FN changed to DEFINER
409
418
DEFINER root@localhost
410
419
CHARACTER_SET_CLIENT    latin1
436
445
SECURITY_TYPE   INVOKER
437
446
CREATED <created>
438
447
LAST_ALTERED    <modified>
439
 
SQL_MODE        
 
448
SQL_MODE        NO_ENGINE_SUBSTITUTION
440
449
ROUTINE_COMMENT new comment, SP changed to INVOKER
441
450
DEFINER root@localhost
442
451
CHARACTER_SET_CLIENT    latin1
468
477
SECURITY_TYPE   DEFINER
469
478
CREATED <created>
470
479
LAST_ALTERED    <modified>
471
 
SQL_MODE        
 
480
SQL_MODE        NO_ENGINE_SUBSTITUTION
472
481
ROUTINE_COMMENT SP changed to DEFINER
473
482
DEFINER root@localhost
474
483
CHARACTER_SET_CLIENT    latin1
476
485
DATABASE_COLLATION      latin1_swedish_ci
477
486
SHOW CREATE FUNCTION  fn_1;
478
487
Function        fn_1
479
 
sql_mode        
 
488
sql_mode        NO_ENGINE_SUBSTITUTION
480
489
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
481
490
    NO SQL
482
491
    SQL SECURITY INVOKER
491
500
Database Collation      latin1_swedish_ci
492
501
SHOW CREATE FUNCTION  fn_2;
493
502
Function        fn_2
494
 
sql_mode        
 
503
sql_mode        NO_ENGINE_SUBSTITUTION
495
504
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
496
505
    MODIFIES SQL DATA
497
506
    COMMENT 'FN changed to DEFINER'
505
514
Database Collation      latin1_swedish_ci
506
515
SHOW CREATE PROCEDURE sp_1;
507
516
Procedure       sp_1
508
 
sql_mode        
 
517
sql_mode        NO_ENGINE_SUBSTITUTION
509
518
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
510
519
    SQL SECURITY INVOKER
511
520
    COMMENT 'new comment, SP changed to INVOKER'
517
526
Database Collation      latin1_swedish_ci
518
527
SHOW CREATE PROCEDURE sp_2;
519
528
Procedure       sp_2
520
 
sql_mode        
 
529
sql_mode        NO_ENGINE_SUBSTITUTION
521
530
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
522
531
    READS SQL DATA
523
532
    COMMENT 'SP changed to DEFINER'
609
618
SECURITY_TYPE   INVOKER
610
619
CREATED <created>
611
620
LAST_ALTERED    <modified>
612
 
SQL_MODE        
 
621
SQL_MODE        NO_ENGINE_SUBSTITUTION
613
622
ROUTINE_COMMENT new comment, FN changed to INVOKER
614
623
DEFINER root@localhost
615
624
CHARACTER_SET_CLIENT    latin1
643
652
SECURITY_TYPE   DEFINER
644
653
CREATED <created>
645
654
LAST_ALTERED    <modified>
646
 
SQL_MODE        
 
655
SQL_MODE        NO_ENGINE_SUBSTITUTION
647
656
ROUTINE_COMMENT FN changed to DEFINER
648
657
DEFINER root@localhost
649
658
CHARACTER_SET_CLIENT    latin1
675
684
SECURITY_TYPE   INVOKER
676
685
CREATED <created>
677
686
LAST_ALTERED    <modified>
678
 
SQL_MODE        
 
687
SQL_MODE        NO_ENGINE_SUBSTITUTION
679
688
ROUTINE_COMMENT new comment, SP changed to INVOKER
680
689
DEFINER root@localhost
681
690
CHARACTER_SET_CLIENT    latin1
707
716
SECURITY_TYPE   DEFINER
708
717
CREATED <created>
709
718
LAST_ALTERED    <modified>
710
 
SQL_MODE        
 
719
SQL_MODE        NO_ENGINE_SUBSTITUTION
711
720
ROUTINE_COMMENT SP changed to DEFINER
712
721
DEFINER root@localhost
713
722
CHARACTER_SET_CLIENT    latin1
715
724
DATABASE_COLLATION      latin1_swedish_ci
716
725
SHOW CREATE FUNCTION  fn_1;
717
726
Function        fn_1
718
 
sql_mode        
 
727
sql_mode        NO_ENGINE_SUBSTITUTION
719
728
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
720
729
    NO SQL
721
730
    SQL SECURITY INVOKER
730
739
Database Collation      latin1_swedish_ci
731
740
SHOW CREATE FUNCTION  fn_2;
732
741
Function        fn_2
733
 
sql_mode        
 
742
sql_mode        NO_ENGINE_SUBSTITUTION
734
743
Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4)
735
744
    COMMENT 'FN changed to DEFINER'
736
745
BEGIN
743
752
Database Collation      latin1_swedish_ci
744
753
SHOW CREATE PROCEDURE sp_1;
745
754
Procedure       sp_1
746
 
sql_mode        
 
755
sql_mode        NO_ENGINE_SUBSTITUTION
747
756
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
748
757
    SQL SECURITY INVOKER
749
758
    COMMENT 'new comment, SP changed to INVOKER'
755
764
Database Collation      latin1_swedish_ci
756
765
SHOW CREATE PROCEDURE sp_2;
757
766
Procedure       sp_2
758
 
sql_mode        
 
767
sql_mode        NO_ENGINE_SUBSTITUTION
759
768
Create Procedure        CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
760
769
    READS SQL DATA
761
770
    COMMENT 'SP changed to DEFINER'