1
# suite/funcs_1/datadict/charset_collation.inc
3
# Tests checking the content of the information_schema tables
6
# collation_character_set_applicability
9
# The amount and properties of character_sets/collations depend on the
12
# ---------------------------------------------------------------------
15
# version_comment MySQL Enterprise Server (Commercial)
16
# version_comment MySQL Enterprise Server (GPL)
17
# version_comment MySQL Classic Server (Commercial)
18
# version_comment MySQL Pushbuild Edition, build <number>
19
# (version_comment Source distribution
21
# compile was without "max" - > no collation 'utf8_general_ci')
24
# version_comment MySQL Enterprise Server (GPL)
25
# version_comment MySQL Classic Server (Commercial)
26
# version_comment MySQL Pushbuild Edition, build <number>
27
# (version_comment Source distribution
29
# compile was without "max" - > collation 'utf8_general_ci' exists)
31
# Difference between variant 1 and 2 is the collation 'utf8_general_ci'.
34
# version_comment MySQL Community Server (GPL)
35
# version_comment MySQL Cluster Server (Commercial)
37
# Difference between variant 3 and 2 is within the collation properties
38
# IS_COMPILED and SORTLEN.
41
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
42
# from include/datadict-master.inc
43
# - create this new test
46
# Create a low privileged user.
47
--error 0, ER_CANNOT_USER
48
DROP USER dbdict_test@localhost;
49
CREATE USER dbdict_test@localhost;
51
--echo # Establish connection con (user=dbdict_test)
52
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
53
connect (con,localhost,dbdict_test,,);
54
################################################################################
56
# The original requirements for the following tests were:
58
# 3.2.2.2: Ensure that the table (information_schema.character_sets) shows the
59
# relevant information on every character set for which the current
60
# user or PUBLIC have the USAGE privilege.
62
# 3.2.2.3: Ensure that the table (information_schema.character_sets) does not
63
# show any information on any character set for which the current user
64
# or PUBLIC have no USAGE privilege.
67
# 3.2.3.2: Ensure that the table (information_schema.collations) shows the
68
# relevant information on every collation for which the current user
69
# or PUBLIC have the USAGE privilege.
71
# 3.2.3.3: Ensure that the table (information_schema.collations) does not show
72
# any information on any collations for which the current user and
73
# PUBLIC have no USAGE privilege.
76
# 3.2.4.2: Ensure that the table
77
# information_schema.collation_character_set_applicability
78
# shows the relevant information on every collation/character set
79
# combination for which the current user or PUBLIC have the USAGE
82
# 3.2.4.3: Ensure that the table
83
# information_schema.collation_character_set_applicability
84
# does not show any information on any collation/character set
85
# combinations for which the current user and PUBLIC have no
88
# Notes (2007-12-19 mleich):
89
# - The requirements are outdated because grant/revoke privilege for using a
90
# characterset/collation were never implemented.
91
# Therefore the tests should simply check the content of these tables.
93
# - The amount of collations/character sets grows with new MySQL releases.
95
# - Even within the same release the amount of records within these tables
96
# can differ between different build types (community, enterprise, source,...)
99
################################################################################
102
FROM information_schema.character_sets
103
ORDER BY character_set_name;
107
FROM information_schema.collations
108
ORDER BY collation_name;
113
FROM information_schema.collation_character_set_applicability
114
ORDER BY collation_name, character_set_name;
118
--echo # Switch to connection default + disconnect con
121
DROP USER dbdict_test@localhost;