Merge bb-10.2-ext into 10.3

This commit is contained in:
Marko Mäkelä 2017-09-18 11:38:07 +03:00
commit e17a282da9
72 changed files with 3940 additions and 1239 deletions

View File

@ -594,7 +594,6 @@ trim_dotslash(const char *path)
/************************************************************************ /************************************************************************
Check if string ends with given suffix. Check if string ends with given suffix.
@return true if string ends with given suffix. */ @return true if string ends with given suffix. */
static
bool bool
ends_with(const char *str, const char *suffix) ends_with(const char *str, const char *suffix)
{ {

View File

@ -55,6 +55,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "encryption_plugin.h" #include "encryption_plugin.h"
#include <sstream> #include <sstream>
#include <sql_error.h> #include <sql_error.h>
#include <ut0ut.h>
char *tool_name; char *tool_name;
@ -1665,38 +1666,28 @@ static void check_mdl_lock_works(const char *table_name)
free(query); free(query);
} }
#endif #endif
extern void
dict_fs2utf8(const char*, char*, size_t, char*, size_t);
void void
mdl_lock_table(ulint space_id) mdl_lock_table(ulint space_id)
{ {
static const char q[] = "SELECT NAME " std::ostringstream oss;
oss << "SELECT NAME "
"FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES " "FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES "
"WHERE SPACE = " ULINTPF " AND NAME LIKE '%%/%%'"; "WHERE SPACE = " << space_id << " AND NAME LIKE '%%/%%'";
char query[22 + sizeof q];
snprintf(query, sizeof query, q, space_id);
pthread_mutex_lock(&mdl_lock_con_mutex); pthread_mutex_lock(&mdl_lock_con_mutex);
MYSQL_RES *mysql_result = xb_mysql_query(mdl_con, query, true, true); MYSQL_RES *mysql_result = xb_mysql_query(mdl_con, oss.str().c_str(), true, true);
while (MYSQL_ROW row = mysql_fetch_row(mysql_result)) { while (MYSQL_ROW row = mysql_fetch_row(mysql_result)) {
char full_table_name[2*FN_REFLEN +2]; std::string full_table_name = ut_get_name(0,row[0]);
char db_utf8[FN_REFLEN]; std::ostringstream lock_query;
char table_utf8[FN_REFLEN]; lock_query << "SELECT * FROM " << full_table_name << " LIMIT 0";
static const char lq[] = "SELECT * FROM %s LIMIT 0";
char lock_query[sizeof full_table_name + sizeof lq];
dict_fs2utf8(row[0], db_utf8, sizeof db_utf8,table_utf8,sizeof table_utf8); msg_ts("Locking MDL for %s\n", full_table_name.c_str());
snprintf(full_table_name,sizeof(full_table_name),"`%s`.`%s`",db_utf8,table_utf8); xb_mysql_query(mdl_con, lock_query.str().c_str(), false, false);
msg_ts("Locking MDL for %s\n", full_table_name);
snprintf(lock_query, sizeof lock_query, lq, full_table_name);
xb_mysql_query(mdl_con, lock_query, false, false);
DBUG_EXECUTE_IF("check_mdl_lock_works", DBUG_EXECUTE_IF("check_mdl_lock_works",
check_mdl_lock_works(full_table_name);); check_mdl_lock_works(full_table_name.c_str()););
} }
pthread_mutex_unlock(&mdl_lock_con_mutex); pthread_mutex_unlock(&mdl_lock_con_mutex);

View File

@ -1149,17 +1149,12 @@ static void append_export_table(const char *dbname, const char *tablename, bool
if(dbname && tablename && !is_remote) if(dbname && tablename && !is_remote)
{ {
char buf[3*FN_REFLEN]; char buf[3*FN_REFLEN];
char db_utf8[FN_REFLEN];
char table_utf8[FN_REFLEN];
snprintf(buf,sizeof(buf),"%s/%s",dbname, tablename); snprintf(buf,sizeof(buf),"%s/%s",dbname, tablename);
// trim .ibd // trim .ibd
char *p=strrchr(buf, '.'); char *p=strrchr(buf, '.');
if (p) *p=0; if (p) *p=0;
dict_fs2utf8(buf, db_utf8, sizeof(db_utf8),table_utf8,sizeof(table_utf8)); tables_for_export.push_back(ut_get_name(0,buf));
snprintf(buf,sizeof(buf),"`%s`.`%s`",db_utf8,table_utf8);
tables_for_export.push_back(buf);
} }
} }
@ -2751,6 +2746,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
os_file_stat_t dbinfo; os_file_stat_t dbinfo;
os_file_stat_t fileinfo; os_file_stat_t fileinfo;
dberr_t err = DB_SUCCESS; dberr_t err = DB_SUCCESS;
size_t len;
/* The datadir of MySQL is always the default directory of mysqld */ /* The datadir of MySQL is always the default directory of mysqld */
@ -2769,14 +2765,12 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
ret = fil_file_readdir_next_file(&err, fil_path_to_mysql_datadir, dir, ret = fil_file_readdir_next_file(&err, fil_path_to_mysql_datadir, dir,
&dbinfo); &dbinfo);
while (ret == 0) { while (ret == 0) {
size_t len = strlen(dbinfo.name);
/* General tablespaces are always at the first level of the /* General tablespaces are always at the first level of the
data home dir */ data home dir */
if (dbinfo.type == OS_FILE_TYPE_FILE && len > 4) { if (dbinfo.type == OS_FILE_TYPE_FILE) {
bool is_isl = !strcmp(dbinfo.name + len - 4, ".isl"); bool is_isl = ends_with(dbinfo.name, ".isl");
bool is_ibd = !is_isl bool is_ibd = !is_isl && ends_with(dbinfo.name,".ibd");
&& !strcmp(dbinfo.name + len - 4, ".ibd");
if (is_isl || is_ibd) { if (is_isl || is_ibd) {
(*callback)(NULL, dbinfo.name, is_isl); (*callback)(NULL, dbinfo.name, is_isl);
@ -2832,19 +2826,17 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
continue; continue;
} }
size_t len = strlen(fileinfo.name);
/* We found a symlink or a file */ /* We found a symlink or a file */
if (len > 4 if (strlen(fileinfo.name) > 4) {
&& !strcmp(fileinfo.name + len - 4, bool is_isl= false;
".ibd")) { if (ends_with(fileinfo.name, ".ibd") || ((is_isl = ends_with(fileinfo.name, ".ibd"))))
(*callback)(dbinfo.name, fileinfo.name, false); (*callback)(dbinfo.name, fileinfo.name, is_isl);
} }
} }
if (0 != os_file_closedir(dbdir)) { if (0 != os_file_closedir(dbdir)) {
fprintf(stderr, "InnoDB: Warning: could not" fprintf(stderr, "InnoDB: Warning: could not"
" close database directory %s\n", " close database directory %s\n",
dbpath); dbpath);
err = DB_ERROR; err = DB_ERROR;

View File

@ -196,5 +196,5 @@ xb_get_copy_action(const char *dflt = "Copying");
void mdl_lock_init(); void mdl_lock_init();
void mdl_lock_table(ulint space_id); void mdl_lock_table(ulint space_id);
void mdl_unlock_all(); void mdl_unlock_all();
bool ends_with(const char *str, const char *suffix);
#endif /* XB_XTRABACKUP_H */ #endif /* XB_XTRABACKUP_H */

View File

@ -0,0 +1,7 @@
[crypt]
innodb_encrypt_log=ON
innodb_encryption_rotate_key_age=1
plugin_load_add=$DEBUG_KEY_MANAGEMENT_SO
[clear]
skip_innodb_encrypt_log

View File

@ -0,0 +1,4 @@
# The goal of including this file is to enable innodb_encrypt_log combinations
# (see include/innodb_encrypt_log.combinations)
--source include/have_innodb.inc

View File

@ -516,7 +516,7 @@ E5ABBA
drop table t1; drop table t1;
select hex(convert(_big5 0xC84041 using ucs2)); select hex(convert(_big5 0xC84041 using ucs2));
hex(convert(_big5 0xC84041 using ucs2)) hex(convert(_big5 0xC84041 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2' Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2'
End of 4.1 tests End of 4.1 tests
@ -796,69 +796,69 @@ A2C1 Ⅸ
A2C2 A2C2
Warnings: Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -875,69 +875,69 @@ C7DA с
C7DB т C7DB т
Warnings: Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8'
DROP TABLE t1; DROP TABLE t1;
# #
# End of 5.5 tests # End of 5.5 tests

View File

@ -281,7 +281,7 @@ chr upper lower utf8 roundtrip issafe
95 95 95 E280A2 95 95 95 95 E280A2 95
96 96 96 E28093 96 96 96 96 E28093 96
97 97 97 E28094 97 97 97 97 E28094 97
98 98 98 NULL NULL Round trip unsafe 98 98 98 3F 3F Round trip unsafe
99 99 99 E284A2 99 99 99 99 E284A2 99
9A 9A 9A D199 9A 9A 9A 9A D199 9A
9B 9B 9B E280BA 9B 9B 9B 9B E280BA 9B

View File

@ -388,138 +388,138 @@ code a
81F0 Å 81F0 Å
Warnings: Warnings:
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a code a
Warnings: Warnings:
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8'
# #
# WL#3090 Japanese Character Set adjustments # WL#3090 Japanese Character Set adjustments
# Test cp932->Unicode conversion # Test cp932->Unicode conversion

View File

@ -9991,12 +9991,12 @@ a hex(b) c
DROP TABLE t1; DROP TABLE t1;
select hex(convert(_eucjpms 0xA5FE41 using ucs2)); select hex(convert(_eucjpms 0xA5FE41 using ucs2));
hex(convert(_eucjpms 0xA5FE41 using ucs2)) hex(convert(_eucjpms 0xA5FE41 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2' Warning 1977 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2'
select hex(convert(_eucjpms 0x8FABF841 using ucs2)); select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2)) hex(convert(_eucjpms 0x8FABF841 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2' Warning 1977 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2'
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8); set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
@ -10566,69 +10566,69 @@ code a
8FAABC Ģ 8FAABC Ģ
Warnings: Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -10637,69 +10637,69 @@ code a
8FABB9 ǵ 8FABB9 ǵ
Warnings: Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
# #
# WL#3090 Japanese Character Set adjustments # WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion # Test sjis->Unicode conversion

View File

@ -24714,69 +24714,69 @@ code a
A1CA Å A1CA Å
Warnings: Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -24810,69 +24810,69 @@ A8E6 ⓩ
A9A2 đ A9A2 đ
Warnings: Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8'
DROP TABLE t1; DROP TABLE t1;
# #
# End of 5.5 tests # End of 5.5 tests

View File

@ -742,69 +742,69 @@ A2FB Ⅺ
A2FC Ⅻ A2FC Ⅻ
Warnings: Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -837,69 +837,69 @@ A8B9 ü
A8BA ê A8BA ê
Warnings: Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8'
DROP TABLE t1; DROP TABLE t1;
# #
# End of 5.5 tests # End of 5.5 tests

View File

@ -463,7 +463,7 @@ A3A0
DROP TABLE t1; DROP TABLE t1;
select hex(convert(_gbk 0xA14041 using ucs2)); select hex(convert(_gbk 0xA14041 using ucs2));
hex(convert(_gbk 0xA14041 using ucs2)) hex(convert(_gbk 0xA14041 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'ucs2' Warning 1977 Cannot convert 'gbk' character 0xA140 to 'ucs2'
create table t1 (c1 text not null, c2 text not null) character set gbk; create table t1 (c1 text not null, c2 text not null) character set gbk;
@ -774,69 +774,69 @@ A2FB Ⅺ
A2FC Ⅻ A2FC Ⅻ
Warnings: Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -871,69 +871,69 @@ A8BD ń
A8BE ň A8BE ň
Warnings: Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8'
DROP TABLE t1; DROP TABLE t1;
# #
# End of 5.5 tests # End of 5.5 tests

View File

@ -663,138 +663,138 @@ code a
81F0 Å 81F0 Å
Warnings: Warnings:
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a code a
Warnings: Warnings:
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8'
# #
# WL#3090 Japanese Character Set adjustments # WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion # Test sjis->Unicode conversion

View File

@ -2481,12 +2481,12 @@ a hex(b) c
DROP TABLE t1; DROP TABLE t1;
select hex(convert(_ujis 0xA5FE41 using ucs2)); select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2)) hex(convert(_ujis 0xA5FE41 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA5FE to 'ucs2' Warning 1977 Cannot convert 'ujis' character 0xA5FE to 'ucs2'
select hex(convert(_ujis 0x8FABF841 using ucs2)); select hex(convert(_ujis 0x8FABF841 using ucs2));
hex(convert(_ujis 0x8FABF841 using ucs2)) hex(convert(_ujis 0x8FABF841 using ucs2))
NULL 003F0041
Warnings: Warnings:
Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2' Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2'
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
@ -3060,69 +3060,69 @@ code a
8FAABC Ģ 8FAABC Ģ
Warnings: Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8'
SELECT * FROM t1 SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@ -3131,69 +3131,69 @@ code a
8FABB9 ǵ 8FABB9 ǵ
Warnings: Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8'
# #
# WL#3090 Japanese Character Set adjustments # WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion # Test sjis->Unicode conversion

View File

@ -1666,7 +1666,7 @@ CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061))
1 1
select hex(lower(cast(0xffff0000 as char character set utf32))) as c; select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
c c
NULL 0000003F0000003F0000003F0000003F
Warnings: Warnings:
Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00' Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00'
# #

View File

@ -1925,7 +1925,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF8F' Warning 1300 Invalid utf8 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8); select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8) convert(char(0xff,0x8f) using utf8)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8 character string: '\xFF\x8F' Warning 1300 Invalid utf8 character string: '\xFF\x8F'
set sql_mode=traditional; set sql_mode=traditional;
@ -1951,7 +1951,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FD' Warning 1300 Invalid utf8 character string: 'FD'
select convert(char(0xff,0x8f) using utf8); select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8) convert(char(0xff,0x8f) using utf8)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8 character string: '\xFF\x8F' Warning 1300 Invalid utf8 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8)); select hex(convert(char(2557 using latin1) using utf8));
@ -2120,7 +2120,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF' Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8)); select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8)) hex(convert(0xFF using utf8))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8 character string: '\xFF' Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF); select hex(_utf8 0x616263FF);
@ -2139,7 +2139,7 @@ Warnings:
Warning 1300 Invalid utf8 character string: 'FF' Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8)); select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8)) hex(convert(0xFF using utf8))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8 character string: '\xFF' Warning 1300 Invalid utf8 character string: '\xFF'
select hex(_utf8 0x616263FF); select hex(_utf8 0x616263FF);
@ -10479,6 +10479,31 @@ END
DROP PROCEDURE p1; DROP PROCEDURE p1;
SET @@SQL_MODE=default; SET @@SQL_MODE=default;
# #
# MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
#
SET sql_mode='STRICT_TRANS_TABLES';
SELECT CONVERT(_utf8 0xC499 USING latin1);
CONVERT(_utf8 0xC499 USING latin1)
?
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1)
?
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
SET sql_mode=default;
SELECT CONVERT(_utf8 0xC499 USING latin1);
CONVERT(_utf8 0xC499 USING latin1)
?
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1)
?
Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC499 to 'latin1'
#
# End of 10.1 tests # End of 10.1 tests
# #
# #

View File

@ -1950,7 +1950,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F' Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional; set sql_mode=traditional;
@ -1976,7 +1976,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD' Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4)); select hex(convert(char(2557 using latin1) using utf8mb4));
@ -2145,7 +2145,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);
@ -2164,7 +2164,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);

View File

@ -1782,7 +1782,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F' Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional; set sql_mode=traditional;
@ -1808,7 +1808,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD' Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4)); select hex(convert(char(2557 using latin1) using utf8mb4));
@ -1977,7 +1977,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);
@ -1996,7 +1996,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);

View File

@ -1908,7 +1908,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F' Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional; set sql_mode=traditional;
@ -1934,7 +1934,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD' Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4)); select hex(convert(char(2557 using latin1) using utf8mb4));
@ -2103,7 +2103,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);
@ -2122,7 +2122,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);

View File

@ -1915,7 +1915,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F' Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional; set sql_mode=traditional;
@ -1941,7 +1941,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FD' Warning 1300 Invalid utf8mb4 character string: 'FD'
select convert(char(0xff,0x8f) using utf8mb4); select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4) convert(char(0xff,0x8f) using utf8mb4)
NULL ??
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
select hex(convert(char(2557 using latin1) using utf8mb4)); select hex(convert(char(2557 using latin1) using utf8mb4));
@ -2110,7 +2110,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);
@ -2129,7 +2129,7 @@ Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF' Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4)); select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4)) hex(convert(0xFF using utf8mb4))
NULL 3F
Warnings: Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF' Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF); select hex(_utf8mb4 0x616263FF);

View File

@ -0,0 +1,200 @@
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
connection node_1a;
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE c SET f2=1 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
DELETE FROM p WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
2 0
SELECT * FROM c;
f1 p_id f2
DROP TABLE c;
DROP TABLE p;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
connection node_1a;
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE c SET f2=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
UPDATE p set f1=11 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
2 0
11 0
SELECT * FROM c;
f1 p_id f2
1 11 0
DROP TABLE c;
DROP TABLE p;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
connection node_1a;
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE c SET p_id=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
UPDATE p set f1=11 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
2 0
11 0
SELECT * FROM c;
f1 p_id f2
1 11 0
connection node_1a;
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p set f1=21 WHERE f1 = 11;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
UPDATE c SET p_id=2 where f1=1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT * FROM p;
f1 f2
2 0
11 0
SELECT * FROM c;
f1 p_id f2
1 2 0
DROP TABLE c;
DROP TABLE p;
connection node_1;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
INSERT INTO c VALUES (1, 1, 1, 0);
connection node_1a;
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p2 SET f2=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
DELETE FROM p1 WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
connection node_2;
SELECT * FROM p1;
f1 f2
SELECT * FROM p2;
f1 f2
1 2
SELECT * FROM c;
f1 p1_id p2_id f2
DROP TABLE c,p1,p2;

View File

@ -0,0 +1,180 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source suite/galera/include/galera_have_debug_sync.inc
#
# we must open connection node_1a here, MW-369.inc will use it later
#
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
#
# cascading delete operation is replicated from node2
# and this conflicts with an update for child table in node1
#
# As a result, the update should fail for certification error
#
--connection node_1
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
--let $mw_369_parent_query = UPDATE c SET f2=1 where f1=1
--let $mw_369_child_query = DELETE FROM p WHERE f1 = 1
--connection node_1a
--source MW-369.inc
# Commit fails
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
--connection node_2
SELECT * FROM p;
SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
#
# cascading update operation is replicated from node2
# and this conflicts with an update for child table in node1
#
# As a result, the update should fail for certification error
#
--connection node_1
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
--let $mw_369_parent_query = UPDATE c SET f2=2 where f1=1
--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1
--connection node_1a
--source MW-369.inc
# Commit fails
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
--connection node_2
SELECT * FROM p;
SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
#
# ON UPDATE CASCADE tests
# Here we update primary key of parent table to cause cascaded update
# on child table
#
# cascading update operation is replicated from node2
# and this conflicts with an update for child table in node1
#
# As a result, the update should fail for certification error
#
--connection node_1
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE);
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
--let $mw_369_parent_query = UPDATE c SET p_id=2 where f1=1
--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1
--connection node_1a
--source MW-369.inc
# Commit fails
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
# same as previous, but statements in different order
--connection node_2
SELECT * FROM p;
SELECT * FROM c;
--let $mw_369_parent_query = UPDATE p set f1=21 WHERE f1 = 11
--let $mw_369_child_query = UPDATE c SET p_id=2 where f1=1
--connection node_1a
--source MW-369.inc
# Commit fails
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
--connection node_2
SELECT * FROM p;
SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
#
# CASCADE DELETE tests with two parent tables
# Here we cause cascaded operation on child table through
# one parent table and have other operation on the other
# parent table
#
# cascading update operation is replicated from node2
# but this does not conflict with an update for the other parent table in node1
#
# As a result, the update on p2 should succeed
#
--connection node_1
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
INSERT INTO c VALUES (1, 1, 1, 0);
--let $mw_369_parent_query = UPDATE p2 SET f2=2 where f1=1
--let $mw_369_child_query = DELETE FROM p1 WHERE f1 = 1
--connection node_1a
--source MW-369.inc
# Commit succeeds
--connection node_1
--reap
# same as previous, but statements in different order
--connection node_2
SELECT * FROM p1;
SELECT * FROM p2;
SELECT * FROM c;
DROP TABLE c,p1,p2;

View File

