Debian Codegraph @

mysql-test/suite/funcs_1/r/is_character_sets.result

raw
1 SHOW TABLES FROM information_schema LIKE 'CHARACTER_SETS';
2 Tables_in_information_schema (CHARACTER_SETS)
3 CHARACTER_SETS
4 #######################################################################
5 # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
6 #######################################################################
7 DROP VIEW IF EXISTS test.v1;
8 DROP PROCEDURE IF EXISTS test.p1;
9 DROP FUNCTION IF EXISTS test.f1;
10 CREATE VIEW test.v1 AS SELECT * FROM information_schema.CHARACTER_SETS;
11 CREATE PROCEDURE test.p1() SELECT * FROM information_schema.CHARACTER_SETS;
12 CREATE FUNCTION test.f1() returns BIGINT
13 BEGIN
14 DECLARE counter BIGINT DEFAULT NULL;
15 SELECT COUNT(*) INTO counter FROM information_schema.CHARACTER_SETS;
16 RETURN counter;
17 END//
18 # Attention: The printing of the next result sets is disabled.
19 SELECT * FROM information_schema.CHARACTER_SETS;
20 SELECT * FROM test.v1;
21 CALL test.p1;
22 SELECT test.f1();
23 DROP VIEW test.v1;
24 DROP PROCEDURE test.p1;
25 DROP FUNCTION test.f1;
26 #########################################################################
27 # Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout
28 #########################################################################
29 DESCRIBE information_schema.CHARACTER_SETS;
30 Field Type Null Key Default Extra
31 CHARACTER_SET_NAME varchar(64) NO NULL
32 DEFAULT_COLLATE_NAME varchar(64) NO NULL
33 DESCRIPTION varchar(2048) NO NULL
34 MAXLEN int unsigned NO NULL
35 SHOW CREATE TABLE information_schema.CHARACTER_SETS;
36 View Create View character_set_client collation_connection
37 CHARACTER_SETS CREATE ALGORITHM=UNDEFINED DEFINER=`mysql.infoschema`@`localhost` SQL SECURITY DEFINER VIEW `information_schema`.`CHARACTER_SETS` AS select `cs`.`name` AS `CHARACTER_SET_NAME`,`col`.`name` AS `DEFAULT_COLLATE_NAME`,`cs`.`comment` AS `DESCRIPTION`,`cs`.`mb_max_length` AS `MAXLEN` from (`mysql`.`character_sets` `cs` join `mysql`.`collations` `col` on((`cs`.`default_collation_id` = `col`.`id`))) utf8mb3 utf8mb3_general_ci
38 SHOW COLUMNS FROM information_schema.CHARACTER_SETS;
39 Field Type Null Key Default Extra
40 CHARACTER_SET_NAME varchar(64) NO NULL
41 DEFAULT_COLLATE_NAME varchar(64) NO NULL
42 DESCRIPTION varchar(2048) NO NULL
43 MAXLEN int unsigned NO NULL
44 # Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test
45 ########################################################################
46 # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
47 # DDL on INFORMATION_SCHEMA tables are not supported
48 ########################################################################
49 DROP DATABASE IF EXISTS db_datadict;
50 CREATE DATABASE db_datadict;
51 INSERT INTO information_schema.character_sets
52 SELECT * FROM information_schema.character_sets;
53 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
54 UPDATE information_schema.character_sets SET description = 'just updated';
55 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
56 DELETE FROM information_schema.character_sets WHERE table_name = 't1';
57 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
58 TRUNCATE information_schema.character_sets;
59 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
60 CREATE INDEX my_idx ON information_schema.character_sets(character_set_name);
61 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
62 ALTER TABLE information_schema.character_sets DROP PRIMARY KEY;
63 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
64 ALTER TABLE information_schema.character_sets ADD f1 INT;
65 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
66 DROP TABLE information_schema.character_sets;
67 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
68 ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets;
69 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
70 ALTER TABLE information_schema.character_sets
71 RENAME information_schema.xcharacter_sets;
72 ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
73 DROP DATABASE db_datadict;