mariadb/mysql-test/r/ddl_i18n_utf8.result
unknown 405f82d390 Patch for the following bugs:
- BUG#11986: Stored routines and triggers can fail if the code
    has a non-ascii symbol
  - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
  - BUG#19443: INFORMATION_SCHEMA does not support charsets properly
  - BUG#21249: Character set of SP-var can be ignored
  - BUG#25212: Character set of string constant is ignored (stored routines)
  - BUG#25221: Character set of string constant is ignored (triggers)

There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
   triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
   inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
   definition;

1. No query-definition-character set.

In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.

The context contains the following data:
  - client character set;
  - connection collation (character set and collation);
  - collation of the owner database;

The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).

2. Wrong mysqldump-output.

The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.

Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).

The solution is
  - to store definition queries in the original character set;
  - to change SHOW CREATE statement to output definition query in the
    binary character set (i.e. without any conversion);
  - introduce SHOW CREATE TRIGGER statement;
  - to dump special statements to switch the context to the original one
    before dumping and restore it afterwards.

Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.

3. INFORMATION_SCHEMA showed non-UTF8 strings

The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.

Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.

This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object.  Specialized SHOW CREATE statements should be
used for this.

The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).

Example:

  - original query:
    CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;

  - UTF8 query (for INFORMATION_SCHEMA):
    CREATE VIEW v1 AS SELECT 'Hello' AS c1;


client/mysqldump.c:
  Set original character set and collation before dumping definition query.
include/my_sys.h:
  Move out-parameter to the end of list.
mysql-test/lib/mtr_report.pl:
  Ignore server-warnings during the test case.
mysql-test/r/create.result:
  Update result file.
mysql-test/r/ctype_cp932_binlog_stm.result:
  Update result file.
mysql-test/r/events.result:
  Update result file.
mysql-test/r/events_bugs.result:
  Update result file.
mysql-test/r/events_grant.result:
  Update result file.
mysql-test/r/func_in.result:
  Update result file.
mysql-test/r/gis.result:
  Update result file.
mysql-test/r/grant.result:
  Update result file.
mysql-test/r/information_schema.result:
  Update result file.
mysql-test/r/information_schema_db.result:
  Update result file.
mysql-test/r/lowercase_view.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/ndb_sp.result:
  Update result file.
mysql-test/r/ps.result:
  Update result file.
mysql-test/r/rpl_replicate_do.result:
  Update result file.
mysql-test/r/rpl_sp.result:
  Update result file.
mysql-test/r/rpl_trigger.result:
  Update result file.
mysql-test/r/rpl_view.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/r/skip_grants.result:
  Update result file.
mysql-test/r/sp-destruct.result:
  Update result file.
mysql-test/r/sp-error.result:
  Update result file.
mysql-test/r/sp-security.result:
  Update result file.
mysql-test/r/sp.result:
  Update result file.
mysql-test/r/sql_mode.result:
  Update result file.
mysql-test/r/system_mysql_db.result:
  Update result file.
mysql-test/r/temp_table.result:
  Update result file.
mysql-test/r/trigger-compat.result:
  Update result file.
mysql-test/r/trigger-grant.result:
  Update result file.
mysql-test/r/trigger.result:
  Update result file.
mysql-test/r/view.result:
  Update result file.
mysql-test/r/view_grant.result:
  Update result file.
mysql-test/t/events.test:
  Update test case (new columns added).
mysql-test/t/information_schema.test:
  Update test case (new columns added).
mysql-test/t/show_check.test:
  Test case for SHOW CREATE TRIGGER in prepared statements and
  stored routines.
mysql-test/t/sp-destruct.test:
  Update test case (new columns added).
mysql-test/t/sp.test:
  Update test case (new columns added).
mysql-test/t/view.test:
  Update test.
mysys/charset.c:
  Move out-parameter to the end of list.
scripts/mysql_system_tables.sql:
  Add new columns to mysql.proc and mysql.event.
scripts/mysql_system_tables_fix.sql:
  Add new columns to mysql.proc and mysql.event.
sql/event_data_objects.cc:
  Support new attributes for events.
sql/event_data_objects.h:
  Support new attributes for events.
sql/event_db_repository.cc:
  Support new attributes for events.
sql/event_db_repository.h:
  Support new attributes for events.
sql/events.cc:
  Add new columns to SHOW CREATE event resultset.