@ -0,0 +1,265 @@
# skip sort for prefix change
# pk(o1(2)) to pk(o1(3))
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(3)), lock=none;
drop table t1;
# pk(o1(2)) to pk(o1)
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;
# pk(o1(2)) to pk(o1(3),n1)
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), n1), lock=none;
drop table t1;
# pk(o1(2)) to pk(o1,n1)
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1, n1), lock=none;
drop table t1;
# pk(o1(2)) to pk(o1(3), o2)
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), o2), lock=none;
drop table t1;
# pk(o1(2)) to pk(o1, o2)
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1, o2), lock=none;
drop table t1;
# pk(o1(3)) to pk(o1(2))
create table t1(o1 varchar(10), primary key(o1(3))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
# pk(o1) to pk(o1(2))
create table t1(o1 varchar(10), primary key(o1)) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
# pk(o1(3),o2) to pk(o1(2))
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1(2))
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
# pk(o1(3),o2) to pk(o1(2),n1)
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1(2),n1)
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
# pk(o1(3),o2) to pk(o1(3),n1)
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3),n1), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1,n1)
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
# pk(o1,o2(3)) to pk(o1,o2(2))
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(3))) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1,o2(2))
create table t1(o1 int, o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
# pk(o1,o2(2)) to pk(o1,o2(3))
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2(3)), lock=none;
drop table t1;
# pk(o1,o2(2)) to pk(o1,o2)
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
# pk(o1,o2(3),o3) to pk(o1,o2(2))
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(3),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o2(2))
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
# pk(o1(3),o2(3)) to pk(o1(3),o2(2))
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(2)), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1,o2(2))
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
# pk(o1(3),o2(2)) to pk(o1(3),o2(3))
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(3)), lock=none;
drop table t1;
# pk(o1,o2(2)) to pk(o1,o2)
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
# pk(o1(3),o2,o3(2)) to pk(o1(3),o2,o3(3))
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(3)), lock=none;
drop table t1;
# pk(o1,o2,o3(2)) to pk(o1,o2,o3)
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
# pk(o1(3),o2,o3(3)) to pk(o1(3),o2,o3(2))
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(2)), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o2,o3(2))
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3(2)), lock=none;
drop table t1;
# skip sort for adding existing columns/newly added columns, dropping pk columns at the end.
# pk(o1) to pk(o1,o2)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
# pk(o1) to pk(o1,n1)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
# pk(o1) to pk(n1,o1)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1), lock=none;
drop table t1;
# pk(o1) to pk(n1,o1,n2)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,o1,n2), lock=none;
drop table t1;
# pk(o1) to pk(n1,n2,o1)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,n2,o1), lock=none;
drop table t1;
# pk(o1) to pk(o1,n1,n2)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(o1,n1,n2), lock=none;
drop table t1;
# pk(o1) to pk(o1,o2,n1)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
# pk(o1) to pk(o1,n1,o2)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
# pk(o1) to pk(n1,o1,o2)
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1,o2), lock=none;
drop table t1;
# pk(o1) to pk(o1,o2,o3)
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
# pk(o1) to pk(o1,o3,o2)
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o3,o2), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o2)
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o2,o3,o4)
create table t1(o1 int, o2 int, o3 int, o4 int not null, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2,2),(2,2,1,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,o3,o4), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o2,n1)
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,n1,o2)
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1)
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;

View File

@ -34,9 +34,8 @@ CREATE UNIQUE INDEX ui ON bug13861218(c1);
SET DEBUG_DBUG = @saved_debug_dbug; SET DEBUG_DBUG = @saved_debug_dbug;
DROP TABLE bug13861218; DROP TABLE bug13861218;
# #
# Bug #21762319 ADDING INDEXES ON EMPTY TABLE IS SLOW # Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
# WITH LARGE INNODB_SORT_BUFFER_SIZE. #
call mtr.add_suppression("InnoDB: Cannot create temporary merge file");
create table t480(a serial)engine=innodb; create table t480(a serial)engine=innodb;
insert into t480 insert into t480
values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
@ -47,14 +46,252 @@ insert into t480 select 0 from t480;
insert into t480 select 0 from t480; insert into t480 select 0 from t480;
create table t1(f1 int auto_increment not null, create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null, f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1))engine=innodb; primary key(f1,f2,f3), key(f1))engine=innodb;
insert into t1 select NULL,'aaa','bbb','ccc' from t480; insert into t1 select NULL,'aaa','bbb' from t480;
insert into t1 select NULL,'aaaa','bbbb','cccc' from t480; insert into t1 select NULL,'aaaa','bbbb' from t480;
insert into t1 select NULL,'aaaaa','bbbbb','ccccc' from t480; insert into t1 select NULL,'aaaaa','bbbbb' from t480;
insert into t1 select NULL,'aaaaaa','bbbbbb','cccccc' from t480; insert into t1 select NULL,'aaaaaa','bbbbbb' from t480;
insert into t1 select NULL,'aaaaaaa','bbbbbbb','ccccccc' from t480; SET DEBUG_DBUG = '+d,row_merge_write_failure';
insert into t1 select NULL,'aaaaaaaa','bbbbbbbb','cccccccc' from t480; alter table t1 drop primary key,add primary key(f2,f1);
select count(*) from t1; ERROR HY000: Temporary file write failure
count(*) SET DEBUG_DBUG = @saved_debug_dbug;
2880 drop table t1;
drop table t1, t480; connect con1,localhost,root;
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
insert into t1 values(NULL,'a','b'), (NULL,'aa','bb');
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
optimize table t1;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
INSERT INTO t1 select NULL,'aaa','bbb' from t480;
SET DEBUG_SYNC= 'now SIGNAL flushed';
connection con1;
/*con1 reap*/ Optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
affected rows: 2
SELECT COUNT(k1),k2,k3 FROM t1 GROUP BY k2,k3;
COUNT(k1) k2 k3
1 a b
1 aa bb
480 aaa bbb
drop table t1;
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
ALTER TABLE t1 ADD COLUMN k4 int;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET debug = '+d,row_log_tmpfile_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t1 select NULL,'aaa','bbb' from t480;
INSERT INTO t1 select NULL,'aaaa','bbbb' from t480;
SET DEBUG_SYNC= 'now SIGNAL flushed';
SET DEBUG_DBUG = @saved_debug_dbug;
connection con1;
/*con1 reap*/ ALTER TABLE t1 ADD COLUMN k4 int;
ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
SELECT COUNT(k1),k2,k3 FROM t1 GROUP BY k2,k3;
COUNT(k1) k2 k3
480 aaa bbb
480 aaaa bbbb
disconnect con1;
connection default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`k1` int(11) NOT NULL AUTO_INCREMENT,
`k2` char(200) DEFAULT NULL,
`k3` char(200) DEFAULT NULL,
PRIMARY KEY (`k1`)
) ENGINE=InnoDB AUTO_INCREMENT=1023 DEFAULT CHARSET=latin1
drop table t1;
drop table t480;
SET DEBUG_SYNC='RESET';
#
# BUG#21612714 ALTER TABLE SORTING SKIPPED WHEN CHANGE PK AND DROP
# LAST COLUMN OF OLD PK
#
SET DEBUG_DBUG = '+d,innodb_alter_table_pk_assert_no_sort';
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1, n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1, o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(3))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1)) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(3))) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2(3)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(3),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,o1,n2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,n2,o1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(o1,n1,n2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o3,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, o4 int not null, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2,2),(2,2,1,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,o3,o4), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;
SET DEBUG_DBUG = @saved_debug_dbug;

View File

@ -0,0 +1,20 @@
--- innodb-index-online.result
+++ innodb-index-online,crypt.reject
@@ -301,7 +301,7 @@
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
-0 0 0 0
+0 0 0 1
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
connection con1;
ERROR HY000: Creating index 'c2e' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
@@ -423,7 +423,7 @@
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
sort_encrypted sort_decrypted log_encrypted log_decrypted
-0 0 0 0
+0 0 1 1
connection con1;
SELECT COUNT(c22f) FROM t1;
COUNT(c22f)

View File

@ -214,6 +214,17 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`c1`), PRIMARY KEY (`c1`),
KEY `c2d` (`c2`) KEY `c2d` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1
connection default;
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
connection con1;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done'; SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2e_created WAIT_FOR dml2_done';
SET lock_wait_timeout = 10; SET lock_wait_timeout = 10;
ALTER TABLE t1 DROP INDEX c2d, ADD INDEX c2e(c2), ALTER TABLE t1 DROP INDEX c2d, ADD INDEX c2e(c2),
@ -246,6 +257,22 @@ BEGIN;
UPDATE t1 SET c2 = c2 + 1; UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1; DELETE FROM t1;
ROLLBACK; ROLLBACK;
BEGIN;
DELETE FROM t1;
ROLLBACK;
UPDATE t1 SET c2 = c2 + 1;
BEGIN;
UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1;
ROLLBACK;
BEGIN;
DELETE FROM t1;
ROLLBACK;
UPDATE t1 SET c2 = c2 + 1;
BEGIN;
UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1;
ROLLBACK;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count name count
ddl_background_drop_indexes 0 ddl_background_drop_indexes 0
@ -253,12 +280,28 @@ ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = '?c2e'; ON si.index_id = sf.index_id WHERE si.name = '?c2e';
name pos name pos
c2 0 c2 0
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SELECT
(@merge_encrypt_1-@merge_encrypt_0)-
(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done'; SET DEBUG_SYNC = 'now SIGNAL dml2_done';
connection con1; connection con1;
ERROR HY000: Creating index 'c2e' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again ERROR HY000: Creating index 'c2e' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
@ -269,7 +312,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = 'c2e'; ON si.index_id = sf.index_id WHERE si.name = 'c2e';
@ -281,7 +324,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
connection default; connection default;
ALTER TABLE t1 COMMENT 'testing if c2e will be dropped'; ALTER TABLE t1 COMMENT 'testing if c2e will be dropped';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -291,7 +334,19 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
connection con1; connection con1;
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done'; SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done';
ALTER TABLE t1 ADD INDEX c2f(c2); ALTER TABLE t1 ADD INDEX c2f(c2);
@ -304,7 +359,15 @@ ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
DELETE FROM t1 WHERE c1 > 320;
ROLLBACK;
BEGIN;
UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1;
ROLLBACK;
BEGIN; BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160; INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
DELETE FROM t1 WHERE c1 > 320; DELETE FROM t1 WHERE c1 > 320;
@ -320,7 +383,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done'; SET DEBUG_SYNC = 'now SIGNAL dml3_done';
connection con1; connection con1;
Warnings: Warnings:
@ -333,7 +396,35 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
connection default;
SET @merge_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SELECT
(@merge_encrypt_2-@merge_encrypt_1)-
(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
(@rowlog_encrypt_2-@rowlog_encrypt_1)-
(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
sort_balance log_balance
0 0
SELECT
@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
sort_encrypted sort_decrypted log_encrypted log_decrypted
0 0 0 0
connection con1;
SELECT COUNT(c22f) FROM t1; SELECT COUNT(c22f) FROM t1;
COUNT(c22f) COUNT(c22f)
320 320
@ -369,7 +460,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
connection default; connection default;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count name count
@ -378,7 +469,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
connection con1; connection con1;
disconnect con1; disconnect con1;
connection default; connection default;
@ -400,7 +491,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = INPLACE; ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = INPLACE;
ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = COPY; ALTER TABLE t1 ADD INDEX c2h(c22f), ALGORITHM = COPY;
ERROR 42000: Duplicate key name 'c2h' ERROR 42000: Duplicate key name 'c2h'

View File

@ -1184,3 +1184,667 @@ t2c CREATE TABLE `t2c` (
KEY `t2a` (`a`) KEY `t2a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t2c,t2i; DROP TABLE t1,t2,t2c,t2i;
#
# Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
#
SET GLOBAL innodb_monitor_enable = module_ddl;
create table t1(f1 int not null, f2 blob)engine=innodb;
insert into t1 values(1, repeat('a',20000));
# Skip sort
# Reusing the same pk
alter table t1 force;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
drop table t1;
create table t1(f1 int not null, f2 int not null,
primary key(f1))engine=innodb;
insert into t1 values(1,2), (3,4);
# Add Secondary index.
# Skip temp file usage due to small table size
alter table t1 add key(f2);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
drop table t1;
create table t480(a serial)engine=innodb;
insert into t480
values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(),(),(),(),();
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1))engine=innodb;
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 select NULL,'aaaa','bbbb','cccc' from t480;
insert into t1 select NULL,'aaaaa','bbbbb','ccccc' from t480;
insert into t1 select NULL,'aaaaaa','bbbbbb','cccccc' from t480;
insert into t1 select NULL,'aaaaaaa','bbbbbbb','ccccccc' from t480;
insert into t1 select NULL,'aaaaaaaa','bbbbbbbb','cccccccc' from t480;
select count(*) from t1;
count(*)
2880
# Skip sort
# Change PK from (f1) to (f1,f2,f3,f4)
alter table t1 drop primary key, add primary key(f1,f2,f3,f4);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Change PK from (f1,f2,f3,f4) to (f1,f2,added_columns)
alter table t1 drop primary key,add column f5 int not null,
add column f6 int not null,add primary key(f1,f2,f5,f6);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Change PK from (f1,f2,f5,f6) to (f1,f2,f5)
alter table t1 drop column f6;
ERROR 42000: Key column 'f6' doesn't exist in table
alter table t1 drop column f6, drop primary key, add primary key(f1,f2,f5);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same PK
alter table t1 add column f6 int;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 drop column f6;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Must sort
# Change PK from (f1,f2,f5) to (f1,f5)
alter table t1 drop column f2;
ERROR 42000: Key column 'f2' doesn't exist in table
alter table t1 drop column f2, drop primary key, add primary key(f1,f5);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
ddl_sort_file_alter_table 2
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 add column f2n int after f1, drop primary key, add
primary key (f1,f5,f2n);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 change f5 f2n int not null,change f2n f5 int not null,
add column f8 int not null;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Change PK from (f1,f4,f2n) to (f1,f4,added_column,f2n)
alter table t1 add column f7 int, drop primary key,
add primary key (f1,f5,f7,f2n);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
ddl_sort_file_alter_table 2
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 force;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 row_format=compact;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Reusing the same pk
alter table t1 engine=innodb;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Optimize table
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
affected rows: 2
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Sort files used for adding secondary index
alter table t1 drop primary key, add primary key(f1,f5,f7), add index
i(f3);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# No sort files used for dropping secondary index
alter table t1 drop primary key, add primary key(f1,f5),drop index i;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Change PK(f1,f5) to (f1,added_columns) and drop f5
alter table t1 drop primary key, add primary key(f1,f12),
drop column f5, add column f12 int not null;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Must sort
# Change PK(f1,f12) to (f1,existing_columns)
alter table t1 drop primary key, add primary key(f1,f3);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
ddl_sort_file_alter_table 2
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort
# Change PK(f1,f3) to (f1,added_column,f3,added_column)
alter table t1 drop primary key, add column f3n int,
add column f4n int, add primary key(f1,f3n,f3,f4n);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Adding Secondary index alone.
alter table t1 add key(f1);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Must sort
# Change PK(f1,f3) to (existing_column,f1)
alter table t1 drop primary key, add primary key(f4,f1);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
ddl_sort_file_alter_table 3
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort for PK.
# Change PK(f4,f1) to (added_columns,f4,f1)
# Secondary index rebuild happens
alter table t1 drop primary key, add column f5n int,
add column f6n int, add primary key(f5n,f6n,f4,f1);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
# Skip sort for PK.
# Change PK(f5n,f6n,f4,f1) to
# (added_columns,f5n,added_column,f6n,f4,f1)
# Secondary index rebuild happens
alter table t1 drop primary key, add column f7n int,
add column f8n int, add primary key(f7n,f5n,f8n,f6n,f4,f1);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
name count_reset
SET GLOBAL innodb_monitor_reset = module_ddl;
SET GLOBAL innodb_monitor_disable = module_ddl;
select count(*) from t1;
count(*)
2880
drop table t1;
SET GLOBAL innodb_monitor_reset = default;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
# Bug#19163915 INNODB: DUPLICATE RECORDS COULD EXIST
# WHEN SKIPPING SORT FOR CLUSTER INDEX
SELECT @@innodb_sort_buffer_size;
@@innodb_sort_buffer_size
1048576
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1,f2,f3,f4));
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 values(106, 'aaa','bbb','cccc');
select count(*) from t1;
count(*)
481
# Skip sort
# Change PK from (f1,f2,f3,f4) to (f1,f2,f3)
alter table t1 drop primary key, add primary key(f1,f2,f3);
ERROR 23000: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '106-aaa-bbb' for key 'PRIMARY'
select count(*) from t1;
count(*)
481
drop table t1;
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1,f2,f3,f4));
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 values(108,'aaa','bbb','cccc');
select count(*) from t1;
count(*)
481
alter table t1 drop primary key, add primary key(f1,f2,f3);
ERROR 23000: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '108-aaa-bbb' for key 'PRIMARY'
select count(*) from t1;
count(*)
481
drop table t1, t480;
#
# Bug #19896922 SORTING SKIPPED WHEN PREFIX LENGTH OF THE PK
# FIELD IS CHANGED
#
create table t1(a int not null, b varchar(30) not null,
primary key (b(10), a)) engine = innodb;
insert into t1 values(0,'khdHps6UxW8Lwaoxa604oK6zkb'),(1,'khdHps6UxW8L');
select * from t1;
a b
0 khdHps6UxW8Lwaoxa604oK6zkb
1 khdHps6UxW8L
alter table t1 drop primary key, add primary key (b(18),a);
select * from t1;
a b
1 khdHps6UxW8L
0 khdHps6UxW8Lwaoxa604oK6zkb
drop table t1;
create table t1(a int not null, b varchar(30) not null,
primary key (b(10), a)) engine = innodb;
insert into t1 values(0,'khdHps6UxW8Lwaoxa604oK6zkb'),(1,'khdHps6UtW8L');
select * from t1;
a b
1 khdHps6UtW8L
0 khdHps6UxW8Lwaoxa604oK6zkb
alter table t1 drop primary key, add primary key (b(8),a);
select * from t1;
a b
0 khdHps6UxW8Lwaoxa604oK6zkb
1 khdHps6UtW8L
drop table t1;
#
# Bug #21103101 SORTING SKIPPED WHEN DROPPING THE SINGLE
# COLUMN PRIMARY KEY
#
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
alter table t1 drop column f1;
ERROR 42000: Key column 'f1' doesn't exist in table
alter table t1 drop column f1, drop primary key;
ERROR 42000: Key column 'f1' doesn't exist in table
alter table t1 drop column f1, drop key f1;
drop table t1;
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
alter table t1 drop primary key, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: Dropping a primary key is not allowed without also adding a new primary key. Try LOCK=SHARED
drop table t1;
#
# BUG#21612714 ALTER TABLE SORTING SKIPPED WHEN CHANGE PK AND DROP
# LAST COLUMN OF OLD PK
#
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), drop o2, lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop o1, drop o2, add primary key(o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 add column n1 int not null, drop primary key, add primary key(n1,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add column n1 int not null, drop primary key, add primary key(o3,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2, o1), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o2,o1)) engine = innodb;
insert into t1 values(1,1,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o3,o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop o1, lock=none;
ERROR 42000: Key column 'o1' doesn't exist in table
alter table t1 drop o1, drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop o2, lock=none;
ERROR 42000: Key column 'o2' doesn't exist in table
alter table t1 drop o2, drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop o1, drop o2, lock=none;
ERROR 42000: Key column 'o2' doesn't exist in table
alter table t1 drop o1, drop o2,drop primary key,add primary key(o3),lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1(3), o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1, o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1(3), o3), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1, o3), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abc', 2, 1), ('abd', 1, 2);
alter table t1 drop primary key, add primary key(o1(2), o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1, o2)) engine = innodb;
insert into t1 values('abc', 2, 1), ('abd', 1, 2);
alter table t1 drop primary key, add primary key(o1(2), o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abc', 2, 2), ('abd', 1, 1);
alter table t1 drop primary key, add primary key(o1(2), o3), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1, o2)) engine = innodb;
insert into t1 values('abc', 2, 2), ('abd', 1, 1);
alter table t1 drop primary key, add primary key(o1(2), o3), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(2),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (1, 'abc', 2);
alter table t1 drop primary key, add primary key(o1,o2(3)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(2),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (1, 'abc', 2);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abc', 'acd'), ('abd', 'abd');
alter table t1 drop primary key, add primary key(o1(2),o2(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abc', 'acd'), ('abd', 'abd');
alter table t1 drop primary key, add primary key(o1(2),o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o2(3),o1(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o2,o1), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(2))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 add n1 int not null, drop primary key, add primary key(o1, n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3), o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int not null, primary key(o1(2))) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1, o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1(3))) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), primary key(o1)) engine = innodb;
insert into t1 values('abd'), ('acd');
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 drop primary key, add primary key(o1(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(2),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1(3),n1), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, primary key(o1, o2)) engine = innodb;
insert into t1 values('abd', 1), ('acd', 2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(3))) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values(1,'abd'), (2,'acd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2(3)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values(1, 'abd'), (2, 'acd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(3),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (2, 'acd', 2);
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2(2))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(3)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(2))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1(3),o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1(3),o2,o3(2)), lock=none;
drop table t1;
create table t1(o1 varchar(10), o2 int, o3 varchar(10), primary key(o1,o2,o3(3))) engine = innodb;
insert into t1 values('abd', 1, 'acd'), ('acd', 2, 'abd');
alter table t1 drop primary key, add primary key(o1,o2,o3(2)), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,o1,n2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(n1,n2,o1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, add n2 int not null, drop primary key, add primary key(o1,n1,n2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1),(2,2);
alter table t1 add n1 int not null, drop primary key, add primary key(n1,o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2,o3), lock=none;
drop table t1;
create table t1(o1 int, o2 int not null, o3 int not null, primary key(o1)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o3,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, o4 int not null, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2,2),(2,2,1,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,o3,o4), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,o2,n1), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add n1 int not null, drop primary key, add primary key(o1,n1,o2), lock=none;
drop table t1;
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 drop primary key, add primary key(o1), lock=none;
drop table t1;

View File

@ -0,0 +1,20 @@
--- innodb-table-online.result
+++ innodb-table-online,crypt.reject
@@ -291,7 +291,7 @@
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
-0 0 0 0
+0 0 0 1
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
# session con1
connection con1;
@@ -393,7 +393,7 @@
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
sort_encrypted sort_decrypted log_encrypted log_decrypted
-0 0 0 0
+1 1 1 1
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
ERROR 23000: Duplicate entry '' for key 'PRIMARY'
UPDATE t1 SET c3 = NULL WHERE c3 = '';

View File

@ -3,7 +3,7 @@ call mtr.add_suppression("InnoDB: Error: table 'test/t1'");
call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for"); call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for");
SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table = on; SET GLOBAL innodb_file_per_table = on;
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 TEXT NOT NULL) CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL)
ENGINE = InnoDB; ENGINE = InnoDB;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,''); INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
SET GLOBAL innodb_monitor_enable = module_ddl; SET GLOBAL innodb_monitor_enable = module_ddl;
@ -62,7 +62,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
BEGIN; BEGIN;
@ -95,7 +95,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`), UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`) UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@ -106,7 +106,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`), UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`) UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@ -138,7 +138,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
UNIQUE KEY `c2` (`c2`), UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`) UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
@ -204,10 +204,19 @@ INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 80 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where
ANALYZE TABLE t1; ANALYZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
# session con1 # session con1
connection con1; connection con1;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
@ -215,7 +224,7 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c2` int(11) NOT NULL, `c2` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done';
@ -234,7 +243,7 @@ ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
BEGIN; BEGIN;
DELETE FROM t1; DELETE FROM t1;
ROLLBACK; ROLLBACK;
@ -266,7 +275,23 @@ ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SELECT
(@merge_encrypt_1-@merge_encrypt_0)-
(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done'; SET DEBUG_SYNC = 'now SIGNAL dml2_done';
# session con1 # session con1
connection con1; connection con1;
@ -278,15 +303,27 @@ ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done';
ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 42000: Multiple primary key defined ERROR 42000: Multiple primary key defined
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 23000: Duplicate entry '5' for key 'PRIMARY' ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)), ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 TEXT NULL, CHANGE c1 c1 INT AFTER c22f, CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online'; ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
# session default # session default
connection default; connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3'; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
@ -296,8 +333,8 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 0 ddl_log_file_alter_table 1
BEGIN; BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240; INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240;
DELETE FROM t1 WHERE c1 > 320; DELETE FROM t1 WHERE c1 > 320;
@ -312,8 +349,8 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done'; SET DEBUG_SYNC = 'now SIGNAL dml3_done';
# session con1 # session con1
connection con1; connection con1;
@ -323,14 +360,40 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
SELECT COUNT(c22f) FROM t1; SELECT COUNT(c22f) FROM t1;
COUNT(c22f) COUNT(c22f)
320 320
CHECK TABLE t1; CHECK TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
SET @merge_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SELECT
(@merge_encrypt_2-@merge_encrypt_1)-
(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
(@rowlog_encrypt_2-@rowlog_encrypt_1)-
(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
sort_balance log_balance
0 0
SELECT
@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
sort_encrypted sort_decrypted log_encrypted log_decrypted
0 0 0 0
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)); ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
ERROR 23000: Duplicate entry '' for key 'PRIMARY' ERROR 23000: Duplicate entry '' for key 'PRIMARY'
UPDATE t1 SET c3 = NULL WHERE c3 = ''; UPDATE t1 SET c3 = NULL WHERE c3 = '';
@ -342,13 +405,13 @@ SET @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)), ALTER TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)),
ALGORITHM = INPLACE; ALGORITHM = INPLACE;
ERROR 22004: Invalid use of NULL value ERROR 22004: Invalid use of NULL value
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
ERROR 22004: Invalid use of NULL value ERROR 22004: Invalid use of NULL value
SET @@sql_mode = @old_sql_mode; SET @@sql_mode = @old_sql_mode;
UPDATE t1 SET c3=CONCAT(c1,REPEAT('foo',c1)) WHERE c3 IS NULL; UPDATE t1 SET c3=LEFT(CONCAT(c1,REPEAT('foo',c1)),255) WHERE c3 IS NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0';
SET @@sql_mode = 'STRICT_TRANS_TABLES'; SET @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL, DROP COLUMN c22f, ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)), DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST; ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
# session default # session default
@ -367,7 +430,7 @@ connection default;
ROLLBACK; ROLLBACK;
# session con1 # session con1
connection con1; connection con1;
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f, ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
ADD COLUMN c6 VARCHAR(1000) DEFAULT ADD COLUMN c6 VARCHAR(1000) DEFAULT
@ -390,8 +453,8 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 4 ddl_sort_file_alter_table 6
ddl_log_file_alter_table 0 ddl_log_file_alter_table 2
# session default # session default
connection default; connection default;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
@ -401,15 +464,15 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SELECT * FROM t1 LIMIT 10; SELECT * FROM t1 LIMIT 10;
c22f c1 c3 c4 c22f c1 c3 c4
5 1 1foo Online 5 1 1foo Online
6 2 2foofoo Online
7 3 3foofoofoo Online
8 4 4foofoofoofoo Online
9 5 5foofoofoofoofoo Online
5 6 6foofoofoofoofoofoo Online 5 6 6foofoofoofoofoofoo Online
6 7 7foofoofoofoofoofoofoo Online 5 11 11foofoofoofoofoofoofoofoofoofoofoo Online
7 8 8foofoofoofoofoofoofoofoo Online 5 16 16foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
8 9 9foofoofoofoofoofoofoofoofoo Online 5 21 21foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
9 10 10foofoofoofoofoofoofoofoofoofoo Online 5 26 26foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 31 31foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
# session con1 # session con1
connection con1; connection con1;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
@ -422,9 +485,9 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`c22f` int(11) NOT NULL, `c22f` int(11) NOT NULL,
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c3` text NOT NULL, `c3` char(255) NOT NULL,
`c4` varchar(6) NOT NULL DEFAULT 'Online', `c4` varchar(6) NOT NULL DEFAULT 'Online',
PRIMARY KEY (`c1`,`c22f`,`c4`(5)) PRIMARY KEY (`c22f`,`c1`,`c4`(5))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl; SET GLOBAL innodb_monitor_disable = module_ddl;

View File

@ -1,5 +1,7 @@
-- source include/have_debug.inc -- source include/have_debug.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/count_sessions.inc
-- source include/have_debug_sync.inc
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
@ -42,13 +44,10 @@ SET DEBUG_DBUG = @saved_debug_dbug;
DROP TABLE bug13861218; DROP TABLE bug13861218;
--echo # --echo #
--echo # Bug #21762319 ADDING INDEXES ON EMPTY TABLE IS SLOW --echo # Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
--echo # WITH LARGE INNODB_SORT_BUFFER_SIZE. --echo #
call mtr.add_suppression("InnoDB: Cannot create temporary merge file");
# Table with large data which is greater than sort buffer
# Error during file creation in alter operation
create table t480(a serial)engine=innodb; create table t480(a serial)engine=innodb;
insert into t480 insert into t480
values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
@ -57,14 +56,74 @@ insert into t480 select 0 from t480;
insert into t480 select 0 from t480; insert into t480 select 0 from t480;
insert into t480 select 0 from t480; insert into t480 select 0 from t480;
insert into t480 select 0 from t480; insert into t480 select 0 from t480;
# Error during file write in alter operation.
create table t1(f1 int auto_increment not null, create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null, f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1))engine=innodb; primary key(f1,f2,f3), key(f1))engine=innodb;
insert into t1 select NULL,'aaa','bbb','ccc' from t480; insert into t1 select NULL,'aaa','bbb' from t480;
insert into t1 select NULL,'aaaa','bbbb','cccc' from t480; insert into t1 select NULL,'aaaa','bbbb' from t480;
insert into t1 select NULL,'aaaaa','bbbbb','ccccc' from t480; insert into t1 select NULL,'aaaaa','bbbbb' from t480;
insert into t1 select NULL,'aaaaaa','bbbbbb','cccccc' from t480; insert into t1 select NULL,'aaaaaa','bbbbbb' from t480;
insert into t1 select NULL,'aaaaaaa','bbbbbbb','ccccccc' from t480; SET DEBUG_DBUG = '+d,row_merge_write_failure';
insert into t1 select NULL,'aaaaaaaa','bbbbbbbb','cccccccc' from t480; --error ER_TEMP_FILE_WRITE_FAILURE
select count(*) from t1; alter table t1 drop primary key,add primary key(f2,f1);
drop table t1, t480; SET DEBUG_DBUG = @saved_debug_dbug;
drop table t1;
# Optimize table via inplace algorithm
connect (con1,localhost,root);
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
insert into t1 values(NULL,'a','b'), (NULL,'aa','bb');
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
send optimize table t1;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
INSERT INTO t1 select NULL,'aaa','bbb' from t480;
SET DEBUG_SYNC= 'now SIGNAL flushed';
connection con1;
--enable_info
--echo /*con1 reap*/ Optimize table t1;
reap;
--disable_info
SELECT COUNT(k1),k2,k3 FROM t1 GROUP BY k2,k3;
drop table t1;
# Log file creation failure.
create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
send ALTER TABLE t1 ADD COLUMN k4 int;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET debug = '+d,row_log_tmpfile_fail';
INSERT INTO t1 select NULL,'aaa','bbb' from t480;
INSERT INTO t1 select NULL,'aaaa','bbbb' from t480;
SET DEBUG_SYNC= 'now SIGNAL flushed';
SET DEBUG_DBUG = @saved_debug_dbug;
connection con1;
--echo /*con1 reap*/ ALTER TABLE t1 ADD COLUMN k4 int;
--error ER_OUT_OF_RESOURCES
reap;
SELECT COUNT(k1),k2,k3 FROM t1 GROUP BY k2,k3;
disconnect con1;
connection default;
show create table t1;
drop table t1;
drop table t480;
SET DEBUG_SYNC='RESET';
--source include/wait_until_count_sessions.inc
--echo #
--echo # BUG#21612714 ALTER TABLE SORTING SKIPPED WHEN CHANGE PK AND DROP
--echo # LAST COLUMN OF OLD PK
--echo #
SET DEBUG_DBUG = '+d,innodb_alter_table_pk_assert_no_sort';
--source suite/innodb/include/alter_table_pk_no_sort.inc
SET DEBUG_DBUG = @saved_debug_dbug;

