Loading client/mysql.cc +16 −17 Original line number Diff line number Diff line Loading @@ -2834,25 +2834,13 @@ com_status(String *buffer __attribute__((unused)), const char *status; char buff[22]; ulonglong id; MYSQL_RES *result; LINT_INIT(result); tee_puts("--------------", stdout); usage(1); /* Print version */ if (connected) { MYSQL_RES *result; LINT_INIT(result); tee_fprintf(stdout, "\nConnection id:\t\t%lu\n",mysql_thread_id(&mysql)); if (!mysql_query(&mysql,"select DATABASE(), USER() limit 1") && (result=mysql_use_result(&mysql))) { MYSQL_ROW cur=mysql_fetch_row(result); if (cur) { tee_fprintf(stdout, "Current database:\t%s\n", cur[0] ? cur[0] : ""); tee_fprintf(stdout, "Current user:\t\t%s\n", cur[1]); } mysql_free_result(result); } #ifdef HAVE_OPENSSL if (mysql.net.vio && mysql.net.vio->ssl_arg && SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg)) Loading Loading @@ -2886,9 +2874,20 @@ com_status(String *buffer __attribute__((unused)), if ((id= mysql_insert_id(&mysql))) tee_fprintf(stdout, "Insert id:\t\t%s\n", llstr(id, buff)); tee_fprintf(stdout, "Client characterset:\t%s\n", charset_info->name); tee_fprintf(stdout, "Server characterset:\t%s\n", mysql.charset->name); if (!mysql_query(&mysql,"select @@character_set_client, @@character_set_connection, @@character_set_server, @@character_set_database") && (result=mysql_use_result(&mysql))) { MYSQL_ROW cur=mysql_fetch_row(result); if (cur) { tee_fprintf(stdout, "Server characterset:\t%s\n", cur[0] ? cur[0] : ""); tee_fprintf(stdout, "Db characterset:\t%s\n", cur[3] ? cur[3] : ""); tee_fprintf(stdout, "Client characterset:\t%s\n", cur[2] ? cur[2] : ""); tee_fprintf(stdout, "Conn. characterset:\t%s\n", cur[1] ? cur[1] : ""); } mysql_free_result(result); } #ifndef EMBEDDED_LIBRARY if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || ! mysql.unix_socket) tee_fprintf(stdout, "TCP port:\t\t%d\n", mysql.port); Loading configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -2715,7 +2715,7 @@ case $default_charset in define(UCSC2, ucs2_czech_ci ucs2_danish_ci) define(UCSC3, ucs2_estonian_ci ucs2_icelandic_ci) define(UCSC4, ucs2_latvian_ci ucs2_lithuanian_ci) define(UCSC5, ucs2_polish_ci ucs2_romanian_ci) define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci) define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci) define(UCSC7, ucs2_spanish2_ci ucs2_spanish_ci) define(UCSC8, ucs2_swedish_ci ucs2_turkish_ci) Loading @@ -2733,7 +2733,7 @@ case $default_charset in define(UTFC2, utf8_czech_ci utf8_danish_ci) define(UTFC3, utf8_estonian_ci utf8_icelandic_ci) define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci) define(UTFC5, utf8_polish_ci utf8_romanian_ci) define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci) define(UTFC6, utf8_slovak_ci utf8_slovenian_ci) define(UTFC7, utf8_spanish2_ci utf8_spanish_ci) define(UTFC8, utf8_swedish_ci utf8_turkish_ci) Loading libmysql/libmysql.c +5 −5 Original line number Diff line number Diff line Loading @@ -1860,14 +1860,14 @@ MYSQL_STMT * STDCALL mysql_prepare(MYSQL *mysql, const char *query, a server-side prepared statement. Memory for this structure (~700 bytes) is allocated using 'malloc'. Once created, the handle can be reused many times. Created statement handle is bound to connection handle provided to this call: it's lifetime is limited by lifetime handle provided to this call: its lifetime is limited by lifetime of connection. 'mysql_stmt_init()' is a pure local call, server side structure is created only in mysql_stmt_prepare. Next steps you may want to make: - set a statement attribute (mysql_stmt_attr_set()), - prepare statement handle with a query (mysql_stmt_prepare()), - close statement handle and free it's memory (mysql_stmt_close()), - close statement handle and free its memory (mysql_stmt_close()), - reset statement with mysql_stmt_reset() (a no-op which will just return). Behaviour of the rest of API calls on this statement is not defined yet Loading Loading @@ -2592,7 +2592,7 @@ stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)), mysql_stmt_attr_get() mysql_stmt_attr_set() attr_type statemenet attribute attr_type statement attribute value casted to const void * pointer to value. RETURN VALUE Loading Loading @@ -2688,7 +2688,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) mysql_stmt_free_result(stmt); /* No need to check for stmt->state: if the statement wasn't prepared we'll get 'unknown statemenet handler' error from server. prepared we'll get 'unknown statement handler' error from server. */ if (mysql->methods->stmt_execute(stmt)) DBUG_RETURN(1); Loading Loading @@ -2813,7 +2813,7 @@ static my_bool int_is_null_false= 0; By properly initializing bind array you can bind virtually any C language type to statement's placeholders: First, it's strongly recommended to always zero-initialize entire bind structure before setting it's members. This will both shorten bind structure before setting its members. This will both shorten your application code and make it robust to future extensions of MYSQL_BIND structure. Then you need to assign typecode of your application buffer to Loading mysql-test/r/ctype_uca.result +374 −0 Original line number Diff line number Diff line Loading @@ -1911,3 +1911,377 @@ c Μωδ Μωδαί̈ DROP TABLE t1; CREATE TABLE t1 ( col1 CHAR(32) CHARACTER SET utf8 NOT NULL ); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0633064A0651062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D06330646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0642064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06320627062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062806310627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064706450647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F062706460634062C0648064A06270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A06270631064A062E USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062706460642064406270628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A0631062706460650 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062F064806270631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280631062706480646200C06310627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E064806270646062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A062D062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0623062B064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0642063106270631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF06310641062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062E0635064A0651062A064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628062706310632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906A90633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270648060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D062F0648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628064A0633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648067E0646062C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06330627064406AF064A060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063306270644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606450627064A0646062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A06280631064A0632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062C06440633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628064A0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06350641062D0627062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9062A06270628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x068606340645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E06480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0686064706310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06420648064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450635064506510645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06310627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646063406270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645064A200C062F0647062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647063106860646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06390645064400BB USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9064806340634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064706500646064A064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062D063306270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A062706310634062706370631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646062A06340631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064806270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064506270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064806510644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0634062E064A0635 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0627062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064106270648062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D06270644062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064106A906510631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063A064406280647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06270631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063106470628063106270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606470636062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506340631064806370647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646064A0632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062D064206510642 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0637063106270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064106310647064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0645062F06510646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627063106470627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0639063106350647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064506480631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0633064A06270633064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D064806320647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906440645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F062706460634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450642062706440627062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064A06AF0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648064A06980647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646062706450647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628062D062B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628063106310633064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606480634062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064606470627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0622064606860647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064806310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064206270645062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0631062F062706320645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0698062706460648064A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06390648062A0650 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063306500631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0646064A0633064F0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063106270633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064A0626062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0639064406480645200C063406310642064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280639062F0627064B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062F063106330647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062206410631064A06420627064A064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06270646063406AF06270647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06440646062F0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E064A06480633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064606AF06270645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0622063A06270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062C064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062C064706270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064806510645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063406470631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9064506280631064A062C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646062A06420644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90631062F0646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06470645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06310641062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646062C0627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506270646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062706A9062A06280631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606380631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06480644062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06480628062706310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606330628062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645063306270639062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06480632064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062E062A06270631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06330641064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064606AF0644064A0633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0642064A200C06320627062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280627063206AF0634062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064506330631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220644064506270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220645062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A906270631064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0631062F0627062E062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906440645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062F0628064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D062F0651 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606280648062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06480644064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906480636060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06340627064A062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506470645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06470645063306310634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627064606480646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E0627064606480627062F06AF064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF06310645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062C0648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062206480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627064506440627064B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9062F064A06AF0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064406280633062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F0646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450647064506270646 USING utf8)); SELECT HEX(CONVERT(col1 USING ucs2)) FROM t1 ORDER BY col1 COLLATE utf8_persian_ci, col1 COLLATE utf8_bin; HEX(CONVERT(col1 USING ucs2)) 0041004100410627 0041004100410628 0041004100410648 0041004100410647 0622063A06270632 062206410631064A06420627064A064A 06220644064506270646064A 06220645062F0647 06220646 06220646060C 06220646062C0627 0622064606860647 062206480631062F 0627062D063306270646 0627062F0628064A 0627062F064806270631062F 06270632 06270633062A 06270634 0627064206270645062A 062706A9062A06280631 0627064506480631 06270646062F 062706460642064406270628 0627064606AF0644064A0633 06270648 06270648060C 0627064806510644 0627064A 0627064A063106270646 0627064A063106270646060C 0627064A0631062706460650 0627064A063106270646064A 0627064A0646 0628 06280627 0628062706310632 06280627063206AF0634062A 0628062D062B 06280631062706480646200C06310627 062806310627064A 0628063106310633064A 06280639062F0627064B 06280648062C0648062F 06280648062F 06280648062F060C 06280648062F0646062F 06280647 0628064A0633062A 0628064A0646 067E0631062F0627062E062A0647 067E0631062F062706320645 067E0633 067E064A06480633062A 062A0627 062A06270631064A062E 062A0623062B064A0631 062A06280631064A0632 062A062D062A 062A0631 062A0634062E064A0635 062A064106270648062A 062A064106A906510631 062A0642064A 062A0642064A200C06320627062F0647 062A0645062F06510646 062A064606470627 062A064806270646 062C064606AF 062C064706270646 068606340645 0686064706310647 062D06270644062A 062D062F0651 062D062F0648062F 062D06330646 062D064806320647 062E0627064606480627062F06AF064A 062E064806270646062F0647 062E06480631062F 062F0627062F 062F06270631062F 062F062706460634 062F062706460634062C0648064A06270646064A 062F06270646063406AF06270647 062F0631 062F0633062A 062F06390648062A0650 062F064406280633062A0647 062F0646064A0633064F0646 062F0648 062F06480628062706310647 062F064806310647 062F06480644062A 062F064806510645 062F064A06AF0631 06310627 063106270633 06310641062A 063106470628063106270646 06320627062F0647 0698062706460648064A0647 063306500631 063306270644 06330627064406AF064A060C 06330641064A0631 0633064A06270633064A 0633064A0651062F 06340627064A062F 0634062E0635064A0651062A064A 0634062F 0634062F0647 063406470631 06350641062D0627062A 0637063106270632 0639063106350647 063906A90633 063906440645 063906440645064A 0639064406480645200C063406310642064A 06390645064400BB 063906480636060C 063A064406280647 064106310647064606AF 0642063106270631 06420648064A 06A90627063106470627064A 06A906270631064A 06A90627064506440627064B 06A90627064606480646 06A9062A06270628 06A90631062F0646062F 06A9064506280631064A062C 06A9064806340634 06A90647 06AF 06AF06310641062A0647 06AF06310645064A 06440646062F0646 064506270646062F 0645062C06440633 0645062D064206510642 0645062E062A06270631 0645062F063106330647 0645063306270639062F 064506340631064806370647 06450635064506510645 06450642062706440627062A 06450646 06450646062A06340631 06450646062A06420644 064506480631062F 064506470645 06450647064506270646 0645064A 0645064A200C062F0647062F060C 0646062706450647 064606280648062F060C 064606330628062A 0646063406270646 064606380631 064606450627064A0646062F0647 064606480634062A0647 064606470636062A 0646064A0632 0648 0648067E0646062C 06480632064A0631 06480644064A 0648064A 0648064A06980647 064706500646064A064606AF 0647063106860646062F 06470645 0647064506270646 0647064506330631 06470645063306310634 064706450647 0647064606AF06270645064A 0647064A0626062A 064A062706310634062706370631 064A06A9 064A06A9062F064A06AF0631 064A06A9064A DROP TABLE t1; mysql-test/r/func_set.result +3 −0 Original line number Diff line number Diff line Loading @@ -64,3 +64,6 @@ find_in_set('a',binary 'A,B,C') select find_in_set(binary 'a', 'A,B,C'); find_in_set(binary 'a', 'A,B,C') 0 select find_in_set('1','3,1,'); find_in_set('1','3,1,') 2 Loading
client/mysql.cc +16 −17 Original line number Diff line number Diff line Loading @@ -2834,25 +2834,13 @@ com_status(String *buffer __attribute__((unused)), const char *status; char buff[22]; ulonglong id; MYSQL_RES *result; LINT_INIT(result); tee_puts("--------------", stdout); usage(1); /* Print version */ if (connected) { MYSQL_RES *result; LINT_INIT(result); tee_fprintf(stdout, "\nConnection id:\t\t%lu\n",mysql_thread_id(&mysql)); if (!mysql_query(&mysql,"select DATABASE(), USER() limit 1") && (result=mysql_use_result(&mysql))) { MYSQL_ROW cur=mysql_fetch_row(result); if (cur) { tee_fprintf(stdout, "Current database:\t%s\n", cur[0] ? cur[0] : ""); tee_fprintf(stdout, "Current user:\t\t%s\n", cur[1]); } mysql_free_result(result); } #ifdef HAVE_OPENSSL if (mysql.net.vio && mysql.net.vio->ssl_arg && SSL_get_cipher((SSL*) mysql.net.vio->ssl_arg)) Loading Loading @@ -2886,9 +2874,20 @@ com_status(String *buffer __attribute__((unused)), if ((id= mysql_insert_id(&mysql))) tee_fprintf(stdout, "Insert id:\t\t%s\n", llstr(id, buff)); tee_fprintf(stdout, "Client characterset:\t%s\n", charset_info->name); tee_fprintf(stdout, "Server characterset:\t%s\n", mysql.charset->name); if (!mysql_query(&mysql,"select @@character_set_client, @@character_set_connection, @@character_set_server, @@character_set_database") && (result=mysql_use_result(&mysql))) { MYSQL_ROW cur=mysql_fetch_row(result); if (cur) { tee_fprintf(stdout, "Server characterset:\t%s\n", cur[0] ? cur[0] : ""); tee_fprintf(stdout, "Db characterset:\t%s\n", cur[3] ? cur[3] : ""); tee_fprintf(stdout, "Client characterset:\t%s\n", cur[2] ? cur[2] : ""); tee_fprintf(stdout, "Conn. characterset:\t%s\n", cur[1] ? cur[1] : ""); } mysql_free_result(result); } #ifndef EMBEDDED_LIBRARY if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || ! mysql.unix_socket) tee_fprintf(stdout, "TCP port:\t\t%d\n", mysql.port); Loading
configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -2715,7 +2715,7 @@ case $default_charset in define(UCSC2, ucs2_czech_ci ucs2_danish_ci) define(UCSC3, ucs2_estonian_ci ucs2_icelandic_ci) define(UCSC4, ucs2_latvian_ci ucs2_lithuanian_ci) define(UCSC5, ucs2_polish_ci ucs2_romanian_ci) define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci) define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci) define(UCSC7, ucs2_spanish2_ci ucs2_spanish_ci) define(UCSC8, ucs2_swedish_ci ucs2_turkish_ci) Loading @@ -2733,7 +2733,7 @@ case $default_charset in define(UTFC2, utf8_czech_ci utf8_danish_ci) define(UTFC3, utf8_estonian_ci utf8_icelandic_ci) define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci) define(UTFC5, utf8_polish_ci utf8_romanian_ci) define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci) define(UTFC6, utf8_slovak_ci utf8_slovenian_ci) define(UTFC7, utf8_spanish2_ci utf8_spanish_ci) define(UTFC8, utf8_swedish_ci utf8_turkish_ci) Loading
libmysql/libmysql.c +5 −5 Original line number Diff line number Diff line Loading @@ -1860,14 +1860,14 @@ MYSQL_STMT * STDCALL mysql_prepare(MYSQL *mysql, const char *query, a server-side prepared statement. Memory for this structure (~700 bytes) is allocated using 'malloc'. Once created, the handle can be reused many times. Created statement handle is bound to connection handle provided to this call: it's lifetime is limited by lifetime handle provided to this call: its lifetime is limited by lifetime of connection. 'mysql_stmt_init()' is a pure local call, server side structure is created only in mysql_stmt_prepare. Next steps you may want to make: - set a statement attribute (mysql_stmt_attr_set()), - prepare statement handle with a query (mysql_stmt_prepare()), - close statement handle and free it's memory (mysql_stmt_close()), - close statement handle and free its memory (mysql_stmt_close()), - reset statement with mysql_stmt_reset() (a no-op which will just return). Behaviour of the rest of API calls on this statement is not defined yet Loading Loading @@ -2592,7 +2592,7 @@ stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)), mysql_stmt_attr_get() mysql_stmt_attr_set() attr_type statemenet attribute attr_type statement attribute value casted to const void * pointer to value. RETURN VALUE Loading Loading @@ -2688,7 +2688,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) mysql_stmt_free_result(stmt); /* No need to check for stmt->state: if the statement wasn't prepared we'll get 'unknown statemenet handler' error from server. prepared we'll get 'unknown statement handler' error from server. */ if (mysql->methods->stmt_execute(stmt)) DBUG_RETURN(1); Loading Loading @@ -2813,7 +2813,7 @@ static my_bool int_is_null_false= 0; By properly initializing bind array you can bind virtually any C language type to statement's placeholders: First, it's strongly recommended to always zero-initialize entire bind structure before setting it's members. This will both shorten bind structure before setting its members. This will both shorten your application code and make it robust to future extensions of MYSQL_BIND structure. Then you need to assign typecode of your application buffer to Loading
mysql-test/r/ctype_uca.result +374 −0 Original line number Diff line number Diff line Loading @@ -1911,3 +1911,377 @@ c Μωδ Μωδαί̈ DROP TABLE t1; CREATE TABLE t1 ( col1 CHAR(32) CHARACTER SET utf8 NOT NULL ); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0041004100410648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0633064A0651062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D06330646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0642064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06320627062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062806310627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064706450647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F062706460634062C0648064A06270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A06270631064A062E USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062706460642064406270628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A0631062706460650 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062F064806270631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280631062706480646200C06310627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E064806270646062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A062D062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0623062B064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0642063106270631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF06310641062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062E0635064A0651062A064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628062706310632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906A90633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270648060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D062F0648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628064A0633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648067E0646062C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06330627064406AF064A060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063306270644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606450627064A0646062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A06280631064A0632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062C06440633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628064A0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06350641062D0627062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9062A06270628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x068606340645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E06480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0686064706310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06420648064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450635064506510645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06310627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646063406270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645064A200C062F0647062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647063106860646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06390645064400BB USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9064806340634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064706500646064A064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062D063306270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A062706310634062706370631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646062A06340631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064806270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064506270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064806510644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0634062E064A0635 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0627062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064106270648062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D06270644062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064106A906510631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063A064406280647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06270631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063106470628063106270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606470636062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506340631064806370647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646064A0632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062D064206510642 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0637063106270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064106310647064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0645062F06510646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627063106470627064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0639063106350647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064506480631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0633064A06270633064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064A063106270646060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D064806320647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906440645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F062706460634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450642062706440627062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064A06AF0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648064A06980647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0646062706450647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628062D062B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0628063106310633064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606480634062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A064606470627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0622064606860647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064806310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064206270645062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0631062F062706320645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0698062706460648064A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0648064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06390648062A0650 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063306500631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0646064A0633064F0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063106270633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064A0626062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0639064406480645200C063406310642064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280639062F0627064B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062F063106330647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062206410631064A06420627064A064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06270646063406AF06270647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06440646062F0646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E064A06480633062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064606AF06270645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0622063A06270632 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062C064606AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062C064706270646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064806510645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063406470631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A9064506280631064A062C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450646062A06420644 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90631062F0646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06470645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06310641062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646062C0627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506270646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0627 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062706A9062A06280631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606380631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06480644062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F06480628062706310647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606330628062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645063306270639062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0634062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06480632064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0645062E062A06270631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06330641064A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627064606AF0644064A0633 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0642064A200C06320627062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280627063206AF0634062A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0647064506330631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220644064506270646064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06270634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220645062F0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A906270631064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x067E0631062F0627062E062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906440645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x0627062F0628064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062D062F0651 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064606280648062F060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06480644064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x063906480636060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06340627064A062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064506470645 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062A0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06220646060C USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06470645063306310634 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627064606480646 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062E0627064606480627062F06AF064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF06310645064A USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062C0648062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062206480631062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F0648 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06A90627064506440627064B USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x064A06A9062F064A06AF0631 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06AF USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x062F064406280633062A0647 USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06280648062F0646062F USING utf8)); INSERT INTO t1 VALUES (CONVERT(_ucs2 0x06450647064506270646 USING utf8)); SELECT HEX(CONVERT(col1 USING ucs2)) FROM t1 ORDER BY col1 COLLATE utf8_persian_ci, col1 COLLATE utf8_bin; HEX(CONVERT(col1 USING ucs2)) 0041004100410627 0041004100410628 0041004100410648 0041004100410647 0622063A06270632 062206410631064A06420627064A064A 06220644064506270646064A 06220645062F0647 06220646 06220646060C 06220646062C0627 0622064606860647 062206480631062F 0627062D063306270646 0627062F0628064A 0627062F064806270631062F 06270632 06270633062A 06270634 0627064206270645062A 062706A9062A06280631 0627064506480631 06270646062F 062706460642064406270628 0627064606AF0644064A0633 06270648 06270648060C 0627064806510644 0627064A 0627064A063106270646 0627064A063106270646060C 0627064A0631062706460650 0627064A063106270646064A 0627064A0646 0628 06280627 0628062706310632 06280627063206AF0634062A 0628062D062B 06280631062706480646200C06310627 062806310627064A 0628063106310633064A 06280639062F0627064B 06280648062C0648062F 06280648062F 06280648062F060C 06280648062F0646062F 06280647 0628064A0633062A 0628064A0646 067E0631062F0627062E062A0647 067E0631062F062706320645 067E0633 067E064A06480633062A 062A0627 062A06270631064A062E 062A0623062B064A0631 062A06280631064A0632 062A062D062A 062A0631 062A0634062E064A0635 062A064106270648062A 062A064106A906510631 062A0642064A 062A0642064A200C06320627062F0647 062A0645062F06510646 062A064606470627 062A064806270646 062C064606AF 062C064706270646 068606340645 0686064706310647 062D06270644062A 062D062F0651 062D062F0648062F 062D06330646 062D064806320647 062E0627064606480627062F06AF064A 062E064806270646062F0647 062E06480631062F 062F0627062F 062F06270631062F 062F062706460634 062F062706460634062C0648064A06270646064A 062F06270646063406AF06270647 062F0631 062F0633062A 062F06390648062A0650 062F064406280633062A0647 062F0646064A0633064F0646 062F0648 062F06480628062706310647 062F064806310647 062F06480644062A 062F064806510645 062F064A06AF0631 06310627 063106270633 06310641062A 063106470628063106270646 06320627062F0647 0698062706460648064A0647 063306500631 063306270644 06330627064406AF064A060C 06330641064A0631 0633064A06270633064A 0633064A0651062F 06340627064A062F 0634062E0635064A0651062A064A 0634062F 0634062F0647 063406470631 06350641062D0627062A 0637063106270632 0639063106350647 063906A90633 063906440645 063906440645064A 0639064406480645200C063406310642064A 06390645064400BB 063906480636060C 063A064406280647 064106310647064606AF 0642063106270631 06420648064A 06A90627063106470627064A 06A906270631064A 06A90627064506440627064B 06A90627064606480646 06A9062A06270628 06A90631062F0646062F 06A9064506280631064A062C 06A9064806340634 06A90647 06AF 06AF06310641062A0647 06AF06310645064A 06440646062F0646 064506270646062F 0645062C06440633 0645062D064206510642 0645062E062A06270631 0645062F063106330647 0645063306270639062F 064506340631064806370647 06450635064506510645 06450642062706440627062A 06450646 06450646062A06340631 06450646062A06420644 064506480631062F 064506470645 06450647064506270646 0645064A 0645064A200C062F0647062F060C 0646062706450647 064606280648062F060C 064606330628062A 0646063406270646 064606380631 064606450627064A0646062F0647 064606480634062A0647 064606470636062A 0646064A0632 0648 0648067E0646062C 06480632064A0631 06480644064A 0648064A 0648064A06980647 064706500646064A064606AF 0647063106860646062F 06470645 0647064506270646 0647064506330631 06470645063306310634 064706450647 0647064606AF06270645064A 0647064A0626062A 064A062706310634062706370631 064A06A9 064A06A9062F064A06AF0631 064A06A9064A DROP TABLE t1;
mysql-test/r/func_set.result +3 −0 Original line number Diff line number Diff line Loading @@ -64,3 +64,6 @@ find_in_set('a',binary 'A,B,C') select find_in_set(binary 'a', 'A,B,C'); find_in_set(binary 'a', 'A,B,C') 0 select find_in_set('1','3,1,'); find_in_set('1','3,1,') 2