sql/mysql_priv.h:
  1. Introduce Object_creation_ctx;
  2. Introduce SHOW CREATE TRIGGER;
  3. Introduce auxilary functions.
sql/sp.cc:
  Add support for new store routines attributes.
sql/sp_head.cc:
  Add support for new store routines attributes.
sql/sp_head.h:
  Add support for new store routines attributes.
sql/sql_lex.cc:
  Generate UTF8-body on parsing/lexing.
sql/sql_lex.h:
  1. Generate UTF8-body on parsing/lexing.
  2. Introduce SHOW CREATE TRIGGER.
sql/sql_parse.cc:
  Introduce SHOW CREATE TRIGGER.
sql/sql_partition.cc:
  Update parse_sql().
sql/sql_prepare.cc:
  Update parse_sql().
sql/sql_show.cc:
  Support new attributes for views
sql/sql_trigger.cc:
  Support new attributes for views
sql/sql_trigger.h:
  Support new attributes for views
sql/sql_view.cc:
  Support new attributes for views
sql/sql_yacc.yy:
  1. Add SHOW CREATE TRIGGER statement.
  2. Generate UTF8-body for views, stored routines, triggers and events.
sql/table.cc:
  Introduce Object_creation_ctx.
sql/table.h:
  Introduce Object_creation_ctx.
sql/share/errmsg.txt:
  Add new errors.
mysql-test/include/ddl_i18n.check_events.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_sp.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_triggers.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_views.inc:
  Aux file for test suite.
mysql-test/include/have_cp1251.inc:
  Aux file for test suite.
mysql-test/include/have_cp866.inc:
  Aux file for test suite.
mysql-test/include/have_koi8r.inc:
  Aux file for test suite.
mysql-test/include/have_utf8.inc:
  Aux file for test suite.
mysql-test/r/ddl_i18n_koi8r.result:
  Result file.
mysql-test/r/ddl_i18n_utf8.result:
  Result file.
mysql-test/r/have_cp1251.require:
  Aux file for test suite.
mysql-test/r/have_cp866.require:
  Aux file for test suite.
mysql-test/r/have_koi8r.require:
  Aux file for test suite.
mysql-test/r/have_utf8.require:
  Aux file for test suite.
mysql-test/t/ddl_i18n_koi8r.test:
  Complete koi8r test case for the CS patch.
mysql-test/t/ddl_i18n_utf8.test:
  Complete utf8 test case for the CS patch.
2007-06-28 21:34:54 +04:00

2783 lines
109 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