View File

@ -1,5 +1,5 @@
--loose-innodb-sort-buffer-size=64k --loose-innodb-sort-buffer-size=64k
--loose-innodb-online-alter-log-max-size=64k --loose-innodb-online-alter-log-max-size=128k
--loose-innodb-buffer-pool-size=5M --loose-innodb-buffer-pool-size=5M
--loose-innodb-log-buffer-size=256k --loose-innodb-log-buffer-size=256k
--loose-innodb-sys-indexes --loose-innodb-sys-indexes

View File

@ -1,4 +1,5 @@
--source include/innodb_page_size_small.inc --source include/innodb_page_size_small.inc
--source include/innodb_encrypt_log.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
let $innodb_metrics_select= let $innodb_metrics_select=
@ -200,6 +201,18 @@ EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
connection default;
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
connection con1;
# Exceed the configured innodb_online_alter_log_max_size. # Exceed the configured innodb_online_alter_log_max_size.
# The actual limit is a multiple of innodb_sort_buf_size, # The actual limit is a multiple of innodb_sort_buf_size,
# because that is the size of the in-memory log buffers. # because that is the size of the in-memory log buffers.
@ -223,7 +236,7 @@ SET DEBUG_SYNC = 'now WAIT_FOR c2e_created';
# At this point, the clustered index scan must have completed, # At this point, the clustered index scan must have completed,
# but the modification log keeps accumulating due to the DEBUG_SYNC. # but the modification log keeps accumulating due to the DEBUG_SYNC.
eval $innodb_metrics_select; eval $innodb_metrics_select;
let $c= 2; let $c= 4;
while ($c) while ($c)
{ {
BEGIN; BEGIN;
@ -243,6 +256,22 @@ SELECT sf.name, sf.pos FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES si
INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS sf
ON si.index_id = sf.index_id WHERE si.name = '?c2e'; ON si.index_id = sf.index_id WHERE si.name = '?c2e';
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SELECT
(@merge_encrypt_1-@merge_encrypt_0)-
(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
# Release con1. # Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done'; SET DEBUG_SYNC = 'now SIGNAL dml2_done';
@ -270,6 +299,19 @@ ALTER TABLE t1 COMMENT 'testing if c2e will be dropped';
# Check that the 'zombie' index c2e was dropped. # Check that the 'zombie' index c2e was dropped.
eval $innodb_metrics_select; eval $innodb_metrics_select;
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
connection con1; connection con1;
# Accumulate and apply some modification log. # Accumulate and apply some modification log.
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done'; SET DEBUG_SYNC = 'row_log_apply_before SIGNAL c2f_created WAIT_FOR dml3_done';
@ -282,6 +324,9 @@ connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c2f_created'; SET DEBUG_SYNC = 'now WAIT_FOR c2f_created';
# Generate some log (delete-mark, delete-unmark, insert etc.) # Generate some log (delete-mark, delete-unmark, insert etc.)
eval $innodb_metrics_select; eval $innodb_metrics_select;
let $c= 2;
while ($c)
{
BEGIN; BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160; INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 160;
DELETE FROM t1 WHERE c1 > 320; DELETE FROM t1 WHERE c1 > 320;
@ -290,6 +335,8 @@ BEGIN;
UPDATE t1 SET c2 = c2 + 1; UPDATE t1 SET c2 = c2 + 1;
DELETE FROM t1; DELETE FROM t1;
ROLLBACK; ROLLBACK;
dec $c;
}
eval $innodb_metrics_select; eval $innodb_metrics_select;
# Release con1. # Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml3_done'; SET DEBUG_SYNC = 'now SIGNAL dml3_done';
@ -300,6 +347,34 @@ reap;
ALTER TABLE t1 CHANGE c2 c22f INT; ALTER TABLE t1 CHANGE c2 c22f INT;
eval $innodb_metrics_select; eval $innodb_metrics_select;
connection default;
SET @merge_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SELECT
(@merge_encrypt_2-@merge_encrypt_1)-
(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
(@rowlog_encrypt_2-@rowlog_encrypt_1)-
(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
SELECT
@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
connection con1;
SELECT COUNT(c22f) FROM t1; SELECT COUNT(c22f) FROM t1;
CHECK TABLE t1; CHECK TABLE t1;

View File

@ -546,3 +546,533 @@ show create table t2c;
--disable_info --disable_info
DROP TABLE t1,t2,t2c,t2i; DROP TABLE t1,t2,t2c,t2i;
--echo #
--echo # Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
--echo #
SET GLOBAL innodb_monitor_enable = module_ddl;
let $innodb_metrics_select=
SELECT name, count_reset FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE
subsystem = 'ddl' and count_reset > 0;
# Table with Blob data.
create table t1(f1 int not null, f2 blob)engine=innodb;
insert into t1 values(1, repeat('a',20000));
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 force;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
drop table t1;
# Table with small data.
create table t1(f1 int not null, f2 int not null,
primary key(f1))engine=innodb;
insert into t1 values(1,2), (3,4);
--echo # Add Secondary index.
--echo # Skip temp file usage due to small table size
--enable_info
alter table t1 add key(f2);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
drop table t1;
# Table with large data which is greater than sort buffer
create table t480(a serial)engine=innodb;
insert into t480
values(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(),(),(),(),();
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
insert into t480 select 0 from t480;
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1))engine=innodb;
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 select NULL,'aaaa','bbbb','cccc' from t480;
insert into t1 select NULL,'aaaaa','bbbbb','ccccc' from t480;
insert into t1 select NULL,'aaaaaa','bbbbbb','cccccc' from t480;
insert into t1 select NULL,'aaaaaaa','bbbbbbb','ccccccc' from t480;
insert into t1 select NULL,'aaaaaaaa','bbbbbbbb','cccccccc' from t480;
select count(*) from t1;
--echo # Skip sort
--echo # Change PK from (f1) to (f1,f2,f3,f4)
--enable_info
alter table t1 drop primary key, add primary key(f1,f2,f3,f4);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
# Temp file not used during clustered index rebuild
# for the following alter table commands.
--echo # Skip sort
--echo # Change PK from (f1,f2,f3,f4) to (f1,f2,added_columns)
--enable_info
alter table t1 drop primary key,add column f5 int not null,
add column f6 int not null,add primary key(f1,f2,f5,f6);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Change PK from (f1,f2,f5,f6) to (f1,f2,f5)
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop column f6;
--enable_info
alter table t1 drop column f6, drop primary key, add primary key(f1,f2,f5);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same PK
--enable_info
alter table t1 add column f6 int;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 drop column f6;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Must sort
--echo # Change PK from (f1,f2,f5) to (f1,f5)
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop column f2;
--enable_info
alter table t1 drop column f2, drop primary key, add primary key(f1,f5);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 add column f2n int after f1, drop primary key, add
primary key (f1,f5,f2n);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 change f5 f2n int not null,change f2n f5 int not null,
add column f8 int not null;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Change PK from (f1,f4,f2n) to (f1,f4,added_column,f2n)
--enable_info
alter table t1 add column f7 int, drop primary key,
add primary key (f1,f5,f7,f2n);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 force;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 row_format=compact;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Reusing the same pk
--enable_info
alter table t1 engine=innodb;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Optimize table
--enable_info
optimize table t1;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Sort files used for adding secondary index
--enable_info
alter table t1 drop primary key, add primary key(f1,f5,f7), add index
i(f3);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # No sort files used for dropping secondary index
--enable_info
alter table t1 drop primary key, add primary key(f1,f5),drop index i;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Change PK(f1,f5) to (f1,added_columns) and drop f5
--enable_info
alter table t1 drop primary key, add primary key(f1,f12),
drop column f5, add column f12 int not null;
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Must sort
--echo # Change PK(f1,f12) to (f1,existing_columns)
--enable_info
alter table t1 drop primary key, add primary key(f1,f3);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Change PK(f1,f3) to (f1,added_column,f3,added_column)
--enable_info
alter table t1 drop primary key, add column f3n int,
add column f4n int, add primary key(f1,f3n,f3,f4n);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Adding Secondary index alone.
--enable_info
alter table t1 add key(f1);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Must sort
--echo # Change PK(f1,f3) to (existing_column,f1)
--enable_info
alter table t1 drop primary key, add primary key(f4,f1);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort for PK.
--echo # Change PK(f4,f1) to (added_columns,f4,f1)
--echo # Secondary index rebuild happens
--enable_info
alter table t1 drop primary key, add column f5n int,
add column f6n int, add primary key(f5n,f6n,f4,f1);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort for PK.
--echo # Change PK(f5n,f6n,f4,f1) to
--echo # (added_columns,f5n,added_column,f6n,f4,f1)
--echo # Secondary index rebuild happens
--enable_info
alter table t1 drop primary key, add column f7n int,
add column f8n int, add primary key(f7n,f5n,f8n,f6n,f4,f1);
--disable_info
eval $innodb_metrics_select;
SET GLOBAL innodb_monitor_reset = module_ddl;
SET GLOBAL innodb_monitor_disable = module_ddl;
select count(*) from t1;
drop table t1;
--disable_warnings
SET GLOBAL innodb_monitor_reset = default;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
--enable_warnings
--echo # Bug#19163915 INNODB: DUPLICATE RECORDS COULD EXIST
--echo # WHEN SKIPPING SORT FOR CLUSTER INDEX
# last mtuple in previous buffer and first mtuple in next buffer
# are equal.
SELECT @@innodb_sort_buffer_size;
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1,f2,f3,f4));
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 values(106, 'aaa','bbb','cccc');
select count(*) from t1;
--echo # Skip sort
--echo # Change PK from (f1,f2,f3,f4) to (f1,f2,f3)
--error ER_DUP_ENTRY
alter table t1 drop primary key, add primary key(f1,f2,f3);
select count(*) from t1;
drop table t1;
# Duplicates exist with in the buffer
create table t1(f1 int auto_increment not null,
f2 char(200) not null, f3 char(200) not null,
f4 char(200) not null,primary key(f1,f2,f3,f4));
insert into t1 select NULL,'aaa','bbb','ccc' from t480;
insert into t1 values(108,'aaa','bbb','cccc');
select count(*) from t1;
--error ER_DUP_ENTRY
alter table t1 drop primary key, add primary key(f1,f2,f3);
select count(*) from t1;
drop table t1, t480;
--echo #
--echo # Bug #19896922 SORTING SKIPPED WHEN PREFIX LENGTH OF THE PK
--echo # FIELD IS CHANGED
--echo #
# Prefix length changes for the varchar column.
create table t1(a int not null, b varchar(30) not null,
primary key (b(10), a)) engine = innodb;
insert into t1 values(0,'khdHps6UxW8Lwaoxa604oK6zkb'),(1,'khdHps6UxW8L');
select * from t1;
alter table t1 drop primary key, add primary key (b(18),a);
select * from t1;
drop table t1;
create table t1(a int not null, b varchar(30) not null,
primary key (b(10), a)) engine = innodb;
insert into t1 values(0,'khdHps6UxW8Lwaoxa604oK6zkb'),(1,'khdHps6UtW8L');
select * from t1;
alter table t1 drop primary key, add primary key (b(8),a);
select * from t1;
drop table t1;
--echo #
--echo # Bug #21103101 SORTING SKIPPED WHEN DROPPING THE SINGLE
--echo # COLUMN PRIMARY KEY
--echo #
# Drop primary key column.
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop column f1;
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop column f1, drop primary key;
# DROP PRIMARY KEY is implied for a single-column PRIMARY KEY
alter table t1 drop column f1, drop key f1;
drop table t1;
# Drop Primary key when lock is none.
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t1 drop primary key, lock=none;
drop table t1;
--echo #
--echo # BUG#21612714 ALTER TABLE SORTING SKIPPED WHEN CHANGE PK AND DROP
--echo # LAST COLUMN OF OLD PK
--echo #
# no skip sort cases
# pk(o1,o2) to pk(o1,o3), drop o2
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), drop o2, lock=none;
drop table t1;
# pk(o1,o2) to pk(o3), drop o1, o2
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop o1, drop o2, add primary key(o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1,o3)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(o3)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(n1,o3)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 add column n1 int not null, drop primary key, add primary key(n1,o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(o3,n1)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(2,2,1);
alter table t1 add column n1 int not null, drop primary key, add primary key(o3,n1), lock=none;
drop table t1;
# pk(o1,o2) to pk(o2,o1)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2, o1), lock=none;
drop table t1;
# pk(o1,o2) to pk(o2)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2), lock=none;
drop table t1;
# pk(o1,o2) to pk(o2,o3)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
# pk(o2,o1) to pk(o2,o3)
create table t1(o1 int, o2 int, o3 int not null, primary key(o2,o1)) engine = innodb;
insert into t1 values(1,1,2),(2,1,1);
alter table t1 drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1,o3,o2)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3,o2), lock=none;
drop table t1;
# pk(o1,o2) to pk(o3,o1,o2)
create table t1(o1 int, o2 int, o3 int not null, primary key(o1,o2)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
alter table t1 drop primary key, add primary key(o3,o1,o2), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o3)
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
alter table t1 drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o2,o3) by drop o1
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop o1, lock=none;
alter table t1 drop o1, drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o1,o3) by drop o2
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop o2, lock=none;
alter table t1 drop o2, drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
# pk(o1,o2,o3) to pk(o3) by drop o1,o2
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
--error ER_KEY_COLUMN_DOES_NOT_EXITS
alter table t1 drop o1, drop o2, lock=none;
alter table t1 drop o1, drop o2,drop primary key,add primary key(o3),lock=none;
drop table t1;
# no skip sort for prefix change
# pk(o1(2),o2) to pk(o1(3),o2)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1(3), o2), lock=none;
drop table t1;
# pk(o1(2),o2) to pk(o1,o2)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1, o2), lock=none;
drop table t1;
# pk(o1(2),o2) to pk(o1(3),o3)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1(3), o3), lock=none;
drop table t1;
# pk(o1(2),o2) to pk(o1,o3)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(2), o2)) engine = innodb;
insert into t1 values('abd', 1, 1), ('abc', 2, 2);
alter table t1 drop primary key, add primary key(o1, o3), lock=none;
drop table t1;
# pk(o1(3),o2) to pk(o1(2),o2)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abc', 2, 1), ('abd', 1, 2);
alter table t1 drop primary key, add primary key(o1(2), o2), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1(2),o2)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1, o2)) engine = innodb;
insert into t1 values('abc', 2, 1), ('abd', 1, 2);
alter table t1 drop primary key, add primary key(o1(2), o2), lock=none;
drop table t1;
# pk(o1(3),o2) to pk(o1(2),o3)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1(3), o2)) engine = innodb;
insert into t1 values('abc', 2, 2), ('abd', 1, 1);
alter table t1 drop primary key, add primary key(o1(2), o3), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1(2),o3)
create table t1(o1 varchar(10), o2 int, o3 int not null, primary key(o1, o2)) engine = innodb;
insert into t1 values('abc', 2, 2), ('abd', 1, 1);
alter table t1 drop primary key, add primary key(o1(2), o3), lock=none;
drop table t1;
# pk(o1,o2(2),o3) to pk(o1,o2(3))
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(2),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (1, 'abc', 2);
alter table t1 drop primary key, add primary key(o1,o2(3)), lock=none;
drop table t1;
# pk(o1,o2(2),o3) to pk(o1,o2)
create table t1(o1 int, o2 varchar(10), o3 int, primary key(o1,o2(2),o3)) engine = innodb;
insert into t1 values(1, 'abd', 1), (1, 'abc', 2);
alter table t1 drop primary key, add primary key(o1,o2), lock=none;
drop table t1;
# pk(o1(3),o2(3)) to pk(o1(2),o2(3))
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abc', 'acd'), ('abd', 'abd');
alter table t1 drop primary key, add primary key(o1(2),o2(3)), lock=none;
drop table t1;
# pk(o1,o2) to pk(o1(2),o2)
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abc', 'acd'), ('abd', 'abd');
alter table t1 drop primary key, add primary key(o1(2),o2), lock=none;
drop table t1;
# pk(o1(3),o2(3)) to pk(o2(3),o1(3))
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1(3),o2(3))) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o2(3),o1(3)), lock=none;
drop table t1;
# pk(o1,o2) to pk(o2,o1)
create table t1(o1 varchar(10), o2 varchar(10), primary key(o1,o2)) engine = innodb;
insert into t1 values('abd', 'acd'), ('acd', 'abd');
alter table t1 drop primary key, add primary key(o2,o1), lock=none;
drop table t1;
# no skip sort cases
--source suite/innodb/include/alter_table_pk_no_sort.inc

