~vkolesnikov/pbxt/pbxt-preload-test-bug

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/r/sp.result

  • Committer: paul-mccullagh
  • Date: 2008-03-10 11:36:34 UTC
  • Revision ID: paul-mccullagh-417ebf175a9c8ee6e5b3777d9e2398e1fb197391
Implemented full durability

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
insert into test.t1 values (x2, y);
51
51
end|
52
52
call two("one", "two", 3)|
53
 
select * from t1|
 
53
select * from t1 order by id|
54
54
id      data
55
55
one     3
56
56
two     3
788
788
comment 'Characteristics procedure test'
789
789
  insert into t1 values ("chistics", 1)|
790
790
show create procedure chistics|
791
 
Procedure       sql_mode        Create Procedure
 
791
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
792
792
chistics                CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
793
793
    MODIFIES SQL DATA
794
794
    COMMENT 'Characteristics procedure test'
795
 
insert into t1 values ("chistics", 1)
 
795
insert into t1 values ("chistics", 1)   latin1  latin1_swedish_ci       latin1_swedish_ci
796
796
call chistics()|
797
797
select * from t1|
798
798
id      data
800
800
delete from t1|
801
801
alter procedure chistics sql security invoker|
802
802
show create procedure chistics|
803
 
Procedure       sql_mode        Create Procedure
 
803
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
804
804
chistics                CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
805
805
    MODIFIES SQL DATA
806
806
    SQL SECURITY INVOKER
807
807
    COMMENT 'Characteristics procedure test'
808
 
insert into t1 values ("chistics", 1)
 
808
insert into t1 values ("chistics", 1)   latin1  latin1_swedish_ci       latin1_swedish_ci
809
809
drop procedure chistics|
810
810
drop function if exists chistics|
811
811
create function chistics() returns int
815
815
comment 'Characteristics procedure test'
816
816
  return 42|
817
817
show create function chistics|
818
 
Function        sql_mode        Create Function
 
818
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
819
819
chistics                CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
820
820
    DETERMINISTIC
821
821
    SQL SECURITY INVOKER
822
822
    COMMENT 'Characteristics procedure test'
823
 
return 42
 
823
return 42       latin1  latin1_swedish_ci       latin1_swedish_ci
824
824
select chistics()|
825
825
chistics()
826
826
42
828
828
no sql
829
829
comment 'Characteristics function test'|
830
830
show create function chistics|
831
 
Function        sql_mode        Create Function
 
831
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
832
832
chistics                CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
833
833
    NO SQL
834
834
    DETERMINISTIC
835
835
    SQL SECURITY INVOKER
836
836
    COMMENT 'Characteristics function test'
837
 
return 42
 
837
return 42       latin1  latin1_swedish_ci       latin1_swedish_ci
838
838
drop function chistics|
839
839
insert into t1 values ("foo", 1), ("bar", 2), ("zip", 3)|
840
840
set @@sql_mode = 'ANSI'|
1156
1156
return (select count(*) from t3)|
1157
1157
drop temporary table t3|
1158
1158
select f12_1()|
1159
 
ERROR 42S02: Table 'test.t3' doesn't exist
 
1159
f12_1()
 
1160
3
 
1161
Warnings:
 
1162
Note    1051    Unknown table 't3'
1160
1163
select f12_1() from t1 limit 1|
1161
 
ERROR 42S02: Table 'test.t3' doesn't exist
 
1164
f12_1()
 
1165
3
1162
1166
drop function f0|
1163
1167
drop function f1|
1164
1168
drop function f2|
1220
1224
20      2432902008176640000
1221
1225
drop table t3|
1222
1226
show function status like '%f%'|
1223
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1224
 
test    fac     FUNCTION        root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
 
1227
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1228
test    fac     FUNCTION        root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
1225
1229
drop procedure ifac|
1226
1230
drop function fac|
1227
1231
show function status like '%f%'|
1228
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
 