set names utf8;
-------------------------------------------------------------------
Views
-------------------------------------------------------------------
DROP DATABASE IF EXISTS mysqltest1|
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
CREATE TABLE t1(кол INT)|
INSERT INTO t1 VALUES(1)|
CREATE VIEW v1 AS
SELECT 'ÑеÑ<C2B5>Ñ' AS c1, кол AS c2
FROM t1|
CREATE VIEW v2 AS SELECT _koi8r'ÔÅÓÔ' as c1|
SHOW CREATE VIEW v1|
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _utf8'ÑеÑ<C2B5>Ñ' AS `c1`,`t1`.`кол` AS `c2` from `t1` utf8 utf8_general_ci
SHOW CREATE VIEW v2|
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v1 SELECT 'ÑеÑ<C2B5>Ñ' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v2 SELECT 'ÑеÑ<C2B5>Ñ' as c1 NONE NO root@localhost DEFINER utf8 utf8_general_ci
SELECT COLLATION(c1), COLLATION(c2) FROM v1|
COLLATION(c1) COLLATION(c2)
utf8_general_ci binary
SELECT COLLATION(c1) FROM v2|
COLLATION(c1)
koi8r_general_ci
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
---> connection: con2
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
SELECT * FROM mysqltest1.v1|
SELECT * FROM mysqltest1.v2|
use mysqltest1|
set names utf8|
SHOW CREATE VIEW v1|
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _utf8'ÑеÑ<C2B5>Ñ' AS `c1`,`t1`.`кол` AS `c2` from `t1` utf8 utf8_general_ci
SHOW CREATE VIEW v2|
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v1 SELECT 'ÑеÑ<C2B5>Ñ' AS c1, кол AS c2 NONE YES root@localhost DEFINER utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v2 SELECT 'ÑеÑ<C2B5>Ñ' as c1 NONE NO root@localhost DEFINER utf8 utf8_general_ci
SELECT COLLATION(c1), COLLATION(c2) FROM v1|
COLLATION(c1) COLLATION(c2)
utf8_general_ci binary
SELECT COLLATION(c1) FROM v2|
COLLATION(c1)
koi8r_general_ci
---> Dumping mysqltest1 to ddl_i18n_utf8views.mysqltest1.sql
DROP DATABASE mysqltest1|
---> Restoring mysqltest1...
---> connection: con3
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
SELECT * FROM mysqltest1.v1|
SELECT * FROM mysqltest1.v2|
use mysqltest1|
set names utf8|
SHOW CREATE VIEW v1|
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _utf8'ÑеÑ<C2B5>Ñ' AS `c1`,`t1`.`кол` AS `c2` from `t1` utf8 utf8_general_ci
SHOW CREATE VIEW v2|
View Create View character_set_client collation_connection
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v1 select 'ÑеÑ<C2B5>Ñ' AS `c1`,`t1`.`кол` AS `c2` from `t1` NONE YES root@localhost DEFINER utf8 utf8_general_ci
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL mysqltest1 v2 select 'ÑеÑ<C2B5>Ñ' AS `c1` NONE NO root@localhost DEFINER utf8 utf8_general_ci
SELECT COLLATION(c1), COLLATION(c2) FROM v1|
COLLATION(c1) COLLATION(c2)
utf8_general_ci binary
SELECT COLLATION(c1) FROM v2|
COLLATION(c1)
koi8r_general_ci
---> connection: default
use test|
DROP DATABASE mysqltest1|
-------------------------------------------------------------------
Stored procedures/functions
-------------------------------------------------------------------
DROP DATABASE IF EXISTS mysqltest1|
DROP DATABASE IF EXISTS mysqltest2|
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
CREATE DATABASE mysqltest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
CREATE PROCEDURE p1(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END|
CREATE PROCEDURE p2(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END|
CREATE PROCEDURE mysqltest2.p3(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END|
CREATE PROCEDURE mysqltest2.p4(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END|
SHOW CREATE PROCEDURE p1|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE p2|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p2 CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p3|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p3 CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p4|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p4 CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p1'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p1 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p2'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p2 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p3'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p3 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p4'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p4 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p1'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p1 NULL mysqltest1 p1 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p2'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p2 NULL mysqltest1 p2 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p3'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p3 NULL mysqltest2 p3 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p4'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p4 NULL mysqltest2 p4 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a = '1'|
SET @b = '2'|
CALL p1(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL p2(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
CALL mysqltest2.p3(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL mysqltest2.p4(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
ALTER DATABASE mysqltest2 COLLATE cp866_general_ci|
---> connection: con2
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
CALL p1(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL p2(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL mysqltest2.p3(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL mysqltest2.p4(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
set names utf8|
SHOW CREATE PROCEDURE p1|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE p2|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p2 CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p3|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p3 CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p4|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p4 CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p1'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p1 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p2'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p2 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p3'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p3 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p4'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p4 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p1'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p1 NULL mysqltest1 p1 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p2'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p2 NULL mysqltest1 p2 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p3'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p3 NULL mysqltest2 p3 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p4'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p4 NULL mysqltest2 p4 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a = '1'|
SET @b = '2'|
CALL p1(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL p2(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
CALL mysqltest2.p3(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL mysqltest2.p4(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
---> Dump of mysqltest1
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest1`;
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p1`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p2`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql
---> Dump of mysqltest2
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest2`;
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p3`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p4`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest2 to ddl_i18n_utf8sp.mysqltest2.sql
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
---> Restoring mysqltest1...
---> Restoring mysqltest2...
---> connection: con3
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
CALL p1(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL p2(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL mysqltest2.p3(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
CALL mysqltest2.p4(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
set names utf8|
SHOW CREATE PROCEDURE p1|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE p2|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p2 CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p3|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p3 CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
INOUT парам1 CHAR(10),
OUT парам2 CHAR(10))
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE PROCEDURE mysqltest2.p4|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p4 CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
INOUT парам1 CHAR(10) CHARACTER SET utf8,
OUT парам2 CHAR(10) CHARACTER SET utf8)
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p1'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p1 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p2'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest1 p2 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p3'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p3 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SHOW PROCEDURE STATUS LIKE 'p4'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
mysqltest2 p4 PROCEDURE root@localhost MODIFIED CREATED DEFINER utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p1'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p1 NULL mysqltest1 p1 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p2'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p2 NULL mysqltest1 p2 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p3'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p3 NULL mysqltest2 p3 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p4'|
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
p4 NULL mysqltest2 p4 PROCEDURE NULL SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION(парам1) AS c2,
COLLATION(парам2) AS c3;
SELECT
COLLATION('ÑекÑ<C2BA>Ñ') AS c4,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c5,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c6,
@@collation_connection AS c7,
@@character_set_client AS c8;
SET парам1 = 'a';
SET парам2 = 'b';
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER CREATED ALTERED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a = '1'|
SET @b = '2'|
CALL p1(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL p2(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
CALL mysqltest2.p3(@a, @b)|
c1 c2 c3
utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_unicode_ci utf8_unicode_ci
CALL mysqltest2.p4(@a, @b)|
c1 c2 c3
utf8_general_ci utf8_general_ci utf8_general_ci
c4 c5 c6 c7 c8
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8
SELECT COLLATION(@a) AS ca, COLLATION(@b) cb|
ca cb
utf8_general_ci utf8_general_ci
---> connection: default
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
-------------------------------------------------------------------
Triggers
-------------------------------------------------------------------
DROP DATABASE IF EXISTS mysqltest1|
DROP DATABASE IF EXISTS mysqltest2|
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
CREATE DATABASE mysqltest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
CREATE TABLE t1(c INT)|
CREATE TABLE mysqltest2.t1(c INT)|
CREATE TABLE log(msg VARCHAR(255))|
CREATE TABLE mysqltest2.log(msg VARCHAR(255))|
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END|
CREATE TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END|
CREATE TRIGGER mysqltest2.trg3 BEFORE INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END|
CREATE TRIGGER mysqltest2.trg4 AFTER INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END|
SHOW CREATE TRIGGER trg1|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg1 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER trg2|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg2 CREATE DEFINER=`root`@`localhost` TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg3|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg3 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg3 BEFORE INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg4|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg4 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg4 AFTER INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg2 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest2|
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg3 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg4 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest1|
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg1'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg1 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg2'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg2 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg3'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg3 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg4'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg4 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a1 = '1'|
SET @a2 = '1'|
SET @a3 = '1'|
SET @b1 = '2'|
SET @b2 = '2'|
SET @b3 = '2'|
INSERT INTO t1 VALUES(1)|
---> Log:
SELECT msg FROM log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM log|
INSERT INTO mysqltest2.t1 VALUES(1)|
---> Log:
SELECT msg FROM mysqltest2.log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM mysqltest2.log|
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
ALTER DATABASE mysqltest2 COLLATE cp866_general_ci|
ALTER TABLE t1 ADD COLUMN fake INT|
ALTER TABLE t1 DROP COLUMN fake|
ALTER TABLE mysqltest2.t1 ADD COLUMN fake INT|
ALTER TABLE mysqltest2.t1 DROP COLUMN fake|
---> connection: con2
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
INSERT INTO mysqltest1.t1 VALUES(0)|
INSERT INTO mysqltest2.t1 VALUES(0)|
DELETE FROM mysqltest1.log|
DELETE FROM mysqltest2.log|
set names utf8|
use mysqltest1|
SHOW CREATE TRIGGER trg1|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg1 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER trg2|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg2 CREATE DEFINER=`root`@`localhost` TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg3|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg3 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg3 BEFORE INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg4|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg4 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg4 AFTER INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg2 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest2|
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg3 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg4 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest1|
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg1'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg1 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg2'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg2 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg3'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg3 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg4'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg4 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a1 = '1'|
SET @a2 = '1'|
SET @a3 = '1'|
SET @b1 = '2'|
SET @b2 = '2'|
SET @b3 = '2'|
INSERT INTO t1 VALUES(1)|
---> Log:
SELECT msg FROM log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM log|
INSERT INTO mysqltest2.t1 VALUES(1)|
---> Log:
SELECT msg FROM mysqltest2.log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM mysqltest2.log|
---> Dump of mysqltest1
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest1`;
CREATE TABLE `log` (
`msg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `t1` VALUES (1),(0),(1);
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql
---> Dump of mysqltest2
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest2`;
CREATE TABLE `log` (
`msg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `t1` VALUES (1),(0),(1);
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER mysqltest2.trg3 BEFORE INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER mysqltest2.trg4 AFTER INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest2 to ddl_i18n_utf8triggers.mysqltest2.sql
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
---> Restoring mysqltest1...
---> Restoring mysqltest2...
ALTER TABLE mysqltest1.t1 ADD COLUMN fake INT|
ALTER TABLE mysqltest1.t1 DROP COLUMN fake|
ALTER TABLE mysqltest2.t1 ADD COLUMN fake INT|
ALTER TABLE mysqltest2.t1 DROP COLUMN fake|
---> connection: con3
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
INSERT INTO mysqltest1.t1 VALUES(0)|
INSERT INTO mysqltest2.t1 VALUES(0)|
DELETE FROM mysqltest1.log|
DELETE FROM mysqltest2.log|
set names utf8|
use mysqltest1|
SHOW CREATE TRIGGER trg1|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg1 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER trg2|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg2 CREATE DEFINER=`root`@`localhost` TRIGGER trg2 AFTER INSERT ON t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg3|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg3 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg3 BEFORE INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @a3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE TRIGGER mysqltest2.trg4|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
trg4 CREATE DEFINER=`root`@`localhost` TRIGGER mysqltest2.trg4 AFTER INSERT ON mysqltest2.t1 FOR EACH ROW
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_utf8 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION(_koi8r 'ÔÅËÓÔ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = _utf8 'ÑекÑ<C2BA>Ñ';
SET @b3 = _koi8r 'ÔÅËÓÔ';
END utf8 utf8_general_ci utf8_unicode_ci
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg2 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest2|
SHOW TRIGGERS|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg3 INSERT t1 BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END BEFORE NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
trg4 INSERT t1 BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END AFTER NULL root@localhost utf8 utf8_general_ci utf8_unicode_ci
use mysqltest1|
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg1'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg1 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg2'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 trg2 INSERT NULL mysqltest1 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg3'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg3 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10);
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @a1 = 'ÑекÑ<C2BA>Ñ';
SET @a2 = 'ÑекÑ<C2BA>Ñ';
SET @a3 = 'ÑекÑ<C2BA>Ñ';
END ROW BEFORE NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 'trg4'|
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 trg4 INSERT NULL mysqltest2 t1 0 NULL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
INSERT INTO log VALUES(COLLATION(перем1));
INSERT INTO log VALUES(COLLATION('ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(COLLATION( 'ÑекÑ<C2BA>Ñ'));
INSERT INTO log VALUES(@@collation_connection);
INSERT INTO log VALUES(@@character_set_client);
SET @b1 = 'ÑекÑ<C2BA>Ñ';
SET @b2 = 'ÑекÑ<C2BA>Ñ';
SET @b3 = 'ÑекÑ<C2BA>Ñ';
END ROW AFTER NULL NULL OLD NEW CREATED root@localhost utf8 utf8_general_ci utf8_unicode_ci
SET @a1 = '1'|
SET @a2 = '1'|
SET @a3 = '1'|
SET @b1 = '2'|
SET @b2 = '2'|
SET @b3 = '2'|
INSERT INTO t1 VALUES(1)|
---> Log:
SELECT msg FROM log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM log|
INSERT INTO mysqltest2.t1 VALUES(1)|
---> Log:
SELECT msg FROM mysqltest2.log|
msg
utf8_unicode_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
utf8_general_ci
utf8_general_ci
utf8_general_ci
koi8r_general_ci
utf8_general_ci
utf8
SELECT
COLLATION(@a1) AS ca1,
COLLATION(@a2) AS ca2,
COLLATION(@a3) AS ca3,
COLLATION(@b1) AS cb1,
COLLATION(@b2) AS cb2,
COLLATION(@b3) AS cb3|
ca1 ca2 ca3 cb1 cb2 cb3
utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci koi8r_general_ci
DELETE FROM mysqltest2.log|
---> connection: default
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
-------------------------------------------------------------------
Events
-------------------------------------------------------------------
DROP DATABASE IF EXISTS mysqltest1|
DROP DATABASE IF EXISTS mysqltest2|
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
CREATE DATABASE mysqltest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO
BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev1 SYSTEM CREATE EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev2 SYSTEM CREATE EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SHOW EVENTS LIKE 'ev4'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev1'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev1 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev2 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev3 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev4 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
ALTER DATABASE mysqltest2 COLLATE cp866_general_ci|
---> connection: con2
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
SHOW CREATE EVENT ev1|
SHOW CREATE EVENT ev2|
SHOW CREATE EVENT mysqltest2.ev3|
SHOW CREATE EVENT mysqltest2.ev4|
set names utf8|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev1 SYSTEM CREATE EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev2 SYSTEM CREATE EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SHOW EVENTS LIKE 'ev4'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev1'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev1 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev2 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev3 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev4 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
---> Dump of mysqltest1
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest1`;
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
DELIMITER ;;
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
/*!50003 SET character_set_client = utf8 */ ;;
/*!50003 SET character_set_results = utf8 */ ;;
/*!50003 SET collation_connection = utf8_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
/*!50003 SET character_set_results = @saved_cs_results */ ;;
/*!50003 SET collation_connection = @saved_col_connection */ ;;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
DELIMITER ;;
ALTER DATABASE mysqltest1 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
/*!50003 SET character_set_client = utf8 */ ;;
/*!50003 SET character_set_results = utf8 */ ;;
/*!50003 SET collation_connection = utf8_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
/*!50003 SET character_set_results = @saved_cs_results */ ;;
/*!50003 SET collation_connection = @saved_col_connection */ ;;
ALTER DATABASE mysqltest1 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
DELIMITER ;
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql
---> Dump of mysqltest2
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 */;
USE `mysqltest2`;
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
DELIMITER ;;
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
/*!50003 SET character_set_client = utf8 */ ;;
/*!50003 SET character_set_results = utf8 */ ;;
/*!50003 SET collation_connection = utf8_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
/*!50003 SET character_set_results = @saved_cs_results */ ;;
/*!50003 SET collation_connection = @saved_col_connection */ ;;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
DELIMITER ;;
ALTER DATABASE mysqltest2 CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
/*!50003 SET character_set_client = utf8 */ ;;
/*!50003 SET character_set_results = utf8 */ ;;
/*!50003 SET collation_connection = utf8_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE EVENT `ev4` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
/*!50003 SET character_set_results = @saved_cs_results */ ;;
/*!50003 SET collation_connection = @saved_col_connection */ ;;
ALTER DATABASE mysqltest2 CHARACTER SET cp866 COLLATE cp866_general_ci ;;
DELIMITER ;
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
---> Dumping mysqltest2 to ddl_i18n_utf8events.mysqltest2.sql
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
---> Restoring mysqltest1...
---> Restoring mysqltest2...
---> connection: con3
SET @@character_set_client= cp1251|
SET @@character_set_results= cp1251|
SET @@collation_connection= cp1251_general_ci|
SHOW CREATE EVENT ev1|
SHOW CREATE EVENT ev2|
SHOW CREATE EVENT mysqltest2.ev3|
SHOW CREATE EVENT mysqltest2.ev4|
set names utf8|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev1 SYSTEM CREATE EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev2 SYSTEM CREATE EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev3 SYSTEM CREATE EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION(_utf8 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SHOW EVENTS LIKE 'ev4'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev1'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev1 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest1 ev2 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev3 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL mysqltest2 ev4 root@localhost SYSTEM SQL BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
COLLATION('ÑекÑ<C2BA>Ñ') AS c2,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c3,
COLLATION( 'ÑекÑ<C2BA>Ñ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
-------------------------------------------------------------------
DDL statements within stored routine.
-------------------------------------------------------------------
DROP DATABASE IF EXISTS mysqltest1|
DROP DATABASE IF EXISTS mysqltest2|
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
CREATE DATABASE mysqltest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
CREATE PROCEDURE p1()
BEGIN
CREATE TABLE t1(col1 VARCHAR(10));
SHOW CREATE TABLE t1;
END|
CREATE PROCEDURE mysqltest2.p2()
BEGIN
CREATE TABLE t2(col1 VARCHAR(10));
SHOW CREATE TABLE t2;
END|
CALL p1()|
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
SHOW CREATE TABLE t1|
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
CALL mysqltest2.p2()|
Table Create Table
t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
SHOW CREATE TABLE mysqltest2.t2|
Table Create Table
t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
ALTER DATABASE mysqltest1 COLLATE cp1251_general_cs|
ALTER DATABASE mysqltest2 COLLATE cp1251_general_cs|
DROP TABLE t1|
DROP TABLE mysqltest2.t2|
CALL p1()|
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
SHOW CREATE TABLE t1|
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
CALL mysqltest2.p2()|
Table Create Table
t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
SHOW CREATE TABLE mysqltest2.t2|
Table Create Table
t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
---> connection: default
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|