View File

@ -1 +1 @@
--innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=64k --innodb-buffer-pool-size=5M --innodb-log-buffer-size=256k --innodb-sort-buffer-size=64k --innodb-online-alter-log-max-size=512k --innodb-buffer-pool-size=5M --innodb-log-buffer-size=256k

View File

@ -1,4 +1,5 @@
--source include/innodb_page_size_small.inc --source include/innodb_page_size_small.inc
--source include/innodb_encrypt_log.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
@ -17,7 +18,7 @@ SET GLOBAL innodb_file_per_table = on;
# Save the initial number of concurrent sessions. # Save the initial number of concurrent sessions.
--source include/count_sessions.inc --source include/count_sessions.inc
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 TEXT NOT NULL) CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL)
ENGINE = InnoDB; ENGINE = InnoDB;
INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,''); INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,'');
@ -183,10 +184,20 @@ INSERT INTO t1 SELECT 10 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
# Purge may or may not have cleaned up the DELETE FROM t1 WHERE c1 = 7; # Purge may or may not have cleaned up the DELETE FROM t1 WHERE c1 = 7;
--replace_result 81 80 --replace_column 9 ROWS
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
ANALYZE TABLE t1; ANALYZE TABLE t1;
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
--echo # session con1 --echo # session con1
connection con1; connection con1;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
@ -228,6 +239,22 @@ while ($c)
# Temporary table should exist until the DDL thread notices the overflow. # Temporary table should exist until the DDL thread notices the overflow.
eval $innodb_metrics_select; eval $innodb_metrics_select;
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SELECT
(@merge_encrypt_1-@merge_encrypt_0)-
(@merge_decrypt_1-@merge_decrypt_0) as sort_balance,
@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0,
@rowlog_encrypt_1>@rowlog_encrypt_0;
# Release con1. # Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done'; SET DEBUG_SYNC = 'now SIGNAL dml2_done';
@ -241,6 +268,19 @@ reap;
# when the above error was noticed. # when the above error was noticed.
eval $innodb_metrics_select; eval $innodb_metrics_select;
SET @merge_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_1=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
# Accumulate and apply some modification log. # Accumulate and apply some modification log.
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done';
--error ER_MULTIPLE_PRI_KEY --error ER_MULTIPLE_PRI_KEY
@ -248,9 +288,9 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
--send --send
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)), ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 TEXT NULL, CHANGE c1 c1 INT AFTER c22f, CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online'; ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
--echo # session default --echo # session default
connection default; connection default;
@ -276,6 +316,30 @@ eval $innodb_metrics_select;
SELECT COUNT(c22f) FROM t1; SELECT COUNT(c22f) FROM t1;
CHECK TABLE t1; CHECK TABLE t1;
SET @merge_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted');
SET @merge_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
SET @rowlog_decrypt_2=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted');
SELECT
(@merge_encrypt_2-@merge_encrypt_1)-
(@merge_decrypt_2-@merge_decrypt_1) as sort_balance,
(@rowlog_encrypt_2-@rowlog_encrypt_1)-
(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance;
SELECT
@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted,
@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted,
@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted,
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
# Create a column prefix index. # Create a column prefix index.
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)); ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
@ -292,15 +356,15 @@ ALTER TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)),
ALGORITHM = INPLACE; ALGORITHM = INPLACE;
--error ER_INVALID_USE_OF_NULL --error ER_INVALID_USE_OF_NULL
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET @@sql_mode = @old_sql_mode; SET @@sql_mode = @old_sql_mode;
UPDATE t1 SET c3=CONCAT(c1,REPEAT('foo',c1)) WHERE c3 IS NULL; UPDATE t1 SET c3=LEFT(CONCAT(c1,REPEAT('foo',c1)),255) WHERE c3 IS NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0';
# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on. # NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
SET @@sql_mode = 'STRICT_TRANS_TABLES'; SET @@sql_mode = 'STRICT_TRANS_TABLES';
--send --send
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL, DROP COLUMN c22f, ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)), DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST; ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
@ -325,7 +389,7 @@ ROLLBACK;
--echo # session con1 --echo # session con1
connection con1; connection con1;
ALTER TABLE t1 MODIFY c3 TEXT NOT NULL; ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done'; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
--send --send
ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f, ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,

View File

@ -23,13 +23,13 @@ use Fcntl 'SEEK_CUR', 'SEEK_END';
my $page_size = $ENV{'INNODB_PAGE_SIZE'}; my $page_size = $ENV{'INNODB_PAGE_SIZE'};
my $restart; my $restart;
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}ibdata1") or die;
if ($ENV{'MYSQLD_IS_DEBUG'}) if ($ENV{'MYSQLD_IS_DEBUG'})
{ {
# It is impractical to ensure that CREATE TABLE t will extend ibdata1. # It is impractical to ensure that CREATE TABLE t will extend ibdata1.
# We rely on innodb_system_tablespace_extend_debug=1 # We rely on innodb_system_tablespace_extend_debug=1
# to recover from this fault injection if no size change was redo-logged. # to recover from this fault injection if no size change was redo-logged.
my $root = $ENV{'INNODB_ROOT_PAGE'}; my $root = $ENV{'INNODB_ROOT_PAGE'};
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}ibdata1") or die;
my $size = sysseek(FILE, 0, SEEK_END) / $page_size; my $size = sysseek(FILE, 0, SEEK_END) / $page_size;
seek(FILE, $page_size * ($root + 1), SEEK_SET) or die; seek(FILE, $page_size * ($root + 1), SEEK_SET) or die;
my $empty_tail= 1; my $empty_tail= 1;
@ -39,8 +39,22 @@ if ($ENV{'MYSQLD_IS_DEBUG'})
$restart = "--innodb-data-file-size-debug=$size"; $restart = "--innodb-data-file-size-debug=$size";
truncate(FILE, $page_size * $root); truncate(FILE, $page_size * $root);
} }
close FILE;
} }
# Clear the doublewrite buffer entries for our tables.
sysseek(FILE, 6 * $page_size - 190, 0)||die "Unable to seek ibdata1\n";
sysread(FILE, $_, 12) == 12||die "Unable to read TRX_SYS\n";
my($magic,$d1,$d2)=unpack "NNN", $_;
die "magic=$magic, $d1, $d2\n" unless $magic == 536853855 && $d2 >= $d1 + 64;
sysseek(FILE, $d1 * $page_size, 0)||die "Unable to seek ibdata1\n";
# Find the pages in the doublewrite buffer
for (my $d = $d1; $d < $d2 + 64; $d++) {
sysread(FILE, $_, $page_size)==$page_size||die "Cannot read doublewrite\n";
my($space_id,$offset)=unpack "x[4]Nx[26]N",$_;
next unless $space_id && $offset > 3;
sysseek(FILE, $d * $page_size, 0)||die "Unable to seek ibdata1\n";
syswrite(FILE, chr(0) x $page_size)==$page_size||die;
}
close FILE;
open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die; open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die;
print FILE "--let \$restart_parameters=$restart\n" if $restart; print FILE "--let \$restart_parameters=$restart\n" if $restart;
print FILE "--source include/start_mysqld.inc\n"; print FILE "--source include/start_mysqld.inc\n";

View File

@ -153,13 +153,13 @@ SELECT `
<EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ <EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`; SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`;
£Ã£± CONVERT(`£Ã£±` using sjis) £Ã£± CONVERT(`£Ã£±` using sjis)
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
Warnings: Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
@ -236,13 +236,13 @@ SELECT `
<EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ <EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`; SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`;
£Ã£± CONVERT(`£Ã£±` using sjis) £Ã£± CONVERT(`£Ã£±` using sjis)
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
Warnings: Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis'
@ -319,13 +319,13 @@ SELECT `
<EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ <EFBFBD>íÈ<EFBFBD>íÉ<EFBFBD>íÊ<EFBFBD>íË<EFBFBD>íÌ<EFBFBD>íÍ<EFBFBD>íÎ<EFBFBD>íÏ<EFBFBD>íÐ<EFBFBD>íÑ<EFBFBD>íÒ<EFBFBD>íÓ<EFBFBD>íÔ<EFBFBD>íÕ<EFBFBD>íÖ<EFBFBD>í×<EFBFBD>íØ<EFBFBD>íÙ<EFBFBD>íÚ<EFBFBD>íÛ <09>íÈ<C3AD>íÉ<C3AD>íÊ<C3AD>íË<C3AD>íÌ<C3AD>íÍ<C3AD>íÎ<C3AD>íÏ<C3AD>íÐ<C3AD>íÑ<C3AD>íÒ<C3AD>íÓ<C3AD>íÔ<C3AD>íÕ<C3AD>íÖ<C3AD>í×<C3AD>íØ<C3AD>íÙ<C3AD>íÚ<C3AD>íÛ
SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`; SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`;
£Ã£± CONVERT(`£Ã£±` using sjis) £Ã£± CONVERT(`£Ã£±` using sjis)
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
Warnings: Warnings:
Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis'
Warning 1977 Cannot convert 'ucs2' character 0x4E5A to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x4E5A to 'sjis'

View File

@ -353,37 +353,37 @@ SELECT `
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
@ -751,37 +751,37 @@ SELECT `
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
@ -1149,45 +1149,45 @@ SELECT `
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・??~??・・・・・・・・???・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
Warnings: Warnings:
Warning 1977 Cannot convert 'ujis' character 0x8FA2AF to 'sjis' Warning 1977 Cannot convert 'ujis' character 0x8FA2AF to 'sjis'

View File

@ -111,7 +111,7 @@ SELECT ``, CONVERT(`` using ujis) FROM ``;
・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞
・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏
・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛
佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛
俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆
@ -249,7 +249,7 @@ SELECT ``, CONVERT(`` using sjis) FROM ``;
・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞
・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏
・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛
佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛
俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆
@ -287,7 +287,7 @@ SELECT ``, CONVERT(`` using ujis) FROM ``;
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË
・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・
@ -359,28 +359,28 @@ SELECT ``, CONVERT(`` using ucs2) FROM ``;
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
@ -390,15 +390,15 @@ SELECT ``, CONVERT(`` using sjis) FROM ``;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
Warnings: Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis'
Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis'
@ -515,7 +515,7 @@ SELECT ``, CONVERT(`` using ujis) FROM ``;
・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞
・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏
・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛
佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛
俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆
@ -653,7 +653,7 @@ SELECT ``, CONVERT(`` using sjis) FROM ``;
・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞 ・弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞
・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏 ・蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏
・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻 ・鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛
佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛 佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛
俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆 俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆
@ -691,7 +691,7 @@ SELECT ``, CONVERT(`` using ujis) FROM ``;
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË
・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë ・áàäâăǎāąåãćĉčçċďéèë
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・ ・άέήίϊΐόςύϋΰώ・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・
@ -763,28 +763,28 @@ SELECT ``, CONVERT(`` using ucs2) FROM ``;
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
@ -794,15 +794,15 @@ SELECT ``, CONVERT(`` using sjis) FROM ``;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
Warnings: Warnings:
Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis'
Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis'
@ -874,7 +874,7 @@ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~
SELECT ``, CONVERT(`` using ujis) FROM ``; SELECT ``, CONVERT(`` using ujis) FROM ``;
CONVERT(`` using ujis) CONVERT(`` using ujis)
  、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