1232
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
1229
1233
drop table if exists t3|
1230
1234
create table t3 (
1231
1235
i int unsigned not null primary key,
1287
1291
end while;
1288
1292
end|
1289
1293
show create procedure opp|
1290
 
Procedure       sql_mode        Create Procedure
 
1294
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
1291
1295
opp             CREATE DEFINER=`root`@`localhost` PROCEDURE `opp`(n bigint unsigned, out pp bool)
1292
1296
begin
1293
1297
declare r double;
1313
1317
end;
1314
1318
end if;
1315
1319
end loop;
1316
 
end
 
1320
end     latin1  latin1_swedish_ci       latin1_swedish_ci
1317
1321
show procedure status like '%p%'|
1318
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1319
 
test    ip      PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
1320
 
test    opp     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
 
1322
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1323
test    ip      PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
 
1324
test    opp     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
1321
1325
call ip(200)|
1322
1326
select * from t3 where i=45 or i=100 or i=199|
1323
1327
i       p
1328
1332
drop procedure opp|
1329
1333
drop procedure ip|
1330
1334
show procedure status like '%p%'|
1331
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
 
1335
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
1332
1336
drop table if exists t3|
1333
1337
create table t3 ( f bigint unsigned not null )|
1334
1338
drop procedure if exists fib|
1380
1384
comment "111111111111" sql security invoker
1381
1385
insert into test.t1 values (x, y)|
1382
1386
show procedure status like 'bar'|
1383
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1384
 
test    bar     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     INVOKER 111111111111
 
1387
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1388
test    bar     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     INVOKER 111111111111    latin1  latin1_swedish_ci       latin1_swedish_ci
1385
1389
alter procedure bar comment "2222222222" sql security definer|
1386
1390
alter procedure bar comment "3333333333"|
1387
1391
alter procedure bar|
1388
1392
show create procedure bar|
1389
 
Procedure       sql_mode        Create Procedure
 
1393
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
1390
1394
bar             CREATE DEFINER=`root`@`localhost` PROCEDURE `bar`(x char(16), y int)
1391
1395
    COMMENT '3333333333'
1392
 
insert into test.t1 values (x, y)
 
1396
insert into test.t1 values (x, y)       latin1  latin1_swedish_ci       latin1_swedish_ci
1393
1397
show procedure status like 'bar'|
1394
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1395
 
test    bar     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 3333333333
 
1398
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1399
test    bar     PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 3333333333      latin1  latin1_swedish_ci       latin1_swedish_ci
1396
1400
drop procedure bar|
1397
1401
drop procedure if exists p1|
1398
1402
create procedure p1 ()
1494
1498
create procedure h_ee()
1495
1499
deterministic
1496
1500
begin
1497
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1501
declare continue handler for 1062 -- ER_DUP_ENTRY
1498
1502
select 'Outer (bad)' as 'h_ee';
1499
1503
begin
1500
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1504
declare continue handler for 1062 -- ER_DUP_ENTRY
1501
1505
select 'Inner (good)' as 'h_ee';
1502
1506
insert into t3 values (1);
1503
1507
end;
1505
1509
create procedure h_es()
1506
1510
deterministic
1507
1511
begin
1508
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1512
declare continue handler for 1062 -- ER_DUP_ENTRY
1509
1513
select 'Outer (good)' as 'h_es';
1510
1514
begin
1511
1515
-- integrity constraint violation
1542
1546
create procedure h_ex()
1543
1547
deterministic
1544
1548
begin
1545
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1549
declare continue handler for 1062 -- ER_DUP_ENTRY
1546
1550
select 'Outer (good)' as 'h_ex';
1547
1551
begin
1548
1552
declare continue handler for sqlexception
1557
1561
declare continue handler for sqlstate '23000' 
1558
1562
select 'Outer (bad)' as 'h_se';
1559
1563
begin
1560
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1564
declare continue handler for 1062 -- ER_DUP_ENTRY
1561
1565
select 'Inner (good)' as 'h_se';
1562
1566
insert into t3 values (1);
1563
1567
end;
1697
1701
declare continue handler for sqlexception
1698
1702
select 'Outer (bad)' as 'h_xe';
1699
1703
begin
1700
 
declare continue handler for 1582 -- ER_DUP_ENTRY
 
1704
declare continue handler for 1062 -- ER_DUP_ENTRY
1701
1705
select 'Inner (good)' as 'h_xe';
1702
1706
insert into t3 values (1);
1703
1707
end;
1957
1961
end|
1958
1962
create function bug2267_4() returns int return 100|
1959
1963
call bug2267_1()|
1960
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1961
 
test    bug2267_1       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
1962
 
test    bug2267_2       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
1963
 
test    bug2267_3       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
1964
 
test    bug2267_4       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
 
1964
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1965
test    bug2267_1       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
 
1966
test    bug2267_2       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
 
1967
test    bug2267_3       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
 
1968
test    bug2267_4       PROCEDURE       root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
1965
1969
call bug2267_2()|
1966
 
Db      Name    Type    Definer Modified        Created Security_type   Comment
1967
 
test    bug2267_4       FUNCTION        root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER 
 
1970
Db      Name    Type    Definer Modified        Created Security_type   Comment character_set_client    collation_connection    Database Collation
 
1971
test    bug2267_4       FUNCTION        root@localhost  0000-00-00 00:00:00     0000-00-00 00:00:00     DEFINER         latin1  latin1_swedish_ci       latin1_swedish_ci
1968
1972
call bug2267_3()|
1969
 
Procedure       sql_mode        Create Procedure
 
1973
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
1970
1974
bug2267_1               CREATE DEFINER=`root`@`localhost` PROCEDURE `bug2267_1`()
1971
1975
begin
1972
1976
show procedure status;
1973
 
end
 
1977
end     latin1  latin1_swedish_ci       latin1_swedish_ci
1974
1978
call bug2267_4()|
1975
 
Function        sql_mode        Create Function
 
1979
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
1976
1980
bug2267_4               CREATE DEFINER=`root`@`localhost` FUNCTION `bug2267_4`() RETURNS int(11)
1977
 
return 100
 
1981
return 100      latin1  latin1_swedish_ci       latin1_swedish_ci
1978
1982
drop procedure bug2267_1|
1979
1983
drop procedure bug2267_2|
1980
1984
drop procedure bug2267_3|
2305
2309
return x || y$
2306
2310
set @@sql_mode = ''|
2307
2311
show create procedure bug2564_1|
2308
 
Procedure       sql_mode        Create Procedure
 
2312
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
2309
2313
bug2564_1               CREATE DEFINER=`root`@`localhost` PROCEDURE `bug2564_1`()
2310
2314
    COMMENT 'Joe''s procedure'
2311
 
insert into `t1` values ("foo", 1)
 
2315
insert into `t1` values ("foo", 1)      latin1  latin1_swedish_ci       latin1_swedish_ci
2312
2316
show create procedure bug2564_2|
2313
 
Procedure       sql_mode        Create Procedure
 
2317
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
2314
2318
bug2564_2       ANSI_QUOTES     CREATE DEFINER="root"@"localhost" PROCEDURE "bug2564_2"()
2315
 
insert into "t1" values ('foo', 1)
 
2319
insert into "t1" values ('foo', 1)      latin1  latin1_swedish_ci       latin1_swedish_ci
2316
2320
show create function bug2564_3|
2317
 
Function        sql_mode        Create Function
 
2321
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
2318
2322
bug2564_3               CREATE DEFINER=`root`@`localhost` FUNCTION `bug2564_3`(x int, y int) RETURNS int(11)
2319
 
return x || y
 
2323
return x || y   latin1  latin1_swedish_ci       latin1_swedish_ci
2320
2324
show create function bug2564_4|
2321
 
Function        sql_mode        Create Function
 
2325
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
2322
2326
bug2564_4       REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI     CREATE DEFINER="root"@"localhost" FUNCTION "bug2564_4"(x int, y int) RETURNS int(11)
2323
 
return x || y
 
2327
return x || y   latin1  latin1_swedish_ci       latin1_swedish_ci
2324
2328
drop procedure bug2564_1|
2325
2329
drop procedure bug2564_2|
2326
2330
drop function bug2564_3|
3996
4000
return 42;
3997
4001
end */;;
3998
4002
show create function bug14723;;
3999
 
Function        sql_mode        Create Function
 
4003
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
4000
4004
bug14723                CREATE DEFINER=`root`@`localhost` FUNCTION `bug14723`() RETURNS bigint(20)
4001
4005
main_loop: begin
4002
4006
return 42;
4003
 
end
 
4007
end     latin1  latin1_swedish_ci       latin1_swedish_ci
4004
4008
select bug14723();;
4005
4009
bug14723()
4006
4010
42
4009
4013
select 42;
4010
4014
end */;;
4011
4015
show create procedure bug14723;;
4012
 
Procedure       sql_mode        Create Procedure
 
4016
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
4013
4017
bug14723                CREATE DEFINER=`root`@`localhost` PROCEDURE `bug14723`()
4014
4018
main_loop: begin
4015
4019
select 42;
4016
 
end
 
4020
end     latin1  latin1_swedish_ci       latin1_swedish_ci
4017
4021
call bug14723();;
4018
4022
42
4019
4023
42
4402
4406
Table   Op      Msg_type        Msg_text
4403
4407
test.t1 repair  status  OK
4404
4408
Table   Op      Msg_type        Msg_text
 
4409
test.t1 backup  Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
4405
4410
test.t1 backup  status  OK
4406
4411
Table   Op      Msg_type        Msg_text
 
4412
test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
4407
4413
test.t1 restore status  OK
4408
4414
drop procedure bug13012|
4409
4415
create view v1 as select * from t1|
4418
4424
test.t1 repair  status  OK
4419
4425
test.t2 repair  status  OK
4420
4426
test.t3 repair  status  OK
4421
 
test.v1 repair  error   'test.v1' is not BASE TABLE
4422
 
Table   Op      Msg_type        Msg_text
4423
 
test.t1 optimize        status  OK
4424
 
test.t2 optimize        status  OK
4425
 
test.t3 optimize        status  OK
4426
 
test.v1 optimize        error   'test.v1' is not BASE TABLE
4427
 
Table   Op      Msg_type        Msg_text
4428
 
test.t1 analyze status  Table is already up to date
4429
 
test.t2 analyze status  OK
4430
 
test.t3 analyze status  OK
4431
 
test.v1 analyze error   'test.v1' is not BASE TABLE
4432
 
Warnings:
4433
 
Error   1347    'test.v1' is not BASE TABLE
4434
 
Error   1347    'test.v1' is not BASE TABLE
4435
 
Error   1347    'test.v1' is not BASE TABLE
4436
 
call bug13012()|
4437
 
Table   Op      Msg_type        Msg_text
4438
 
test.t1 repair  status  OK
4439
 
test.t2 repair  status  OK
4440
 
test.t3 repair  status  OK
4441
 
test.v1 repair  error   'test.v1' is not BASE TABLE
4442
 
Table   Op      Msg_type        Msg_text
4443
 
test.t1 optimize        status  OK
4444
 
test.t2 optimize        status  OK
4445
 
test.t3 optimize        status  OK
4446
 
test.v1 optimize        error   'test.v1' is not BASE TABLE
4447
 
Table   Op      Msg_type        Msg_text
4448
 
test.t1 analyze status  Table is already up to date
4449
 
test.t2 analyze status  OK
4450
 
test.t3 analyze status  OK
4451
 
test.v1 analyze error   'test.v1' is not BASE TABLE
4452
 
Warnings:
4453
 
Error   1347    'test.v1' is not BASE TABLE
4454
 
Error   1347    'test.v1' is not BASE TABLE
4455
 
Error   1347    'test.v1' is not BASE TABLE
4456
 
call bug13012()|
4457
 
Table   Op      Msg_type        Msg_text
4458
 
test.t1 repair  status  OK
4459
 
test.t2 repair  status  OK
4460
 
test.t3 repair  status  OK
4461
 
test.v1 repair  error   'test.v1' is not BASE TABLE
4462
 
Table   Op      Msg_type        Msg_text
4463
 
test.t1 optimize        status  OK
4464
 
test.t2 optimize        status  OK
4465
 
test.t3 optimize        status  OK
4466
 
test.v1 optimize        error   'test.v1' is not BASE TABLE
4467
 
Table   Op      Msg_type        Msg_text
4468
 
test.t1 analyze status  Table is already up to date
4469
 
test.t2 analyze status  OK
4470
 
test.t3 analyze status  OK
4471
 
test.v1 analyze error   'test.v1' is not BASE TABLE
4472
 
Warnings:
4473
 
Error   1347    'test.v1' is not BASE TABLE
4474
 
Error   1347    'test.v1' is not BASE TABLE
4475
 
Error   1347    'test.v1' is not BASE TABLE
 
4427
test.v1 repair  Error   'test.v1' is not BASE TABLE
 
4428
test.v1 repair  error   Corrupt
 
4429
Table   Op      Msg_type        Msg_text
 
4430
test.t1 optimize        status  OK
 
4431
test.t2 optimize        status  OK
 
4432
test.t3 optimize        status  OK
 
4433
test.v1 optimize        Error   'test.v1' is not BASE TABLE
 
4434
test.v1 optimize        error   Corrupt
 
4435
Table   Op      Msg_type        Msg_text
 
4436
test.t1 analyze status  Table is already up to date
 
4437
test.t2 analyze status  OK
 
4438
test.t3 analyze status  OK
 
4439
test.v1 analyze Error   'test.v1' is not BASE TABLE
 
4440
test.v1 analyze error   Corrupt
 
4441
call bug13012()|
 
4442
Table   Op      Msg_type        Msg_text
 
4443
test.t1 repair  status  OK
 
4444
test.t2 repair  status  OK
 
4445
test.t3 repair  status  OK
 
4446
test.v1 repair  Error   'test.v1' is not BASE TABLE
 
4447
test.v1 repair  error   Corrupt
 
4448
Table   Op      Msg_type        Msg_text
 
4449
test.t1 optimize        status  OK
 
4450
test.t2 optimize        status  OK
 
4451
test.t3 optimize        status  OK
 
4452
test.v1 optimize        Error   'test.v1' is not BASE TABLE
 
4453
test.v1 optimize        error   Corrupt
 
4454
Table   Op      Msg_type        Msg_text
 
4455
test.t1 analyze status  Table is already up to date
 
4456
test.t2 analyze status  OK
 
4457
test.t3 analyze status  OK
 
4458
test.v1 analyze Error   'test.v1' is not BASE TABLE
 
4459
test.v1 analyze error   Corrupt
 
4460
call bug13012()|
 
4461
Table   Op      Msg_type        Msg_text
 
4462
test.t1 repair  status  OK
 
4463
test.t2 repair  status  OK
 
4464
test.t3 repair  status  OK
 
4465
test.v1 repair  Error   'test.v1' is not BASE TABLE
 
4466
test.v1 repair  error   Corrupt
 
4467
Table   Op      Msg_type        Msg_text
 
4468
test.t1 optimize        status  OK
 
4469
test.t2 optimize        status  OK
 
4470
test.t3 optimize        status  OK
 
4471
test.v1 optimize        Error   'test.v1' is not BASE TABLE
 
4472
test.v1 optimize        error   Corrupt
 
4473
Table   Op      Msg_type        Msg_text
 
4474
test.t1 analyze status  Table is already up to date
 
4475
test.t2 analyze status  OK
 
4476
test.t3 analyze status  OK
 
4477
test.v1 analyze Error   'test.v1' is not BASE TABLE
 
4478
test.v1 analyze error   Corrupt
4476
4479
drop procedure bug13012|
4477
4480
drop view v1|
4478
4481
select * from t1 order by data|
4704
4707
create procedure bug15011()
4705
4708
deterministic
4706
4709
begin
4707
 
declare continue handler for 1582
 
4710
declare continue handler for 1062
4708
4711
select 'Outer' as 'Handler';
4709
4712
begin
4710
 
declare continue handler for 1582
 
4713
declare continue handler for 1062
4711
4714
select 'Inner' as 'Handler';
4712
4715
insert into t3 values (1);
4713
4716
end;
4923
4926
show create table t3|
4924
4927
Table   Create Table
4925
4928
t3      CREATE TABLE `t3` (
4926
 
  `j` int(11) DEFAULT NULL
 
4929
  `j` bigint(11) DEFAULT NULL
4927
4930
) ENGINE=PBXT DEFAULT CHARSET=latin1
4928
4931
select * from t3|
4929
4932
j
5085
5088
CREATE FUNCTION mysqltest2.bug16211_f4() RETURNS CHAR(10) CHARSET koi8r
5086
5089
RETURN ""|
5087
5090
SHOW CREATE FUNCTION bug16211_f1|
5088
 
Function        sql_mode        Create Function
 
5091
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5089
5092
bug16211_f1             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f1`() RETURNS char(10) CHARSET utf8
5090
 
RETURN ""
 
5093
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5091
5094
SHOW CREATE FUNCTION bug16211_f2|
5092
 
Function        sql_mode        Create Function
 
5095
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5093
5096
bug16211_f2             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f2`() RETURNS char(10) CHARSET koi8r
5094
 
RETURN ""
 
5097
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5095
5098
SHOW CREATE FUNCTION mysqltest2.bug16211_f3|
5096
 
Function        sql_mode        Create Function
 
5099
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5097
5100
bug16211_f3             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f3`() RETURNS char(10) CHARSET utf8
5098
 
RETURN ""
 
5101
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5099
5102
SHOW CREATE FUNCTION mysqltest2.bug16211_f4|
5100
 
Function        sql_mode        Create Function
 
5103
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5101
5104
bug16211_f4             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f4`() RETURNS char(10) CHARSET koi8r
5102
 
RETURN ""
 
5105
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5103
5106
SELECT dtd_identifier
5104
5107
FROM INFORMATION_SCHEMA.ROUTINES
5105
5108
WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"|
5135
5138
ALTER DATABASE mysqltest1 CHARACTER SET cp1251|
5136
5139
ALTER DATABASE mysqltest2 CHARACTER SET cp1251|
5137
5140
SHOW CREATE FUNCTION bug16211_f1|
5138
 
Function        sql_mode        Create Function
 
5141
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5139
5142
bug16211_f1             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f1`() RETURNS char(10) CHARSET utf8
5140
 
RETURN ""
 
5143
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5141
5144
SHOW CREATE FUNCTION bug16211_f2|
5142
 
Function        sql_mode        Create Function
 
5145
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5143
5146
bug16211_f2             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f2`() RETURNS char(10) CHARSET koi8r
5144
 
RETURN ""
 
5147
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5145
5148
SHOW CREATE FUNCTION mysqltest2.bug16211_f3|
5146
 
Function        sql_mode        Create Function
 
5149
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5147
5150
bug16211_f3             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f3`() RETURNS char(10) CHARSET utf8
5148
 
RETURN ""
 
5151
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5149
5152
SHOW CREATE FUNCTION mysqltest2.bug16211_f4|
5150
 
Function        sql_mode        Create Function
 
5153
Function        sql_mode        Create Function character_set_client    collation_connection    Database Collation
5151
5154
bug16211_f4             CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f4`() RETURNS char(10) CHARSET koi8r
5152
 
RETURN ""
 
5155
RETURN ""       latin1  latin1_swedish_ci       utf8_general_ci
5153
5156
SELECT dtd_identifier
5154
5157
FROM INFORMATION_SCHEMA.ROUTINES
5155
5158
WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"|
5394
5397
drop procedure if exists bug21416|
5395
5398
create procedure bug21416() show create procedure bug21416|
5396
5399
call bug21416()|
5397
 
Procedure       sql_mode        Create Procedure
 
5400
Procedure       sql_mode        Create Procedure        character_set_client    collation_connection    Database Collation
5398
5401
bug21416                CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
5399
 
show create procedure bug21416
 
5402
show create procedure bug21416  latin1  latin1_swedish_ci       latin1_swedish_ci
5400
5403
drop procedure bug21416|
5401
5404
DROP PROCEDURE IF EXISTS bug21414|
5402
5405
CREATE PROCEDURE bug21414() SELECT 1|
5409
5412
set names utf8|
5410
5413
drop database if exists това_е_дълго_име_за_база_данни_нали|
5411
5414
create database това_е_дълго_име_за_база_данни_нали|
5412
 
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
 
5415
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a')|
5413
5416
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
5414
 
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
 
5417
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
5415
5418
drop database това_е_дълго_име_за_база_данни_нали|
5416
5419
CREATE TABLE t3 (
5417
5420
Member_ID varchar(15) NOT NULL,
5636
5639
create function pi() returns varchar(50)
5637
5640
return "pie, my favorite desert.";
5638
5641
Warnings:
5639
 
Note    1581    This function 'pi' has the same name as a native function
 
5642
Note    1582    This function 'pi' has the same name as a native function
5640
5643
SET @save_sql_mode=@@sql_mode;
5641
5644
SET SQL_MODE='IGNORE_SPACE';
5642
5645
select pi(), pi ();
5685
5688
create function `database`() returns varchar(50)
5686
5689
return "Stored function database";
5687
5690
Warnings:
5688
 
Note    1581    This function 'database' has the same name as a native function
 
5691
Note    1582    This function 'database' has the same name as a native function
5689
5692
create function `current_user`() returns varchar(50)
5690
5693
return "Stored function current_user";
5691
5694
Warnings:
5692
 
Note    1581    This function 'current_user' has the same name as a native function
 
5695
Note    1582    This function 'current_user' has the same name as a native function
5693
5696
create function md5(x varchar(50)) returns varchar(50)
5694
5697
return "Stored function md5";
5695
5698
Warnings:
5696
 
Note    1581    This function 'md5' has the same name as a native function
 
5699
Note    1582    This function 'md5' has the same name as a native function
5697
5700
SET SQL_MODE='IGNORE_SPACE';
5698
5701
select database(), database ();
5699
5702
database()      database ()