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 ()
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`()
1972
1976
show procedure status;
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)
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|
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)
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)
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|
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
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
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
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
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
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
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
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|
4478
4481
select * from t1 order by data|
5085
5088
CREATE FUNCTION mysqltest2.bug16211_f4() RETURNS CHAR(10) CHARSET koi8r
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
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
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
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
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
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
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
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
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"|
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,
5685
5688
create function `database`() returns varchar(50)
5686
5689
return "Stored function database";
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";
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";
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 ()