“”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】
+‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥
$¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・
@ -1012,7 +1012,7 @@ SELECT ``, CONVERT(`` using ucs2) FROM ``;
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
  、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ   、。,.・:;?!゛゜´`¨^ ̄_ヽ
ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ NULL ヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’ ヾゝゞ〃仝々〆〇ー―‐/?〜‖|…‥‘’
“”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】 “”()〔〕[]{}〈〉《》「」『』【】
+‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥ +‐±×÷=≠<>≦≧∞∴♂♀°′″℃¥
$¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・ $¢£%#&*@§☆★○●◎◇・・・・・
@ -1082,7 +1082,7 @@ Warning 1977 Cannot convert 'utf8' character 0xEFBCBC to 'sjis'
SELECT ``, CONVERT(`` using ujis) FROM ``; SELECT ``, CONVERT(`` using ujis) FROM ``;
CONVERT(`` using ujis) CONVERT(`` using ujis)
・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・˘ˇ¸˙˝
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・ºª©®™
¤№・・・・・・・・・・・・・・・・・・ ¤№・・・・・・・・・・・・・・・・・・ ¤№・・・・・・・・・・・・・・・・・・ ¤№・・・・・・・・・・・・・・・・・・
@ -1167,45 +1167,45 @@ SELECT ``, CONVERT(`` using ucs2) FROM ``;
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
SELECT ``, CONVERT(`` using sjis) FROM ``; SELECT ``, CONVERT(`` using sjis) FROM ``;
CONVERT(`` using sjis) CONVERT(`` using sjis)
・・・・・・・・・・・・・・・˘ˇ¸˙˝ NULL ・・・・・・・・・・・・・・・˘ˇ¸˙˝ ・・・・・・・・・・・・・・・?????
・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・ºª©®™ NULL ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・?????
¤№・・・・・・・・・・・・・・・・・・ NULL ¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ NULL ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Ώ・・・ ・・・・・?????・?・??・?・・・
・άέήίϊΐόςύϋΰώ・・・・・・・ NULL ・άέήίϊΐόςύϋΰώ・・・・・・・ ・????????????・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL ・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・??????
ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ NULL ЈЉЊЋЌЎЏ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・ђѓєѕіїјљњћќўџ・・・・・ NULL ・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・
・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ NULL ・ÆĐ・Ħ・IJ・ŁĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・
・・・・・・・・・・・・・æđðħıijĸ NULL ・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・???????
łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË NULL ・ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈË ・???????????????????
ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ NULL ÊĚĖĒĘ・ĜĞĢĠĤÍÌÏÎǏİĪĮĨ ?????・??????????????
ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ NULL ĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖ ????????????????????
ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ????????????????????
ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ NULL ǕŴÝŸŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・áàäâăǎāąåãćĉčçċďéèë NULL ・áàäâăǎāąåãćĉčçċďéèë ・???????????????????
êěėēęǵĝğ・ġĥíìïîǐ・īįĩ NULL êěėēęǵĝğ・ġĥíìïîǐ・īįĩ ????????・???????・???
ĵķĺľļńňņñóòöôǒőōõŕřŗ NULL ĵķĺľļńňņñóòöôǒőōõŕřŗ ????????????????????
śŝšşťţúùüûŭǔűūųůũǘǜǚ NULL śŝšşťţúùüûŭǔűūųůũǘǜǚ ????????????????????
ǖŵýÿŷźžż・・・・・・・・・・・・ NULL ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 NULL ・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑 ・???????????????????
乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 NULL 乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠 ????????????????????
仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL 仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ????????????????????
伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL 伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ????????????????????
佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ NULL 佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄・・・・・ ???????????????・・・・・
・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL ・黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・???????????????????
鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 NULL 鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃齄齅齆齇齓齕齖 ????????????????????
齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 NULL 齗齘齚齝齞齨齩齭齮齯齰齱齳齵齺齽龏龐龑龒 ????????????????????
龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・
Warnings: Warnings:
Warning 1977 Cannot convert 'utf8' character 0xCB98 to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xCB98 to 'sjis'

View File

@ -0,0 +1,29 @@
call mtr.add_suppression("InnoDB: New log files created");
CREATE TABLE t(a INT UNSIGNED PRIMARY KEY) ENGINE INNODB;
INSERT INTO t VALUES(0);
COMMIT;
start transaction;
NOT FOUND /Rollback of trx with id/ in current_test
# expect NOT FOUND
NOT FOUND /Rollback of trx with id/ in current_test
# expect NOT FOUND
commit;
SELECT count(*) FROM t;
count(*)
201
# Restore and check results
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SELECT COUNT(*) FROM t;
COUNT(*)
1
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) FROM t;
COUNT(*)
201
SELECT * FROM t;
a
0
DROP TABLE t;

View File

@ -0,0 +1,63 @@
--source include/have_innodb.inc
call mtr.add_suppression("InnoDB: New log files created");
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
CREATE TABLE t(a INT UNSIGNED PRIMARY KEY) ENGINE INNODB;
INSERT INTO t VALUES(0);
COMMIT;
start transaction;
--disable_query_log
let $n=100;
while ($n) {
eval INSERT t VALUES(101-$n);
dec $n;
}
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
let $n=100;
while ($n) {
eval INSERT t VALUES(201-$n);
dec $n;
}
--enable_query_log
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir ;
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir ;
--enable_result_log
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Rollback of trx with id
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ;
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
commit;
SELECT count(*) FROM t;
echo # Restore and check results;
--let $targetdir=$basedir
--let $restart_parameters= --innodb-force-recovery=3
--source include/restart_and_restore.inc
rmdir $basedir;
rmdir $incremental_dir;
SELECT COUNT(*) FROM t;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT COUNT(*) FROM t;
--let $restart_parameters=
--source include/restart_mysqld.inc
SELECT * FROM t;
DROP TABLE t;

View File

@ -0,0 +1,10 @@
call mtr.add_suppression("InnoDB: New log files created");
CREATE TABLE t(a varchar(60)) ENGINE INNODB;
start transaction;
INSERT INTO t VALUES(1);
NOT FOUND /Rollback of trx with id/ in current_test
# expect NOT FOUND
SELECT count(*) FROM t;
count(*)
1
DROP TABLE t;

View File

@ -0,0 +1,25 @@
--source include/have_innodb.inc
call mtr.add_suppression("InnoDB: New log files created");
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t(a varchar(60)) ENGINE INNODB;
start transaction;
INSERT INTO t VALUES(1);
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
--enable_result_log
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir ;
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
--let SEARCH_PATTERN= Rollback of trx with id
--source include/search_pattern_in_file.inc
--echo # expect NOT FOUND
SELECT count(*) FROM t;
DROP TABLE t;
# Cleanup
rmdir $basedir;

View File

@ -1,4 +1,11 @@
CREATE TABLE t(i INT) ENGINE INNODB; CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1); INSERT INTO t VALUES(1);
# xtrabackup backup # xtrabackup backup
CREATE TABLE `bobby``tables` (id INT, name VARCHAR(50), purchased DATE) ENGINE INNODB PARTITION BY RANGE( YEAR(purchased) ) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (1995),
PARTITION p2 VALUES LESS THAN (2000),
PARTITION p3 VALUES LESS THAN (2005)
) ;
DROP TABLE t; DROP TABLE t;
DROP TABLE `bobby``tables`;

View File

@ -5,8 +5,16 @@ INSERT INTO t VALUES(1);
echo # xtrabackup backup; echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE `bobby``tables` (id INT, name VARCHAR(50), purchased DATE) ENGINE INNODB PARTITION BY RANGE( YEAR(purchased) ) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (1995),
PARTITION p2 VALUES LESS THAN (2000),
PARTITION p3 VALUES LESS THAN (2005)
) ;
--disable_result_log --disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table=1 --dbug=+d,check_mdl_lock_works; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table=1 --dbug=+d,check_mdl_lock_works;
--enable_result_log --enable_result_log
DROP TABLE t; DROP TABLE t;
DROP TABLE `bobby``tables`;
rmdir $targetdir; rmdir $targetdir;

View File

@ -1 +1 @@
--innodb --loose-changed_page_bitmaps --innodb-sys-tables --innodb --loose-changed_page_bitmaps --innodb-sys-tables --partition

View File

@ -1990,6 +1990,18 @@ SET @@SQL_MODE=default;
#DROP FUNCTION f1; #DROP FUNCTION f1;
#SET NAMES utf8; #SET NAMES utf8;
--echo #
--echo # MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
--echo #
SET sql_mode='STRICT_TRANS_TABLES';
SELECT CONVERT(_utf8 0xC499 USING latin1);
SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
SET sql_mode=default;
SELECT CONVERT(_utf8 0xC499 USING latin1);
SELECT CAST(_utf8 0xC499 AS CHAR CHARACTER SET latin1);
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 tests

View File

@ -3106,7 +3106,7 @@ private:
class Field_varstring :public Field_longstr { class Field_varstring :public Field_longstr {
protected: public:
uchar *get_data() const uchar *get_data() const
{ {
return ptr + length_bytes; return ptr + length_bytes;
@ -3115,6 +3115,7 @@ protected:
{ {
return length_bytes == 1 ? (uint) *ptr : uint2korr(ptr); return length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
} }
protected:
void store_length(uint32 number) void store_length(uint32 number)
{ {
if (length_bytes == 1) if (length_bytes == 1)

View File

@ -6193,7 +6193,7 @@ String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst,
srccs == &my_charset_bin ? srccs == &my_charset_bin ?
dstcs->csname : srccs->csname, dstcs->csname : srccs->csname,
err.ptr()); err.ptr());
return m_thd->is_strict_mode(); return false;
} }
if (const char *pos= cannot_convert_error_pos()) if (const char *pos= cannot_convert_error_pos())
{ {
@ -6205,7 +6205,7 @@ String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst,
ER_CANNOT_CONVERT_CHARACTER, ER_CANNOT_CONVERT_CHARACTER,
ER_THD(m_thd, ER_CANNOT_CONVERT_CHARACTER), ER_THD(m_thd, ER_CANNOT_CONVERT_CHARACTER),
srccs->csname, buf, dstcs->csname); srccs->csname, buf, dstcs->csname);
return m_thd->is_strict_mode(); return false;
} }
return false; return false;
} }

View File

@ -485,8 +485,7 @@ class Item_func_not;
class Item_splocal; class Item_splocal;
/** /**
String_copier that honors the current sql_mode (strict vs non strict) String_copier that sends Item specific warnings.
and can send warnings.
*/ */
class String_copier_for_item: public String_copier class String_copier_for_item: public String_copier
{ {

View File

@ -2408,7 +2408,7 @@ String *Item_char_typecast::copy(String *str, CHARSET_INFO *strcs)
if (copier.copy_with_warn(cast_cs, &tmp_value, strcs, if (copier.copy_with_warn(cast_cs, &tmp_value, strcs,
str->ptr(), str->length(), cast_length)) str->ptr(), str->length(), cast_length))
{ {
null_value= 1; // In strict mode: malformed data or could not convert null_value= 1; // EOM
return 0; return 0;
} }
check_truncation_with_warn(str, copier.source_end_pos() - str->ptr()); check_truncation_with_warn(str, copier.source_end_pos() - str->ptr());

View File

@ -4967,9 +4967,15 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd)
extern "C" int thd_binlog_format(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd)
{ {
if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && #ifdef WITH_WSREP
thd->variables.option_bits & OPTION_BIN_LOG) if (WSREP(thd))
return (int) thd->wsrep_binlog_format(); {
/* for wsrep binlog format is meaningful also when binlogging is off */
return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format);
}
#endif /* WITH_WSREP */
if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG))
return (int) thd->variables.binlog_format;
else else
return BINLOG_FORMAT_UNSPEC; return BINLOG_FORMAT_UNSPEC;
} }

View File

@ -90,9 +90,15 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd)
/* Not allowed with EXCHANGE PARTITION */ /* Not allowed with EXCHANGE PARTITION */
DBUG_ASSERT(!create_info.data_file_name && !create_info.index_file_name); DBUG_ASSERT(!create_info.data_file_name && !create_info.index_file_name);
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
thd->prepare_logs_for_admin_command(); thd->prepare_logs_for_admin_command();
DBUG_RETURN(exchange_partition(thd, first_table, &alter_info)); DBUG_RETURN(exchange_partition(thd, first_table, &alter_info));
#ifdef WITH_WSREP
error:
/* handle errors in TO_ISOLATION here */
DBUG_RETURN(true);
#endif /* WITH_WSREP */
} }
@ -525,21 +531,6 @@ bool Sql_cmd_alter_table_exchange_partition::
&alter_prelocking_strategy)) &alter_prelocking_strategy))
DBUG_RETURN(true); DBUG_RETURN(true);
#ifdef WITH_WSREP
if (WSREP_ON)
{
if ((!thd->is_current_stmt_binlog_format_row() ||
/* TODO: Do we really need to check for temp tables in this case? */
!thd->find_temporary_table(table_list)) &&
wsrep_to_isolation_begin(thd, table_list->db, table_list->table_name,
NULL))
{
WSREP_WARN("ALTER TABLE EXCHANGE PARTITION isolation failure");
DBUG_RETURN(TRUE);
}
}
#endif /* WITH_WSREP */
part_table= table_list->table; part_table= table_list->table;
swap_table= swap_table_list->table; swap_table= swap_table_list->table;

View File

@ -540,6 +540,7 @@ wsrep_run_wsrep_commit(THD *thd, bool all)
break; break;
case WSREP_BF_ABORT: case WSREP_BF_ABORT:
DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED);
/* fall through */
case WSREP_TRX_FAIL: case WSREP_TRX_FAIL:
WSREP_DEBUG("commit failed for reason: %d", rcode); WSREP_DEBUG("commit failed for reason: %d", rcode);
DBUG_PRINT("wsrep", ("replicating commit fail")); DBUG_PRINT("wsrep", ("replicating commit fail"));

View File

@ -315,6 +315,10 @@ bool wsrep_create_like_table(THD* thd, TABLE_LIST* table,
bool wsrep_node_is_donor(); bool wsrep_node_is_donor();
bool wsrep_node_is_synced(); bool wsrep_node_is_synced();
#define WSREP_BINLOG_FORMAT(my_format) \
((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \
wsrep_forced_binlog_format : my_format)
#else /* WITH_WSREP */ #else /* WITH_WSREP */
#define WSREP(T) (0) #define WSREP(T) (0)
@ -344,6 +348,7 @@ bool wsrep_node_is_synced();
#define wsrep_thr_init() do {} while(0) #define wsrep_thr_init() do {} while(0)
#define wsrep_thr_deinit() do {} while(0) #define wsrep_thr_deinit() do {} while(0)
#define wsrep_running_threads (0) #define wsrep_running_threads (0)
#define WSREP_BINLOG_FORMAT(my_format) my_format
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
#endif /* WSREP_MYSQLD_H */ #endif /* WSREP_MYSQLD_H */

View File

@ -1143,6 +1143,18 @@ static SHOW_VAR innodb_status_variables[]= {
{"encryption_key_rotation_list_length", {"encryption_key_rotation_list_length",
(char*)&export_vars.innodb_key_rotation_list_length, (char*)&export_vars.innodb_key_rotation_list_length,
SHOW_LONGLONG}, SHOW_LONGLONG},
{"encryption_n_merge_blocks_encrypted",
(char*)&export_vars.innodb_n_merge_blocks_encrypted,
SHOW_LONGLONG},
{"encryption_n_merge_blocks_decrypted",
(char*)&export_vars.innodb_n_merge_blocks_decrypted,
SHOW_LONGLONG},
{"encryption_n_rowlog_blocks_encrypted",
(char*)&export_vars.innodb_n_rowlog_blocks_encrypted,
SHOW_LONGLONG},
{"encryption_n_rowlog_blocks_decrypted",
(char*)&export_vars.innodb_n_rowlog_blocks_decrypted,
SHOW_LONGLONG},
/* scrubing */ /* scrubing */
{"scrub_background_page_reorganizations", {"scrub_background_page_reorganizations",
@ -6472,11 +6484,8 @@ ha_innobase::open(const char* name, int, uint)
a row in our table. Note that MySQL may also compare two row a row in our table. Note that MySQL may also compare two row
references for equality by doing a simple memcmp on the strings references for equality by doing a simple memcmp on the strings
of length ref_length! */ of length ref_length! */
if (!(m_prebuilt->clust_index_was_generated
if (!row_table_got_default_clust_index(ib_table)) { = dict_index_is_auto_gen_clust(ib_table->indexes.start))) {
m_prebuilt->clust_index_was_generated = FALSE;
if (m_primary_key >= MAX_KEY) { if (m_primary_key >= MAX_KEY) {
ib_table->dict_frm_mismatch = DICT_FRM_NO_PK; ib_table->dict_frm_mismatch = DICT_FRM_NO_PK;
@ -6542,8 +6551,6 @@ ha_innobase::open(const char* name, int, uint)
ib_push_frm_error(thd, ib_table, table, 0, true); ib_push_frm_error(thd, ib_table, table, 0, true);
} }
m_prebuilt->clust_index_was_generated = TRUE;
ref_length = DATA_ROW_ID_LEN; ref_length = DATA_ROW_ID_LEN;
/* If we automatically created the clustered index, then /* If we automatically created the clustered index, then
@ -14177,7 +14184,8 @@ innobase_get_mysql_key_number_for_index(
i++; i++;
} }
if (row_table_got_default_clust_index(index->table)) { if (dict_index_is_clust(index)
&& dict_index_is_auto_gen_clust(index)) {
ut_a(i > 0); ut_a(i > 0);
i--; i--;
} }

View File

@ -689,7 +689,8 @@ ha_innobase::check_if_supported_inplace_alter(
/* See if MYSQL table has no pk but we do. */ /* See if MYSQL table has no pk but we do. */
if (UNIV_UNLIKELY(my_primary_key >= MAX_KEY) if (UNIV_UNLIKELY(my_primary_key >= MAX_KEY)
&& !row_table_got_default_clust_index(m_prebuilt->table)) { && !dict_index_is_auto_gen_clust(
dict_table_get_first_index(m_prebuilt->table))) {
ha_alter_info->unsupported_reason = innobase_get_err_msg( ha_alter_info->unsupported_reason = innobase_get_err_msg(
ER_PRIMARY_CANT_HAVE_NULL); ER_PRIMARY_CANT_HAVE_NULL);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
@ -4434,7 +4435,8 @@ prepare_inplace_alter_table_dict(
index_defs = innobase_create_key_defs( index_defs = innobase_create_key_defs(
ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index, ctx->heap, ha_alter_info, altered_table, ctx->num_to_add_index,
num_fts_index, num_fts_index,
row_table_got_default_clust_index(ctx->new_table), dict_index_is_auto_gen_clust(dict_table_get_first_index(
ctx->new_table)),
fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx, fts_doc_id_col, add_fts_doc_id, add_fts_doc_id_idx,
old_table); old_table);

View File

@ -82,4 +82,44 @@ UNIV_INTERN
void void
log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt = false); log_crypt(byte* buf, lsn_t lsn, ulint size, bool decrypt = false);
/** Encrypt or decrypt a temporary file block.
@param[in] src block to encrypt or decrypt
@param[in] size size of the block
@param[out] dst destination block
@param[in] offs offset to block
@param[in] space_id tablespace id
@param[in] encrypt true=encrypt; false=decrypt
@return whether the operation succeeded */
UNIV_INTERN
bool
log_tmp_block_encrypt(
const byte* src,
ulint size,
byte* dst,
uint64_t offs,
ulint space_id,
bool encrypt = true)
MY_ATTRIBUTE((warn_unused_result, nonnull));
/** Decrypt a temporary file block.
@param[in] src block to decrypt
@param[in] size size of the block
@param[out] dst destination block
@param[in] offs offset to block
@param[in] space_id tablespace id
@return whether the operation succeeded */
inline
bool
log_tmp_block_decrypt(
const byte* src,
ulint size,
byte* dst,
uint64_t offs,
ulint space_id)
{
return(log_tmp_block_encrypt(src, size, dst, offs, space_id, false));
}
/** @return whether temporary files are encrypted */
inline bool log_tmp_is_encrypted() { return srv_encrypt_log; }
#endif // log0crypt.h #endif // log0crypt.h

View File

@ -73,7 +73,6 @@ struct fts_psort_common_t {
store Doc ID during sort, if store Doc ID during sort, if
Doc ID will not be big enough Doc ID will not be big enough
to use 8 bytes value */ to use 8 bytes value */
fil_space_crypt_t* crypt_data; /*!< crypt data or NULL */
}; };
struct fts_psort_t { struct fts_psort_t {

View File

@ -44,9 +44,6 @@ Created 13/06/2005 Jan Lindstrom
/* Reserve free space from every block for key_version */ /* Reserve free space from every block for key_version */
#define ROW_MERGE_RESERVE_SIZE 4 #define ROW_MERGE_RESERVE_SIZE 4
/* Reserve free space from every block for key_version */
#define ROW_MERGE_RESERVE_SIZE 4
/* Cluster index read task is mandatory */ /* Cluster index read task is mandatory */
#define COST_READ_CLUSTERED_INDEX 1.0 #define COST_READ_CLUSTERED_INDEX 1.0
@ -376,15 +373,15 @@ row_merge_buf_sort(
/********************************************************************//** /********************************************************************//**
Write a merge block to the file system. Write a merge block to the file system.
@return TRUE if request was successful, FALSE if fail */ @return whether the request was completed successfully */
ibool UNIV_INTERN
bool
row_merge_write( row_merge_write(
/*============*/ /*============*/
int fd, /*!< in: file descriptor */ int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write, ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */ in number of row_merge_block_t elements */
const void* buf, /*!< in: data */ const void* buf, /*!< in: data */
fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */ void* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result)); MY_ATTRIBUTE((warn_unused_result));
@ -417,7 +414,6 @@ row_merge_file_create(
@param[in] update_progress true, if we should update progress status @param[in] update_progress true, if we should update progress status
@param[in] pct_progress total progress percent until now @param[in] pct_progress total progress percent until now
@param[in] pct_ocst current progress percent @param[in] pct_ocst current progress percent
@param[in] crypt_data tale crypt data
@param[in] crypt_block crypt buf or NULL @param[in] crypt_block crypt buf or NULL
@param[in] space space_id @param[in] space space_id
@param[in,out] stage performance schema accounting object, used by @param[in,out] stage performance schema accounting object, used by
@ -435,7 +431,6 @@ row_merge_sort(
const bool update_progress, const bool update_progress,
const double pct_progress, const double pct_progress,
const double pct_cost, const double pct_cost,
fil_space_crypt_t* crypt_data,
row_merge_block_t* crypt_block, row_merge_block_t* crypt_block,
ulint space, ulint space,
ut_stage_alter_t* stage = NULL) ut_stage_alter_t* stage = NULL)
@ -467,7 +462,7 @@ row_merge_file_destroy(
MY_ATTRIBUTE((nonnull)); MY_ATTRIBUTE((nonnull));
/** Read a merge block from the file system. /** Read a merge block from the file system.
@return whether the request was successful */ @return whether the request was completed successfully */
bool bool
row_merge_read( row_merge_read(
/*===========*/ /*===========*/
@ -476,7 +471,6 @@ row_merge_read(
in number of row_merge_block_t in number of row_merge_block_t
elements */ elements */
row_merge_block_t* buf, /*!< out: data */ row_merge_block_t* buf, /*!< out: data */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result)); MY_ATTRIBUTE((warn_unused_result));
@ -497,7 +491,6 @@ row_merge_read_rec(
or NULL on end of list or NULL on end of list
(non-NULL on I/O error) */ (non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */ ulint* offsets,/*!< out: offsets of mrec */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
MY_ATTRIBUTE((warn_unused_result)); MY_ATTRIBUTE((warn_unused_result));

View File

@ -262,15 +262,6 @@ row_get_prebuilt_update_vector(
/*===========================*/ /*===========================*/
row_prebuilt_t* prebuilt); /*!< in: prebuilt struct in MySQL row_prebuilt_t* prebuilt); /*!< in: prebuilt struct in MySQL
handle */ handle */
/*********************************************************************//**
Checks if a table is such that we automatically created a clustered
index on it (on row id).
@return TRUE if the clustered index was generated automatically */
ibool
row_table_got_default_clust_index(
/*==============================*/
const dict_table_t* table); /*!< in: table */
/** Does an update or delete of a row for MySQL. /** Does an update or delete of a row for MySQL.
@param[in,out] prebuilt prebuilt struct in MySQL handle @param[in,out] prebuilt prebuilt struct in MySQL handle
@return error code or DB_SUCCESS */ @return error code or DB_SUCCESS */

View File

@ -129,6 +129,14 @@ struct srv_stats_t
ulint_ctr_64_t pages_encrypted; ulint_ctr_64_t pages_encrypted;
/* Number of pages decrypted */ /* Number of pages decrypted */
ulint_ctr_64_t pages_decrypted; ulint_ctr_64_t pages_decrypted;
/* Number of merge blocks encrypted */
ulint_ctr_64_t n_merge_blocks_encrypted;
/* Number of merge blocks decrypted */
ulint_ctr_64_t n_merge_blocks_decrypted;
/* Number of row log blocks encrypted */
ulint_ctr_64_t n_rowlog_blocks_encrypted;
/* Number of row log blocks decrypted */
ulint_ctr_64_t n_rowlog_blocks_decrypted;
/** Number of data read in total (in bytes) */ /** Number of data read in total (in bytes) */
ulint_ctr_1_t data_read; ulint_ctr_1_t data_read;
@ -1033,6 +1041,15 @@ struct export_var_t{
int64_t innodb_pages_decrypted; /*!< Number of pages int64_t innodb_pages_decrypted; /*!< Number of pages
decrypted */ decrypted */
/*!< Number of merge blocks encrypted */
ib_int64_t innodb_n_merge_blocks_encrypted;
/*!< Number of merge blocks decrypted */
ib_int64_t innodb_n_merge_blocks_decrypted;
/*!< Number of row log blocks encrypted */
ib_int64_t innodb_n_rowlog_blocks_encrypted;
/*!< Number of row log blocks decrypted */
ib_int64_t innodb_n_rowlog_blocks_decrypted;
ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */ ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */ ulint innodb_sec_rec_cluster_reads_avoided;/*!< srv_sec_rec_cluster_reads_avoided */

View File

@ -367,3 +367,44 @@ log_crypt_read_checkpoint_buf(const byte* buf)
return init_crypt_key(&info); return init_crypt_key(&info);
} }
/** Encrypt or decrypt a temporary file block.
@param[in] src block to encrypt or decrypt
@param[in] size size of the block
@param[out] dst destination block
@param[in] offs offset to block
@param[in] space_id tablespace id
@param[in] encrypt true=encrypt; false=decrypt
@return whether the operation succeeded */
UNIV_INTERN
bool
log_tmp_block_encrypt(
const byte* src,
ulint size,
byte* dst,
uint64_t offs,
ulint space_id,
bool encrypt)
{
uint dst_len;
uint64_t aes_ctr_iv[MY_AES_BLOCK_SIZE / sizeof(uint64_t)];
bzero(aes_ctr_iv, sizeof aes_ctr_iv);
aes_ctr_iv[0] = space_id;
aes_ctr_iv[1] = offs;
int rc = encryption_crypt(
src, size, dst, &dst_len,
const_cast<byte*>(info.crypt_key.bytes), sizeof info.crypt_key,
reinterpret_cast<byte*>(aes_ctr_iv), sizeof aes_ctr_iv,
encrypt
? ENCRYPTION_FLAG_ENCRYPT|ENCRYPTION_FLAG_NOPAD
: ENCRYPTION_FLAG_DECRYPT|ENCRYPTION_FLAG_NOPAD,
LOG_DEFAULT_ENCRYPTION_KEY, info.key_version);
if (rc != MY_AES_OK) {
ib::error() << (encrypt ? "Encryption" : "Decryption")
<< " failed for temporary file: " << rc;
}
return rc == MY_AES_OK;
}

View File

@ -35,6 +35,7 @@ Created 10/13/2010 Jimmy Yang
#include "btr0cur.h" #include "btr0cur.h"
#include "btr0bulk.h" #include "btr0bulk.h"
#include "fts0plugin.h" #include "fts0plugin.h"
#include "log0crypt.h"
/** Read the next record to buffer N. /** Read the next record to buffer N.
@param N index into array of merge info structure */ @param N index into array of merge info structure */
@ -43,7 +44,7 @@ Created 10/13/2010 Jimmy Yang
b[N] = row_merge_read_rec( \ b[N] = row_merge_read_rec( \
block[N], buf[N], b[N], index, \ block[N], buf[N], b[N], index, \
fd[N], &foffs[N], &mrec[N], offsets[N], \ fd[N], &foffs[N], &mrec[N], offsets[N], \
crypt_data, crypt_block[N], space); \ crypt_block[N], space); \
if (UNIV_UNLIKELY(!b[N])) { \ if (UNIV_UNLIKELY(!b[N])) { \
if (mrec[N]) { \ if (mrec[N]) { \
goto exit; \ goto exit; \
@ -194,7 +195,6 @@ row_fts_psort_info_init(
fts_psort_t* merge_info = NULL; fts_psort_t* merge_info = NULL;
ulint block_size; ulint block_size;
ibool ret = TRUE; ibool ret = TRUE;
fil_space_crypt_t* crypt_data = NULL;
bool encrypted = false; bool encrypted = false;
block_size = 3 * srv_sort_buf_size; block_size = 3 * srv_sort_buf_size;
@ -225,21 +225,8 @@ row_fts_psort_info_init(
common_info->merge_event = os_event_create(0); common_info->merge_event = os_event_create(0);
common_info->opt_doc_id_size = opt_doc_id_size; common_info->opt_doc_id_size = opt_doc_id_size;
/* Theoretically the tablespace can be dropped straight away. if (log_tmp_is_encrypted()) {
In practice, the DDL completion will wait for this thread to
finish. */
if (fil_space_t* space = fil_space_acquire(new_table->space)) {
crypt_data = space->crypt_data;
fil_space_release(space);
}
if (crypt_data && crypt_data->should_encrypt()) {
common_info->crypt_data = crypt_data;
encrypted = true; encrypted = true;
} else {
/* Not needed */
common_info->crypt_data = NULL;
crypt_data = NULL;
} }
ut_ad(trx->mysql_thd != NULL); ut_ad(trx->mysql_thd != NULL);
@ -698,11 +685,10 @@ row_merge_fts_doc_tokenize(
cur_len += len; cur_len += len;
dfield_dup(field, buf->heap); dfield_dup(field, buf->heap);
/* Reserve one byte for the end marker of row_merge_block_t /* Reserve one byte for the end marker of row_merge_block_t */
and we have reserved ROW_MERGE_RESERVE_SIZE (= 4) for
encryption key_version in the beginning of the buffer. */
if (buf->total_size + data_size[idx] + cur_len if (buf->total_size + data_size[idx] + cur_len
>= (srv_sort_buf_size - 1 - ROW_MERGE_RESERVE_SIZE)) { >= srv_sort_buf_size - 1) {
buf_full = TRUE; buf_full = TRUE;
break; break;
} }
@ -798,7 +784,6 @@ fts_parallel_tokenization(
fts_tokenize_ctx_t t_ctx; fts_tokenize_ctx_t t_ctx;
ulint retried = 0; ulint retried = 0;
dberr_t error = DB_SUCCESS; dberr_t error = DB_SUCCESS;
fil_space_crypt_t* crypt_data = NULL;
ut_ad(psort_info->psort_common->trx->mysql_thd != NULL); ut_ad(psort_info->psort_common->trx->mysql_thd != NULL);
@ -825,7 +810,6 @@ fts_parallel_tokenization(
block = psort_info->merge_block; block = psort_info->merge_block;
crypt_block = psort_info->crypt_block; crypt_block = psort_info->crypt_block;
crypt_data = psort_info->psort_common->crypt_data;
const page_size_t& page_size = dict_table_page_size(table); const page_size_t& page_size = dict_table_page_size(table);
@ -918,7 +902,6 @@ loop:
if (!row_merge_write(merge_file[t_ctx.buf_used]->fd, if (!row_merge_write(merge_file[t_ctx.buf_used]->fd,
merge_file[t_ctx.buf_used]->offset++, merge_file[t_ctx.buf_used]->offset++,
block[t_ctx.buf_used], block[t_ctx.buf_used],
crypt_data,
crypt_block[t_ctx.buf_used], crypt_block[t_ctx.buf_used],
table->space)) { table->space)) {
error = DB_TEMP_FILE_WRITE_FAIL; error = DB_TEMP_FILE_WRITE_FAIL;
@ -1013,7 +996,6 @@ exit:
if (!row_merge_write(merge_file[i]->fd, if (!row_merge_write(merge_file[i]->fd,
merge_file[i]->offset++, merge_file[i]->offset++,
block[i], block[i],
crypt_data,
crypt_block[i], crypt_block[i],
table->space)) { table->space)) {
error = DB_TEMP_FILE_WRITE_FAIL; error = DB_TEMP_FILE_WRITE_FAIL;
@ -1053,7 +1035,7 @@ exit:
psort_info->psort_common->dup, psort_info->psort_common->dup,
merge_file[i], block[i], &tmpfd[i], merge_file[i], block[i], &tmpfd[i],
false, 0.0/* pct_progress */, 0.0/* pct_cost */, false, 0.0/* pct_progress */, 0.0/* pct_cost */,
crypt_data, crypt_block[i], table->space); crypt_block[i], table->space);
if (error != DB_SUCCESS) { if (error != DB_SUCCESS) {
close(tmpfd[i]); close(tmpfd[i]);
@ -1595,8 +1577,6 @@ row_fts_merge_insert(
ulint start; ulint start;
fts_psort_insert_t ins_ctx; fts_psort_insert_t ins_ctx;
ulint count_diag = 0; ulint count_diag = 0;
fil_space_crypt_t* crypt_data = NULL;
ulint space=0;
fts_table_t fts_table; fts_table_t fts_table;
char aux_table_name[MAX_FULL_NAME_LEN]; char aux_table_name[MAX_FULL_NAME_LEN];
dict_table_t* aux_table; dict_table_t* aux_table;
@ -1618,7 +1598,6 @@ row_fts_merge_insert(
trx->op_info = "inserting index entries"; trx->op_info = "inserting index entries";
ins_ctx.opt_doc_id_size = psort_info[0].psort_common->opt_doc_id_size; ins_ctx.opt_doc_id_size = psort_info[0].psort_common->opt_doc_id_size;
crypt_data = psort_info[0].psort_common->crypt_data;
heap = mem_heap_create(500 + sizeof(mrec_buf_t)); heap = mem_heap_create(500 + sizeof(mrec_buf_t));
@ -1723,6 +1702,7 @@ row_fts_merge_insert(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
ins_ctx.aux_index_id = id; ins_ctx.aux_index_id = id;
#endif #endif
const ulint space = table->space;
for (i = 0; i < fts_sort_pll_degree; i++) { for (i = 0; i < fts_sort_pll_degree; i++) {
if (psort_info[i].merge_file[id]->n_rec == 0) { if (psort_info[i].merge_file[id]->n_rec == 0) {
@ -1736,7 +1716,6 @@ row_fts_merge_insert(
&& (!row_merge_read( && (!row_merge_read(
fd[i], foffs[i], fd[i], foffs[i],
(row_merge_block_t*) block[i], (row_merge_block_t*) block[i],
crypt_data,
(row_merge_block_t*) crypt_block[i], (row_merge_block_t*) crypt_block[i],
space))) { space))) {
error = DB_CORRUPTION; error = DB_CORRUPTION;

View File

@ -1442,8 +1442,7 @@ row_ins_foreign_check_on_constraint(
foreign, foreign,
clust_rec, clust_rec,
clust_index, clust_index,
FALSE, FALSE, FALSE);
(node) ? TRUE : FALSE);
if (err != DB_SUCCESS) { if (err != DB_SUCCESS) {
fprintf(stderr, fprintf(stderr,
"WSREP: foreign key append failed: %d\n", err); "WSREP: foreign key append failed: %d\n", err);

View File

@ -30,6 +30,7 @@ Created 2011-05-26 Marko Makela
#include "row0upd.h" #include "row0upd.h"
#include "row0merge.h" #include "row0merge.h"
#include "row0ext.h" #include "row0ext.h"
#include "log0crypt.h"
#include "data0data.h" #include "data0data.h"
#include "que0que.h" #include "que0que.h"
#include "srv0mon.h" #include "srv0mon.h"
@ -208,8 +209,14 @@ struct row_log_t {
row_log_buf_t tail; /*!< writer context; row_log_buf_t tail; /*!< writer context;
protected by mutex and index->lock S-latch, protected by mutex and index->lock S-latch,
or by index->lock X-latch only */ or by index->lock X-latch only */
byte* crypt_tail; /*!< writer context;
temporary buffer used in encryption,
decryption or NULL*/
row_log_buf_t head; /*!< reader context; protected by MDL only; row_log_buf_t head; /*!< reader context; protected by MDL only;
modifiable by row_log_apply_ops() */ modifiable by row_log_apply_ops() */
byte* crypt_head; /*!< reader context;
temporary buffer used in encryption,
decryption or NULL */
ulint n_old_col; ulint n_old_col;
/*!< number of non-virtual column in /*!< number of non-virtual column in
old table */ old table */
@ -372,39 +379,58 @@ row_log_online_op(
= (os_offset_t) log->tail.blocks = (os_offset_t) log->tail.blocks
* srv_sort_buf_size; * srv_sort_buf_size;
IORequest request(IORequest::WRITE); IORequest request(IORequest::WRITE);
byte* buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) { if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed; goto write_failed;
} }
if (mrec_size == avail_size) { if (mrec_size == avail_size) {
ut_ad(b == &log->tail.block[srv_sort_buf_size]); ut_ad(b == &buf[srv_sort_buf_size]);
} else { } else {
ut_ad(b == log->tail.buf + mrec_size); ut_ad(b == log->tail.buf + mrec_size);
memcpy(log->tail.block + log->tail.bytes, memcpy(buf + log->tail.bytes,
log->tail.buf, avail_size); log->tail.buf, avail_size);
} }
UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size); UNIV_MEM_ASSERT_RW(buf, srv_sort_buf_size);
if (row_log_tmpfile(log) < 0) { if (row_log_tmpfile(log) < 0) {
log->error = DB_OUT_OF_MEMORY; log->error = DB_OUT_OF_MEMORY;
goto err_exit; goto err_exit;
} }
/* If encryption is enabled encrypt buffer before writing it
to file system. */
if (log_tmp_is_encrypted()) {
if (!log_tmp_block_encrypt(
buf, srv_sort_buf_size,
log->crypt_tail, byte_offset,
index->table->space)) {
log->error = DB_DECRYPTION_FAILED;
goto write_failed;
}
srv_stats.n_rowlog_blocks_encrypted.inc();
buf = log->crypt_tail;
}
log->tail.blocks++; log->tail.blocks++;
if (!os_file_write_int_fd( if (!os_file_write_int_fd(
request, request,
"(modification log)", "(modification log)",
log->fd, log->fd,
log->tail.block, byte_offset, srv_sort_buf_size)) { buf, byte_offset, srv_sort_buf_size)) {
write_failed: write_failed:
/* We set the flag directly instead of invoking /* We set the flag directly instead of invoking
dict_set_corrupted_index_cache_only(index) here, dict_set_corrupted_index_cache_only(index) here,
because the index is not "public" yet. */ because the index is not "public" yet. */
index->type |= DICT_CORRUPT; index->type |= DICT_CORRUPT;
} }
UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size); UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size);
UNIV_MEM_INVALID(buf, srv_sort_buf_size);
memcpy(log->tail.block, log->tail.buf + avail_size, memcpy(log->tail.block, log->tail.buf + avail_size,
mrec_size - avail_size); mrec_size - avail_size);
log->tail.bytes = mrec_size - avail_size; log->tail.bytes = mrec_size - avail_size;
@ -474,13 +500,15 @@ static MY_ATTRIBUTE((nonnull))
void void
row_log_table_close_func( row_log_table_close_func(
/*=====================*/ /*=====================*/
row_log_t* log, /*!< in/out: online rebuild log */ dict_index_t* index, /*!< in/out: online rebuilt index */
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
const byte* b, /*!< in: end of log record */ const byte* b, /*!< in: end of log record */
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
ulint size, /*!< in: size of log record */ ulint size, /*!< in: size of log record */
ulint avail) /*!< in: available size for log record */ ulint avail) /*!< in: available size for log record */
{ {
row_log_t* log = index->online_log;
ut_ad(mutex_own(&log->mutex)); ut_ad(mutex_own(&log->mutex));
if (size >= avail) { if (size >= avail) {
@ -488,36 +516,52 @@ row_log_table_close_func(
= (os_offset_t) log->tail.blocks = (os_offset_t) log->tail.blocks
* srv_sort_buf_size; * srv_sort_buf_size;
IORequest request(IORequest::WRITE); IORequest request(IORequest::WRITE);
byte* buf = log->tail.block;
if (byte_offset + srv_sort_buf_size >= srv_online_max_size) { if (byte_offset + srv_sort_buf_size >= srv_online_max_size) {
goto write_failed; goto write_failed;
} }
if (size == avail) { if (size == avail) {
ut_ad(b == &log->tail.block[srv_sort_buf_size]); ut_ad(b == &buf[srv_sort_buf_size]);
} else { } else {
ut_ad(b == log->tail.buf + size); ut_ad(b == log->tail.buf + size);
memcpy(log->tail.block + log->tail.bytes, memcpy(buf + log->tail.bytes, log->tail.buf, avail);
log->tail.buf, avail);
} }
UNIV_MEM_ASSERT_RW(log->tail.block, srv_sort_buf_size); UNIV_MEM_ASSERT_RW(buf, srv_sort_buf_size);
if (row_log_tmpfile(log) < 0) { if (row_log_tmpfile(log) < 0) {
log->error = DB_OUT_OF_MEMORY; log->error = DB_OUT_OF_MEMORY;
goto err_exit; goto err_exit;
} }
/* If encryption is enabled encrypt buffer before writing it
to file system. */
if (log_tmp_is_encrypted()) {
if (!log_tmp_block_encrypt(
log->tail.block, srv_sort_buf_size,
log->crypt_tail, byte_offset,
index->table->space)) {
log->error = DB_DECRYPTION_FAILED;
goto err_exit;
}
srv_stats.n_rowlog_blocks_encrypted.inc();
buf = log->crypt_tail;
}
log->tail.blocks++; log->tail.blocks++;
if (!os_file_write_int_fd( if (!os_file_write_int_fd(
request, request,
"(modification log)", "(modification log)",
log->fd, log->fd,
log->tail.block, byte_offset, srv_sort_buf_size)) { buf, byte_offset, srv_sort_buf_size)) {
write_failed: write_failed:
log->error = DB_ONLINE_LOG_TOO_BIG; log->error = DB_ONLINE_LOG_TOO_BIG;
} }
UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size); UNIV_MEM_INVALID(log->tail.block, srv_sort_buf_size);
UNIV_MEM_INVALID(buf, srv_sort_buf_size);
memcpy(log->tail.block, log->tail.buf + avail, size - avail); memcpy(log->tail.block, log->tail.buf + avail, size - avail);
log->tail.bytes = size - avail; log->tail.bytes = size - avail;
} else { } else {
@ -536,11 +580,11 @@ err_exit:
} }
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
# define row_log_table_close(log, b, size, avail) \ # define row_log_table_close(index, b, size, avail) \
row_log_table_close_func(log, b, size, avail) row_log_table_close_func(index, b, size, avail)
#else /* UNIV_DEBUG */ #else /* UNIV_DEBUG */
# define row_log_table_close(log, b, size, avail) \ # define row_log_table_close(log, b, size, avail) \
row_log_table_close_func(log, size, avail) row_log_table_close_func(index, size, avail)
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
/** Check whether a virtual column is indexed in the new table being /** Check whether a virtual column is indexed in the new table being
@ -748,8 +792,7 @@ row_log_table_delete(
b += mach_read_from_2(b); b += mach_read_from_2(b);
} }
row_log_table_close( row_log_table_close(index, b, mrec_size, avail_size);
index->online_log, b, mrec_size, avail_size);
} }
func_exit: func_exit:
@ -911,8 +954,7 @@ row_log_table_low_redundant(
b += 2; b += 2;
} }
row_log_table_close( row_log_table_close(index, b, mrec_size, avail_size);
index->online_log, b, mrec_size, avail_size);
} }
mem_heap_free(heap); mem_heap_free(heap);
@ -1064,8 +1106,7 @@ row_log_table_low(
b += 2; b += 2;
} }
row_log_table_close( row_log_table_close(index, b, mrec_size, avail_size);
index->online_log, b, mrec_size, avail_size);
} }
} }
@ -2904,19 +2945,31 @@ all_done:
} }
IORequest request(IORequest::READ); IORequest request(IORequest::READ);
byte* buf = index->online_log->head.block;
if (!os_file_read_no_error_handling_int_fd( if (!os_file_read_no_error_handling_int_fd(
request, request, index->online_log->fd,
index->online_log->fd, buf, ofs, srv_sort_buf_size)) {
index->online_log->head.block, ofs,
srv_sort_buf_size)) {
ib::error() ib::error()
<< "Unable to read temporary file" << "Unable to read temporary file"
" for table " << index->table_name; " for table " << index->table_name;
goto corruption; goto corruption;
} }
if (log_tmp_is_encrypted()) {
if (!log_tmp_block_decrypt(
buf, srv_sort_buf_size,
index->online_log->crypt_head,
ofs, index->table->space)) {
error = DB_DECRYPTION_FAILED;
goto func_exit;
}
srv_stats.n_rowlog_blocks_decrypted.inc();
memcpy(buf, index->online_log->crypt_head,
srv_sort_buf_size);
}
#ifdef POSIX_FADV_DONTNEED #ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */ /* Each block is read exactly once. Free up the file cache. */
posix_fadvise(index->online_log->fd, posix_fadvise(index->online_log->fd,
@ -3216,6 +3269,7 @@ row_log_allocate(
log->tail.blocks = log->tail.bytes = 0; log->tail.blocks = log->tail.bytes = 0;
log->tail.total = 0; log->tail.total = 0;
log->tail.block = log->head.block = NULL; log->tail.block = log->head.block = NULL;
log->crypt_tail = log->crypt_head = NULL;
log->head.blocks = log->head.bytes = 0; log->head.blocks = log->head.bytes = 0;
log->head.total = 0; log->head.total = 0;
log->path = path; log->path = path;
@ -3225,6 +3279,17 @@ row_log_allocate(
dict_index_set_online_status(index, ONLINE_INDEX_CREATION); dict_index_set_online_status(index, ONLINE_INDEX_CREATION);
index->online_log = log; index->online_log = log;
if (log_tmp_is_encrypted()) {
ulint size = srv_sort_buf_size;
log->crypt_head = static_cast<byte *>(os_mem_alloc_large(&size));
log->crypt_tail = static_cast<byte *>(os_mem_alloc_large(&size));
if (!log->crypt_head || !log->crypt_tail) {
row_log_free(log);
DBUG_RETURN(false);
}
}
/* While we might be holding an exclusive data dictionary lock /* While we might be holding an exclusive data dictionary lock
here, in row_log_abort_sec() we will not always be holding it. Use here, in row_log_abort_sec() we will not always be holding it. Use
atomic operations in both cases. */ atomic operations in both cases. */
@ -3246,6 +3311,15 @@ row_log_free(
row_log_block_free(log->tail); row_log_block_free(log->tail);
row_log_block_free(log->head); row_log_block_free(log->head);
row_merge_file_destroy_low(log->fd); row_merge_file_destroy_low(log->fd);
if (log->crypt_head) {
os_mem_free_large(log->crypt_head, srv_sort_buf_size);
}
if (log->crypt_tail) {
os_mem_free_large(log->crypt_tail, srv_sort_buf_size);
}
mutex_free(&log->mutex); mutex_free(&log->mutex);
ut_free(log); ut_free(log);
log = NULL; log = NULL;
@ -3740,17 +3814,30 @@ all_done:
goto func_exit; goto func_exit;
} }
byte* buf = index->online_log->head.block;
if (!os_file_read_no_error_handling_int_fd( if (!os_file_read_no_error_handling_int_fd(
request, request, index->online_log->fd,
index->online_log->fd, buf, ofs, srv_sort_buf_size)) {
index->online_log->head.block, ofs,
srv_sort_buf_size)) {
ib::error() ib::error()
<< "Unable to read temporary file" << "Unable to read temporary file"
" for index " << index->name; " for index " << index->name;
goto corruption; goto corruption;
} }
if (log_tmp_is_encrypted()) {
if (!log_tmp_block_decrypt(
buf, srv_sort_buf_size,
index->online_log->crypt_head,
ofs, index->table->space)) {
error = DB_DECRYPTION_FAILED;
goto func_exit;
}
srv_stats.n_rowlog_blocks_decrypted.inc();
memcpy(buf, index->online_log->crypt_head, srv_sort_buf_size);
}
#ifdef POSIX_FADV_DONTNEED #ifdef POSIX_FADV_DONTNEED
/* Each block is read exactly once. Free up the file cache. */ /* Each block is read exactly once. Free up the file cache. */
posix_fadvise(index->online_log->fd, posix_fadvise(index->online_log->fd,

View File

@ -37,6 +37,7 @@ Completed by Sunny Bains and Marko Makela
#include "row0log.h" #include "row0log.h"
#include "row0ins.h" #include "row0ins.h"
#include "row0sel.h" #include "row0sel.h"
#include "log0crypt.h"
#include "dict0crea.h" #include "dict0crea.h"
#include "trx0purge.h" #include "trx0purge.h"
#include "lock0lock.h" #include "lock0lock.h"
@ -276,92 +277,6 @@ private:
/* Maximum pending doc memory limit in bytes for a fts tokenization thread */ /* Maximum pending doc memory limit in bytes for a fts tokenization thread */
#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000 #define FTS_PENDING_DOC_MEMORY_LIMIT 1000000
/******************************************************//**
Encrypt a merge block. */
static
void
row_merge_encrypt_buf(
/*==================*/
fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
ulint offset, /*!< in: offset where to
write */
ulint space, /*!< in: tablespace id */
const byte* input_buf, /*!< in: input buffer */
byte* crypted_buf) /*!< out: crypted buffer */
{
uint key_version;
uint dstlen=0;
uint ofs = (uint)(srv_sort_buf_size * offset);
key_version = encryption_key_get_latest_version(crypt_data->key_id);
/* Store key_version at the beginning of the input buffer */
mach_write_to_4((byte *)crypted_buf, key_version);
int rc = encryption_scheme_encrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
crypt_data, key_version,
space, ofs, 0);
if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
ib::fatal()
<< "Unable to encrypt data-block "
" src: " << static_cast<const void*>(input_buf)
<< " srclen: " << srv_sort_buf_size
<< " buf: " << static_cast<const void*>(crypted_buf)
<< " buflen: " << dstlen
<< ". return-code: " << rc << ". Can't continue!";
}
}
/******************************************************//**
Decrypt a merge block. */
static
bool
row_merge_decrypt_buf(
/*==================*/
fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
ulint offset, /*!< in: offset where to
write */
ulint space, /*!< in: tablespace id */
const byte* input_buf, /*!< in: input buffer */
byte* crypted_buf) /*!< out: crypted buffer */
{
uint key_version;
uint dstlen=0;
uint ofs = (uint)(srv_sort_buf_size * offset);
/* Read key_version from beginning of the buffer */
key_version = mach_read_from_4((byte *)input_buf);
if (key_version == 0) {
/* block not encrypted */
return false;
}
int rc = encryption_scheme_decrypt(input_buf+ROW_MERGE_RESERVE_SIZE,
srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE,
crypted_buf+ROW_MERGE_RESERVE_SIZE, &dstlen,
crypt_data, key_version,
space, ofs, 0);
if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
ib::fatal()
<< "Unable to decrypt data-block "
<< " src: " << static_cast<const void*>(input_buf)
<< " srclen: " << srv_sort_buf_size
<< " buf: " << static_cast<const void*>(crypted_buf)
<< " buflen: " << dstlen
<< ". return-code: " << rc << ". Can't continue!";
}
return true;
}
/* Maximum pending doc memory limit in bytes for a fts tokenization thread */
#define FTS_PENDING_DOC_MEMORY_LIMIT 1000000
/** Insert sorted data tuples to the index. /** Insert sorted data tuples to the index.
@param[in] index index to be inserted @param[in] index index to be inserted
@param[in] old_table old table @param[in] old_table old table
@ -388,7 +303,6 @@ row_merge_insert_index_tuples(
percent until now */ percent until now */
const double pct_cost, /*!< in: current progress percent const double pct_cost, /*!< in: current progress percent
*/ */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */ ulint space, /*!< in: space id */
ut_stage_alter_t* stage = NULL); ut_stage_alter_t* stage = NULL);
@ -473,7 +387,7 @@ row_merge_buf_create(
ulint buf_size; ulint buf_size;
mem_heap_t* heap; mem_heap_t* heap;
max_tuples = (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE) max_tuples = srv_sort_buf_size
/ ut_max(static_cast<ulint>(1), / ut_max(static_cast<ulint>(1),
dict_index_get_min_size(index)); dict_index_get_min_size(index));
@ -921,7 +835,7 @@ row_merge_buf_add(
ut_ad(data_size < srv_sort_buf_size); ut_ad(data_size < srv_sort_buf_size);
/* Reserve bytes for the end marker of row_merge_block_t. */ /* Reserve bytes for the end marker of row_merge_block_t. */
if (buf->total_size + data_size >= (srv_sort_buf_size - ROW_MERGE_RESERVE_SIZE)) { if (buf->total_size + data_size >= srv_sort_buf_size) {
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -1043,7 +957,7 @@ respectively */
/**********************************************************************//** /**********************************************************************//**
Merge sort the tuple buffer in main memory. */ Merge sort the tuple buffer in main memory. */
static MY_ATTRIBUTE((nonnull(4,5))) static
void void
row_merge_tuple_sort( row_merge_tuple_sort(
/*=================*/ /*=================*/
@ -1094,7 +1008,7 @@ row_merge_buf_write(
{ {
const dict_index_t* index = buf->index; const dict_index_t* index = buf->index;
ulint n_fields= dict_index_get_n_fields(index); ulint n_fields= dict_index_get_n_fields(index);
byte* b = &block[ROW_MERGE_RESERVE_SIZE]; byte* b = &block[0];
DBUG_ENTER("row_merge_buf_write"); DBUG_ENTER("row_merge_buf_write");
@ -1113,7 +1027,7 @@ row_merge_buf_write(
/* Write an "end-of-chunk" marker. */ /* Write an "end-of-chunk" marker. */
ut_a(b < &block[srv_sort_buf_size]); ut_a(b < &block[srv_sort_buf_size]);
ut_a(b == &block[0] + buf->total_size + ROW_MERGE_RESERVE_SIZE); ut_a(b == &block[0] + buf->total_size);
*b++ = 0; *b++ = 0;
#ifdef UNIV_DEBUG_VALGRIND #ifdef UNIV_DEBUG_VALGRIND
/* The rest of the block is uninitialized. Initialize it /* The rest of the block is uninitialized. Initialize it
@ -1158,7 +1072,7 @@ row_merge_heap_create(
} }
/** Read a merge block from the file system. /** Read a merge block from the file system.
@return whether the request was successful */ @return whether the request was completed successfully */
bool bool
row_merge_read( row_merge_read(
/*===========*/ /*===========*/
@ -1167,9 +1081,8 @@ row_merge_read(
in number of row_merge_block_t in number of row_merge_block_t
elements */ elements */
row_merge_block_t* buf, /*!< out: data */ row_merge_block_t* buf, /*!< out: data */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
{ {
os_offset_t ofs = ((os_offset_t) offset) * srv_sort_buf_size; os_offset_t ofs = ((os_offset_t) offset) * srv_sort_buf_size;
@ -1182,10 +1095,14 @@ row_merge_read(
request, fd, buf, ofs, srv_sort_buf_size); request, fd, buf, ofs, srv_sort_buf_size);
/* For encrypted tables, decrypt data after reading and copy data */ /* For encrypted tables, decrypt data after reading and copy data */
if (crypt_data && crypt_buf) { if (log_tmp_is_encrypted()) {
if (row_merge_decrypt_buf(crypt_data, offset, space, buf, crypt_buf)) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size,
memcpy(buf, crypt_buf, srv_sort_buf_size); crypt_buf, ofs, space)) {
return (FALSE);
} }
srv_stats.n_merge_blocks_decrypted.inc();
memcpy(buf, crypt_buf, srv_sort_buf_size);
} }
#ifdef POSIX_FADV_DONTNEED #ifdef POSIX_FADV_DONTNEED
@ -1202,15 +1119,15 @@ row_merge_read(
/********************************************************************//** /********************************************************************//**
Write a merge block to the file system. Write a merge block to the file system.
@return TRUE if request was successful, FALSE if fail */ @return whether the request was completed successfully */
ibool UNIV_INTERN
bool
row_merge_write( row_merge_write(
/*============*/ /*============*/
int fd, /*!< in: file descriptor */ int fd, /*!< in: file descriptor */
ulint offset, /*!< in: offset where to write, ulint offset, /*!< in: offset where to write,
in number of row_merge_block_t elements */ in number of row_merge_block_t elements */
const void* buf, /*!< in: data */ const void* buf, /*!< in: data */
fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
void* crypt_buf, /*!< in: crypt buf or NULL */ void* crypt_buf, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
{ {
@ -1222,12 +1139,17 @@ row_merge_write(
DBUG_LOG("ib_merge_sort", "fd=" << fd << " ofs=" << ofs); DBUG_LOG("ib_merge_sort", "fd=" << fd << " ofs=" << ofs);
DBUG_EXECUTE_IF("row_merge_write_failure", DBUG_RETURN(FALSE);); DBUG_EXECUTE_IF("row_merge_write_failure", DBUG_RETURN(FALSE););
if (crypt_data && crypt_buf) { /* For encrypted tables, encrypt data before writing */
row_merge_encrypt_buf(crypt_data, offset, space, (const byte *)buf, (byte *)crypt_buf); if (log_tmp_is_encrypted()) {
if (!log_tmp_block_encrypt(static_cast<const byte*>(buf),
buf_len,
static_cast<byte*>(crypt_buf),
ofs, space)) {
return false;
}
srv_stats.n_merge_blocks_encrypted.inc();
out_buf = crypt_buf; out_buf = crypt_buf;
} else {
/* Mark block unencrypted */
mach_write_to_4((byte *)out_buf, 0);
} }
IORequest request(IORequest::WRITE); IORequest request(IORequest::WRITE);
@ -1259,9 +1181,8 @@ row_merge_read_rec(
or NULL on end of list or NULL on end of list
(non-NULL on I/O error) */ (non-NULL on I/O error) */
ulint* offsets,/*!< out: offsets of mrec */ ulint* offsets,/*!< out: offsets of mrec */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
{ {
ulint extra_size; ulint extra_size;
ulint data_size; ulint data_size;
@ -1275,10 +1196,6 @@ row_merge_read_rec(
DBUG_ENTER("row_merge_read_rec"); DBUG_ENTER("row_merge_read_rec");
if (b == &block[0]) {
b+= ROW_MERGE_RESERVE_SIZE;
}
extra_size = *b++; extra_size = *b++;
if (UNIV_UNLIKELY(!extra_size)) { if (UNIV_UNLIKELY(!extra_size)) {
@ -1296,7 +1213,8 @@ row_merge_read_rec(
if (UNIV_UNLIKELY(b >= &block[srv_sort_buf_size])) { if (UNIV_UNLIKELY(b >= &block[srv_sort_buf_size])) {
if (!row_merge_read(fd, ++(*foffs), block, if (!row_merge_read(fd, ++(*foffs), block,
crypt_data, crypt_block, space)) { crypt_block,
space)) {
err_exit: err_exit:
/* Signal I/O error. */ /* Signal I/O error. */
*mrec = b; *mrec = b;
@ -1304,7 +1222,7 @@ err_exit:
} }
/* Wrap around to the beginning of the buffer. */ /* Wrap around to the beginning of the buffer. */
b = &block[ROW_MERGE_RESERVE_SIZE]; b = &block[0];
} }
extra_size = (extra_size & 0x7f) << 8; extra_size = (extra_size & 0x7f) << 8;
@ -1326,13 +1244,14 @@ err_exit:
memcpy(*buf, b, avail_size); memcpy(*buf, b, avail_size);
if (!row_merge_read(fd, ++(*foffs), block, if (!row_merge_read(fd, ++(*foffs), block,
crypt_data, crypt_block, space)) { crypt_block,
space)) {
goto err_exit; goto err_exit;
} }
/* Wrap around to the beginning of the buffer. */ /* Wrap around to the beginning of the buffer. */
b = &block[ROW_MERGE_RESERVE_SIZE]; b = &block[0];
/* Copy the record. */ /* Copy the record. */
memcpy(*buf + avail_size, b, extra_size - avail_size); memcpy(*buf + avail_size, b, extra_size - avail_size);
@ -1387,13 +1306,14 @@ err_exit:
ut_d(offsets[3] = (ulint) index); ut_d(offsets[3] = (ulint) index);
if (!row_merge_read(fd, ++(*foffs), block, if (!row_merge_read(fd, ++(*foffs), block,
crypt_data, crypt_block, space)) { crypt_block,
space)) {
goto err_exit; goto err_exit;
} }
/* Wrap around to the beginning of the buffer. */ /* Wrap around to the beginning of the buffer. */
b = &block[ROW_MERGE_RESERVE_SIZE]; b = &block[0];
/* Copy the rest of the record. */ /* Copy the rest of the record. */
memcpy(*buf + avail_size, b, extra_size + data_size - avail_size); memcpy(*buf + avail_size, b, extra_size + data_size - avail_size);
@ -1465,7 +1385,6 @@ row_merge_write_rec(
ulint* foffs, /*!< in/out: file offset */ ulint* foffs, /*!< in/out: file offset */
const mrec_t* mrec, /*!< in: record to write */ const mrec_t* mrec, /*!< in: record to write */
const ulint* offsets,/*!< in: offsets of mrec */ const ulint* offsets,/*!< in: offsets of mrec */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
{ {
@ -1488,10 +1407,6 @@ row_merge_write_rec(
size = extra_size + (extra_size >= 0x80) size = extra_size + (extra_size >= 0x80)
+ rec_offs_data_size(offsets); + rec_offs_data_size(offsets);
if (b == &block[0]) {
b+= ROW_MERGE_RESERVE_SIZE;
}
if (UNIV_UNLIKELY(b + size >= &block[srv_sort_buf_size])) { if (UNIV_UNLIKELY(b + size >= &block[srv_sort_buf_size])) {
/* The record spans two blocks. /* The record spans two blocks.
Copy it to the temporary buffer first. */ Copy it to the temporary buffer first. */
@ -1507,14 +1422,15 @@ row_merge_write_rec(
memcpy(b, buf[0], avail_size); memcpy(b, buf[0], avail_size);
if (!row_merge_write(fd, (*foffs)++, block, if (!row_merge_write(fd, (*foffs)++, block,
crypt_data, crypt_block, space)) { crypt_block,
space)) {
return(NULL); return(NULL);
} }
UNIV_MEM_INVALID(&block[0], srv_sort_buf_size); UNIV_MEM_INVALID(&block[0], srv_sort_buf_size);
/* Copy the rest. */ /* Copy the rest. */
b = &block[ROW_MERGE_RESERVE_SIZE]; b = &block[0];
memcpy(b, buf[0] + avail_size, size - avail_size); memcpy(b, buf[0] + avail_size, size - avail_size);
b += size - avail_size; b += size - avail_size;
} else { } else {
@ -1537,7 +1453,6 @@ row_merge_write_eof(
byte* b, /*!< in: pointer to end of block */ byte* b, /*!< in: pointer to end of block */
int fd, /*!< in: file descriptor */ int fd, /*!< in: file descriptor */
ulint* foffs, /*!< in/out: file offset */ ulint* foffs, /*!< in/out: file offset */
fil_space_crypt_t* crypt_data, /*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space) /*!< in: space id */ ulint space) /*!< in: space id */
{ {
@ -1552,10 +1467,6 @@ row_merge_write_eof(
reinterpret_cast<const void*>(block) << reinterpret_cast<const void*>(block) <<
",fd=" << fd << ',' << *foffs); ",fd=" << fd << ',' << *foffs);
if (b == &block[0]) {
b+= ROW_MERGE_RESERVE_SIZE;
}
*b++ = 0; *b++ = 0;
UNIV_MEM_ASSERT_RW(&block[0], b - &block[0]); UNIV_MEM_ASSERT_RW(&block[0], b - &block[0]);
UNIV_MEM_ASSERT_W(&block[0], srv_sort_buf_size); UNIV_MEM_ASSERT_W(&block[0], srv_sort_buf_size);
@ -1566,8 +1477,7 @@ row_merge_write_eof(
memset(b, 0xff, &block[srv_sort_buf_size] - b); memset(b, 0xff, &block[srv_sort_buf_size] - b);
#endif /* UNIV_DEBUG_VALGRIND */ #endif /* UNIV_DEBUG_VALGRIND */
if (!row_merge_write(fd, (*foffs)++, block, if (!row_merge_write(fd, (*foffs)++, block, crypt_block, space)) {
crypt_data, crypt_block, space)) {
DBUG_RETURN(NULL); DBUG_RETURN(NULL);
} }
@ -1767,6 +1677,8 @@ existing order
@param[in,out] stage performance schema accounting object, used by @param[in,out] stage performance schema accounting object, used by
ALTER TABLE. stage->n_pk_recs_inc() will be called for each record read and ALTER TABLE. stage->n_pk_recs_inc() will be called for each record read and
stage->inc() will be called for each page read. stage->inc() will be called for each page read.
@param[in] pct_cost percent of task weight out of total alter job
@param[in,out] crypt_block crypted file buffer
@param[in] eval_table mysql table used to evaluate virtual column @param[in] eval_table mysql table used to evaluate virtual column
value, see innobase_get_computed_value(). value, see innobase_get_computed_value().
@return DB_SUCCESS or error */ @return DB_SUCCESS or error */
@ -1794,10 +1706,8 @@ row_merge_read_clustered_index(
int* tmpfd, int* tmpfd,
ut_stage_alter_t* stage, ut_stage_alter_t* stage,
double pct_cost, double pct_cost,
fil_space_crypt_t* crypt_data,
row_merge_block_t* crypt_block, row_merge_block_t* crypt_block,
struct TABLE* eval_table) struct TABLE* eval_table)
{ {
dict_index_t* clust_index; /* Clustered index */ dict_index_t* clust_index; /* Clustered index */
mem_heap_t* row_heap; /* Heap memory to create mem_heap_t* row_heap; /* Heap memory to create
@ -2569,8 +2479,7 @@ write_buffers:
table_total_rows, table_total_rows,
curr_progress, curr_progress,
pct_cost, pct_cost,
NULL, crypt_block,
NULL,
new_table->space); new_table->space);
if (row == NULL) { if (row == NULL) {
@ -2681,8 +2590,7 @@ write_buffers:
table_total_rows, table_total_rows,
curr_progress, curr_progress,
pct_cost, pct_cost,
NULL, crypt_block,
NULL,
new_table->space); new_table->space);
err = btr_bulk.finish(err); err = btr_bulk.finish(err);
@ -2714,8 +2622,10 @@ write_buffers:
row_merge_buf_write(buf, file, block); row_merge_buf_write(buf, file, block);
if (!row_merge_write(file->fd, file->offset++, block, if (!row_merge_write(
crypt_data, crypt_block, new_table->space)) { file->fd, file->offset++,
block, crypt_block,
new_table->space)) {
err = DB_TEMP_FILE_WRITE_FAIL; err = DB_TEMP_FILE_WRITE_FAIL;
trx->error_key_num = i; trx->error_key_num = i;
break; break;
@ -2768,7 +2678,7 @@ write_buffers:
if(read_rows % 1000 == 0) { if(read_rows % 1000 == 0) {
/* Update progress for each 1000 rows */ /* Update progress for each 1000 rows */
curr_progress = (read_rows >= table_total_rows) ? curr_progress = (read_rows >= table_total_rows) ?
pct_cost : pct_cost :
((pct_cost * read_rows) / table_total_rows); ((pct_cost * read_rows) / table_total_rows);
/* presenting 10.12% as 1012 integer */ /* presenting 10.12% as 1012 integer */
onlineddl_pct_progress = (ulint) (curr_progress * 100); onlineddl_pct_progress = (ulint) (curr_progress * 100);
@ -2924,9 +2834,8 @@ wait_again:
&buf[2], b2, \ &buf[2], b2, \
of->fd, &of->offset, \ of->fd, &of->offset, \
mrec##N, offsets##N, \ mrec##N, offsets##N, \
crypt_data, \
crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL , \ crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL , \
space); \ space); \
if (UNIV_UNLIKELY(!b2 || ++of->n_rec > file->n_rec)) { \ if (UNIV_UNLIKELY(!b2 || ++of->n_rec > file->n_rec)) { \
goto corrupt; \ goto corrupt; \
} \ } \
@ -2934,7 +2843,6 @@ wait_again:
&buf[N], b##N, INDEX, \ &buf[N], b##N, INDEX, \
file->fd, foffs##N, \ file->fd, foffs##N, \
&mrec##N, offsets##N, \ &mrec##N, offsets##N, \
crypt_data, \
crypt_block ? &crypt_block[N * srv_sort_buf_size] : NULL, \ crypt_block ? &crypt_block[N * srv_sort_buf_size] : NULL, \
space); \ space); \
\ \
@ -2967,6 +2875,8 @@ wait_again:
@param[in,out] foffs1 offset of second source list in the file @param[in,out] foffs1 offset of second source list in the file
@param[in,out] of output file @param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by @param[in,out] stage performance schema accounting object, used by
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record ALTER TABLE. If not NULL stage->inc() will be called for each record
processed. processed.
@return DB_SUCCESS or error code */ @return DB_SUCCESS or error code */
@ -2980,10 +2890,8 @@ row_merge_blocks(
ulint* foffs1, ulint* foffs1,
merge_file_t* of, merge_file_t* of,
ut_stage_alter_t* stage, ut_stage_alter_t* stage,
fil_space_crypt_t* crypt_data,/*!< in: crypt data or NULL */ row_merge_block_t* crypt_block,
row_merge_block_t* crypt_block,/*!< in: in/out: crypted file ulint space)
buffer */
ulint space) /*!< in: space id */
{ {
mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */ mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */
@ -3009,9 +2917,11 @@ row_merge_blocks(
file in two halves, which can be merged on the following pass. */ file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0], if (!row_merge_read(file->fd, *foffs0, &block[0],
crypt_data, crypt_block ? &crypt_block[0] : NULL, space) crypt_block ? &crypt_block[0] : NULL,
|| !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size], space) ||
crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space)) { !row_merge_read(file->fd, *foffs1, &block[srv_sort_buf_size],
crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
space)) {
corrupt: corrupt:
mem_heap_free(heap); mem_heap_free(heap);
DBUG_RETURN(DB_CORRUPTION); DBUG_RETURN(DB_CORRUPTION);
@ -3024,13 +2934,15 @@ corrupt:
b0 = row_merge_read_rec( b0 = row_merge_read_rec(
&block[0], &buf[0], b0, dup->index, &block[0], &buf[0], b0, dup->index,
file->fd, foffs0, &mrec0, offsets0, file->fd, foffs0, &mrec0, offsets0,
crypt_data, crypt_block ? &crypt_block[0] : NULL, space); crypt_block ? &crypt_block[0] : NULL,
space);
b1 = row_merge_read_rec( b1 = row_merge_read_rec(
&block[srv_sort_buf_size], &block[srv_sort_buf_size],
&buf[srv_sort_buf_size], b1, dup->index, &buf[srv_sort_buf_size], b1, dup->index,
file->fd, foffs1, &mrec1, offsets1, file->fd, foffs1, &mrec1, offsets1,
crypt_data, crypt_block ? &crypt_block[srv_sort_buf_size] : NULL, space); crypt_block ? &crypt_block[srv_sort_buf_size] : NULL,
space);
if (UNIV_UNLIKELY(!b0 && mrec0) if (UNIV_UNLIKELY(!b0 && mrec0)
|| UNIV_UNLIKELY(!b1 && mrec1)) { || UNIV_UNLIKELY(!b1 && mrec1)) {
@ -3070,11 +2982,12 @@ done1:
mem_heap_free(heap); mem_heap_free(heap);
b2 = row_merge_write_eof(&block[2 * srv_sort_buf_size], b2 = row_merge_write_eof(
&block[2 * srv_sort_buf_size],
b2, of->fd, &of->offset, b2, of->fd, &of->offset,
crypt_data, crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space); crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL,
space);
DBUG_RETURN(b2 ? DB_SUCCESS : DB_CORRUPTION); DBUG_RETURN(b2 ? DB_SUCCESS : DB_CORRUPTION);
} }
/** Copy a block of index entries. /** Copy a block of index entries.
@ -3084,6 +2997,8 @@ done1:
@param[in,out] foffs0 input file offset @param[in,out] foffs0 input file offset
@param[in,out] of output file @param[in,out] of output file
@param[in,out] stage performance schema accounting object, used by @param[in,out] stage performance schema accounting object, used by
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record ALTER TABLE. If not NULL stage->inc() will be called for each record
processed. processed.
@return TRUE on success, FALSE on failure */ @return TRUE on success, FALSE on failure */
@ -3096,9 +3011,8 @@ row_merge_blocks_copy(
ulint* foffs0, ulint* foffs0,
merge_file_t* of, merge_file_t* of,
ut_stage_alter_t* stage, ut_stage_alter_t* stage,
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block,
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ ulint space)
ulint space) /*!< in: space id */
{ {
mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */ mem_heap_t* heap; /*!< memory heap for offsets0, offsets1 */
@ -3121,7 +3035,8 @@ row_merge_blocks_copy(
file in two halves, which can be merged on the following pass. */ file in two halves, which can be merged on the following pass. */
if (!row_merge_read(file->fd, *foffs0, &block[0], if (!row_merge_read(file->fd, *foffs0, &block[0],
crypt_data, crypt_block ? &crypt_block[0] : NULL, space)) { crypt_block ? &crypt_block[0] : NULL,
space)) {
corrupt: corrupt:
mem_heap_free(heap); mem_heap_free(heap);
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
@ -3133,7 +3048,8 @@ corrupt:
b0 = row_merge_read_rec(&block[0], &buf[0], b0, index, b0 = row_merge_read_rec(&block[0], &buf[0], b0, index,
file->fd, foffs0, &mrec0, offsets0, file->fd, foffs0, &mrec0, offsets0,
crypt_data, crypt_block ? &crypt_block[0] : NULL, space); crypt_block ? &crypt_block[0] : NULL,
space);
if (UNIV_UNLIKELY(!b0 && mrec0)) { if (UNIV_UNLIKELY(!b0 && mrec0)) {
@ -3154,10 +3070,12 @@ done0:
mem_heap_free(heap); mem_heap_free(heap);
DBUG_RETURN(row_merge_write_eof(&block[2 * srv_sort_buf_size], DBUG_RETURN(row_merge_write_eof(
b2, of->fd, &of->offset, &block[2 * srv_sort_buf_size],
crypt_data, b2, of->fd, &of->offset,
crypt_block ? &crypt_block[2 * srv_sort_buf_size] : NULL, space) crypt_block
? &crypt_block[2 * srv_sort_buf_size]
: NULL, space)
!= NULL); != NULL);
} }
@ -3171,6 +3089,8 @@ done0:
@param[in,out] run_offset Array that contains the first offset number @param[in,out] run_offset Array that contains the first offset number
for each merge run for each merge run
@param[in,out] stage performance schema accounting object, used by @param[in,out] stage performance schema accounting object, used by
@param[in,out] crypt_block encryption buffer
@param[in] space tablespace ID for encryption
ALTER TABLE. If not NULL stage->inc() will be called for each record ALTER TABLE. If not NULL stage->inc() will be called for each record
processed. processed.
@return DB_SUCCESS or error code */ @return DB_SUCCESS or error code */
@ -3185,9 +3105,8 @@ row_merge(
ulint* num_run, ulint* num_run,
ulint* run_offset, ulint* run_offset,
ut_stage_alter_t* stage, ut_stage_alter_t* stage,
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block,
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ ulint space)
ulint space) /*!< in: space id */
{ {
ulint foffs0; /*!< first input offset */ ulint foffs0; /*!< first input offset */
ulint foffs1; /*!< second input offset */ ulint foffs1; /*!< second input offset */
@ -3235,7 +3154,7 @@ row_merge(
error = row_merge_blocks(dup, file, block, error = row_merge_blocks(dup, file, block,
&foffs0, &foffs1, &of, stage, &foffs0, &foffs1, &of, stage,
crypt_data, crypt_block, space); crypt_block, space);
if (error != DB_SUCCESS) { if (error != DB_SUCCESS) {
return(error); return(error);
@ -3256,7 +3175,7 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block, if (!row_merge_blocks_copy(dup->index, file, block,
&foffs0, &of, stage, &foffs0, &of, stage,
crypt_data, crypt_block, space)) { crypt_block, space)) {
return(DB_CORRUPTION); return(DB_CORRUPTION);
} }
} }
@ -3274,7 +3193,7 @@ row_merge(
if (!row_merge_blocks_copy(dup->index, file, block, if (!row_merge_blocks_copy(dup->index, file, block,
&foffs1, &of, stage, &foffs1, &of, stage,
crypt_data, crypt_block, space)) { crypt_block, space)) {
return(DB_CORRUPTION); return(DB_CORRUPTION);
} }
} }
@ -3332,7 +3251,6 @@ row_merge_sort(
/*!< in: total progress percent /*!< in: total progress percent
until now */ until now */
const double pct_cost, /*!< in: current progress percent */ const double pct_cost, /*!< in: current progress percent */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */ ulint space, /*!< in: space id */
ut_stage_alter_t* stage) ut_stage_alter_t* stage)
@ -3407,7 +3325,7 @@ row_merge_sort(
error = row_merge(trx, dup, file, block, tmpfd, error = row_merge(trx, dup, file, block, tmpfd,
&num_runs, run_offset, stage, &num_runs, run_offset, stage,
crypt_data, crypt_block, space); crypt_block, space);
if(update_progress) { if(update_progress) {
merge_count++; merge_count++;
@ -3548,7 +3466,6 @@ row_merge_insert_index_tuples(
percent until now */ percent until now */
const double pct_cost, /*!< in: current progress percent const double pct_cost, /*!< in: current progress percent
*/ */
fil_space_crypt_t* crypt_data,/*!< in: table crypt data */
row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */
ulint space, /*!< in: space id */ ulint space, /*!< in: space id */
ut_stage_alter_t* stage) ut_stage_alter_t* stage)
@ -3608,8 +3525,7 @@ row_merge_insert_index_tuples(
b = block; b = block;
dtuple = NULL; dtuple = NULL;
if (!row_merge_read(fd, foffs, block, if (!row_merge_read(fd, foffs, block, crypt_block, space)) {
crypt_data, crypt_block, space)) {
error = DB_CORRUPTION; error = DB_CORRUPTION;
goto err_exit; goto err_exit;
} else { } else {
@ -3641,7 +3557,9 @@ row_merge_insert_index_tuples(
} else { } else {
b = row_merge_read_rec(block, buf, b, index, b = row_merge_read_rec(block, buf, b, index,
fd, &foffs, &mrec, offsets, fd, &foffs, &mrec, offsets,
crypt_data, crypt_block, space); crypt_block,
space);
if (UNIV_UNLIKELY(!b)) { if (UNIV_UNLIKELY(!b)) {
/* End of list, or I/O error */ /* End of list, or I/O error */
if (mrec) { if (mrec) {
@ -4740,7 +4658,6 @@ row_merge_build_indexes(
fts_psort_t* merge_info = NULL; fts_psort_t* merge_info = NULL;
int64_t sig_count = 0; int64_t sig_count = 0;
bool fts_psort_initiated = false; bool fts_psort_initiated = false;
fil_space_crypt_t * crypt_data = NULL;
double total_static_cost = 0; double total_static_cost = 0;
double total_dynamic_cost = 0; double total_dynamic_cost = 0;
@ -4771,28 +4688,14 @@ row_merge_build_indexes(
DBUG_RETURN(DB_OUT_OF_MEMORY); DBUG_RETURN(DB_OUT_OF_MEMORY);
} }
/* Get crypt data from tablespace if present. We should be protected if (log_tmp_is_encrypted()) {
from concurrent DDL (e.g. drop table) by MDL-locks. */
FilSpace space(new_table->space);
if (const fil_space_t* fs = space()) {
crypt_data = fs->crypt_data;
} else {
DBUG_RETURN(DB_TABLESPACE_NOT_FOUND);
}
/* If tablespace is encrypted, allocate additional buffer for
encryption/decryption. */
if (crypt_data && crypt_data->should_encrypt()) {
crypt_block = static_cast<row_merge_block_t*>( crypt_block = static_cast<row_merge_block_t*>(
alloc.allocate_large(3 * srv_sort_buf_size, &crypt_pfx)); alloc.allocate_large(3 * srv_sort_buf_size,
&crypt_pfx));
if (crypt_block == NULL) { if (crypt_block == NULL) {
DBUG_RETURN(DB_OUT_OF_MEMORY); DBUG_RETURN(DB_OUT_OF_MEMORY);
} }
} else {
/* Not needed */
crypt_data = NULL;
} }
trx_start_if_not_started_xa(trx, true); trx_start_if_not_started_xa(trx, true);
@ -4895,11 +4798,11 @@ row_merge_build_indexes(
/* Read clustered index of the table and create files for /* Read clustered index of the table and create files for
secondary index entries for merge sort */ secondary index entries for merge sort */
error = row_merge_read_clustered_index( error = row_merge_read_clustered_index(
trx, table, old_table, new_table, online, indexes, trx, table, old_table, new_table, online, indexes,
fts_sort_idx, psort_info, merge_files, key_numbers, fts_sort_idx, psort_info, merge_files, key_numbers,
n_indexes, add_cols, add_v, col_map, add_autoinc, n_indexes, add_cols, add_v, col_map, add_autoinc,
sequence, block, skip_pk_sort, &tmpfd, stage, sequence, block, skip_pk_sort, &tmpfd, stage,
pct_cost, crypt_data, crypt_block, eval_table); pct_cost, crypt_block, eval_table);
stage->end_phase_read_pk(); stage->end_phase_read_pk();
@ -4924,10 +4827,6 @@ row_merge_build_indexes(
/* Now we have files containing index entries ready for /* Now we have files containing index entries ready for
sorting and inserting. */ sorting and inserting. */
DBUG_EXECUTE_IF(
"ib_merge_wait_after_read",
os_thread_sleep(20000000);); /* 20 sec */
for (i = 0; i < n_indexes; i++) { for (i = 0; i < n_indexes; i++) {
dict_index_t* sort_idx = indexes[i]; dict_index_t* sort_idx = indexes[i];
@ -5040,7 +4939,7 @@ wait_again:
trx, &dup, &merge_files[i], trx, &dup, &merge_files[i],
block, &tmpfd, true, block, &tmpfd, true,
pct_progress, pct_cost, pct_progress, pct_cost,
crypt_data, crypt_block, new_table->space, stage); crypt_block, new_table->space, stage);
pct_progress += pct_cost; pct_progress += pct_cost;
@ -5083,7 +4982,7 @@ wait_again:
merge_files[i].fd, block, NULL, merge_files[i].fd, block, NULL,
&btr_bulk, &btr_bulk,
merge_files[i].n_rec, pct_progress, pct_cost, merge_files[i].n_rec, pct_progress, pct_cost,
crypt_data, crypt_block, new_table->space, stage); crypt_block, new_table->space, stage);
error = btr_bulk.finish(error); error = btr_bulk.finish(error);

View File

@ -2285,22 +2285,6 @@ no_unlock:
trx->op_info = ""; trx->op_info = "";
} }
/*********************************************************************//**
Checks if a table is such that we automatically created a clustered
index on it (on row id).
@return TRUE if the clustered index was generated automatically */
ibool
row_table_got_default_clust_index(
/*==============================*/
const dict_table_t* table) /*!< in: table */
{
const dict_index_t* clust_index;
clust_index = dict_table_get_first_index(table);
return(dict_index_get_nth_col(clust_index, 0)->mtype == DATA_SYS);
}
/*********************************************************************//** /*********************************************************************//**
Locks the data dictionary in shared mode from modifications, for performing Locks the data dictionary in shared mode from modifications, for performing
foreign key check, rollback, or other operation invisible to MySQL. */ foreign key check, rollback, or other operation invisible to MySQL. */

View File

@ -460,19 +460,18 @@ func_exit:
@param[in] node query node @param[in] node query node
@param[in] trx transaction @param[in] trx transaction
@return whether the node cannot be ignored */ @return whether the node cannot be ignored */
static inline
bool bool
wsrep_must_process_fk(const upd_node_t* node, const trx_t* trx) wsrep_must_process_fk(const upd_node_t* node, const trx_t* trx)
{ {
if (que_node_get_type(node->common.parent) != QUE_NODE_UPDATE if (que_node_get_type(node->common.parent) != QUE_NODE_UPDATE ||
|| !wsrep_on(trx->mysql_thd)) { !wsrep_on(trx->mysql_thd)) {
return false; return false;
} }
const upd_cascade_t& nodes = *static_cast<const upd_node_t*>( const upd_node_t* parent = static_cast<const upd_node_t*>(node->common.parent);
node->common.parent)->cascade_upd_nodes;
const upd_cascade_t::const_iterator end = nodes.end(); return parent->cascade_upd_nodes->empty();
return std::find(nodes.begin(), end, node) == end;
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
@ -2443,6 +2442,7 @@ row_upd_sec_index_entry(
if (!referenced && foreign if (!referenced && foreign
&& wsrep_must_process_fk(node, trx) && wsrep_must_process_fk(node, trx)
&& !wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { && !wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
ulint* offsets = rec_get_offsets( ulint* offsets = rec_get_offsets(
rec, index, NULL, ULINT_UNDEFINED, rec, index, NULL, ULINT_UNDEFINED,
&heap); &heap);
@ -2748,6 +2748,9 @@ check_fk:
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
} else if (foreign && wsrep_must_process_fk(node, trx)) { } else if (foreign && wsrep_must_process_fk(node, trx)) {
err = wsrep_row_upd_check_foreign_constraints(
node, pcur, table, index, offsets, thr, mtr);
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_NO_REFERENCED_ROW: case DB_NO_REFERENCED_ROW:
@ -2759,16 +2762,11 @@ check_fk:
<< " index " << index->name << " index " << index->name
<< " table " << index->table->name; << " table " << index->table->name;
} }
break; goto err_exit;
default: default:
ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err)
<< " index " << index->name << " index " << index->name
<< " table " << index->table->name; << " table " << index->table->name;
break;
}
if (err != DB_SUCCESS) {
goto err_exit; goto err_exit;
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
@ -2955,6 +2953,7 @@ row_upd_del_mark_clust_rec(
dberr_t err; dberr_t err;
rec_t* rec; rec_t* rec;
trx_t* trx = thr_get_trx(thr); trx_t* trx = thr_get_trx(thr);
ut_ad(node); ut_ad(node);
ut_ad(dict_index_is_clust(index)); ut_ad(dict_index_is_clust(index));
ut_ad(node->is_delete); ut_ad(node->is_delete);
@ -2987,6 +2986,7 @@ row_upd_del_mark_clust_rec(
} else if (foreign && wsrep_must_process_fk(node, trx)) { } else if (foreign && wsrep_must_process_fk(node, trx)) {
err = wsrep_row_upd_check_foreign_constraints( err = wsrep_row_upd_check_foreign_constraints(
node, pcur, index->table, index, offsets, thr, mtr); node, pcur, index->table, index, offsets, thr, mtr);
switch (err) { switch (err) {
case DB_SUCCESS: case DB_SUCCESS:
case DB_NO_REFERENCED_ROW: case DB_NO_REFERENCED_ROW:

View File

@ -1601,6 +1601,10 @@ srv_export_innodb_status(void)
export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error; export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error;
export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted; export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted;
export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted; export_vars.innodb_pages_encrypted = srv_stats.pages_encrypted;
export_vars.innodb_n_merge_blocks_encrypted = srv_stats.n_merge_blocks_encrypted;
export_vars.innodb_n_merge_blocks_decrypted = srv_stats.n_merge_blocks_decrypted;
export_vars.innodb_n_rowlog_blocks_encrypted = srv_stats.n_rowlog_blocks_encrypted;
export_vars.innodb_n_rowlog_blocks_decrypted = srv_stats.n_rowlog_blocks_decrypted;
export_vars.innodb_defragment_compression_failures = export_vars.innodb_defragment_compression_failures =
btr_defragment_compression_failures; btr_defragment_compression_failures;

View File

@ -1137,21 +1137,21 @@ int json_path_setup(json_path_t *p,
case PS_EKY: case PS_EKY:
p->last_step->key_end= p->s.c_str - c_len; p->last_step->key_end= p->s.c_str - c_len;
state= PS_KEY; state= PS_KEY;
/* Note no 'continue' here. */ /* fall through */
case PS_KEY: case PS_KEY:
p->last_step++; p->last_step++;
if (p->last_step - p->steps >= JSON_DEPTH_LIMIT) if (p->last_step - p->steps >= JSON_DEPTH_LIMIT)
return p->s.error= JE_DEPTH; return p->s.error= JE_DEPTH;
p->types_used|= p->last_step->type= JSON_PATH_KEY | double_wildcard; p->types_used|= p->last_step->type= JSON_PATH_KEY | double_wildcard;
double_wildcard= JSON_PATH_KEY_NULL; double_wildcard= JSON_PATH_KEY_NULL;
/* Note no 'continue' here. */ /* fall through */
case PS_KEYX: case PS_KEYX:
p->last_step->key= p->s.c_str; p->last_step->key= p->s.c_str;
continue; continue;
case PS_EAR: case PS_EAR:
p->last_step->key_end= p->s.c_str - c_len; p->last_step->key_end= p->s.c_str - c_len;
state= PS_AR; state= PS_AR;
/* Note no 'continue' here. */ /* fall through */
case PS_AR: case PS_AR:
p->last_step++; p->last_step++;
if (p->last_step - p->steps >= JSON_DEPTH_LIMIT) if (p->last_step - p->steps >= JSON_DEPTH_LIMIT)
@ -1445,7 +1445,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
/* Path already failed. */ /* Path already failed. */
continue; continue;
if (state->paths[p_c].steps[state->cur_depth].type & if (state->paths[p_c].steps[state->cur_depth].type &
(je->state == JST_OBJ_START) ? JSON_PATH_KEY : JSON_PATH_ARRAY) ((je->state == JST_OBJ_START) ? JSON_PATH_KEY : JSON_PATH_ARRAY))
state->path_depths[p_c]++; state->path_depths[p_c]++;
} }
state->cur_depth++; state->cur_depth++;
@ -1703,6 +1703,7 @@ int json_get_path_next(json_engine_t *je, json_path_t *p)
return 1; return 1;
/* Now we have je.state == JST_VALUE, so let's handle it. */ /* Now we have je.state == JST_VALUE, so let's handle it. */
/* fall through */
case JST_VALUE: case JST_VALUE:
if (json_read_value(je)) if (json_read_value(je))
return 1; return 1;