WL#751 Error message construction, backport
This commit is contained in:
parent
3929dddcd7
commit
d8c3f2263f
@ -80,5 +80,6 @@ enum options_client
|
|||||||
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
|
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
|
||||||
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
|
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
|
||||||
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
|
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
|
||||||
|
OPT_INIT_COMMAND,
|
||||||
OPT_MAX_CLIENT_OPTION
|
OPT_MAX_CLIENT_OPTION
|
||||||
};
|
};
|
||||||
|
@ -155,7 +155,8 @@ static char * opt_mysql_unix_port=0;
|
|||||||
static int connect_flag=CLIENT_INTERACTIVE;
|
static int connect_flag=CLIENT_INTERACTIVE;
|
||||||
static char *current_host,*current_db,*current_user=0,*opt_password=0,
|
static char *current_host,*current_db,*current_user=0,*opt_password=0,
|
||||||
*current_prompt=0, *delimiter_str= 0,
|
*current_prompt=0, *delimiter_str= 0,
|
||||||
*default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
|
*default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME,
|
||||||
|
*opt_init_command= 0;
|
||||||
static char *histfile;
|
static char *histfile;
|
||||||
static char *histfile_tmp;
|
static char *histfile_tmp;
|
||||||
static String glob_buffer,old_buffer;
|
static String glob_buffer,old_buffer;
|
||||||
@ -1384,6 +1385,10 @@ static struct my_option my_long_options[] =
|
|||||||
{"ignore-spaces", 'i', "Ignore space after function names.",
|
{"ignore-spaces", 'i', "Ignore space after function names.",
|
||||||
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||||
0, 0, 0, 0},
|
0, 0, 0, 0},
|
||||||
|
{"init-command", OPT_INIT_COMMAND,
|
||||||
|
"SQL Command to execute when connecting to MySQL server. Will automatically be re-executed when reconnecting.",
|
||||||
|
(uchar**) &opt_init_command, (uchar**) &opt_init_command, 0,
|
||||||
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
|
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
|
||||||
(uchar**) &opt_local_infile,
|
(uchar**) &opt_local_infile,
|
||||||
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -4203,6 +4208,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
|
|||||||
mysql_close(&mysql);
|
mysql_close(&mysql);
|
||||||
}
|
}
|
||||||
mysql_init(&mysql);
|
mysql_init(&mysql);
|
||||||
|
if (opt_init_command)
|
||||||
|
mysql_options(&mysql, MYSQL_INIT_COMMAND, opt_init_command);
|
||||||
if (opt_connect_timeout)
|
if (opt_connect_timeout)
|
||||||
{
|
{
|
||||||
uint timeout=opt_connect_timeout;
|
uint timeout=opt_connect_timeout;
|
||||||
|
@ -29,8 +29,8 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
|
|||||||
--header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
|
--header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
|
||||||
--name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
|
--name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
|
||||||
--state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
|
--state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
|
||||||
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
|
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
|
||||||
DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt)
|
DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(GenError
|
ADD_CUSTOM_TARGET(GenError
|
||||||
ALL
|
ALL
|
||||||
|
@ -30,7 +30,7 @@ DIST_SUBDIRS = yassl
|
|||||||
# NOTE Built files should depend on their sources to avoid
|
# NOTE Built files should depend on their sources to avoid
|
||||||
# the built files being rebuilt in source dist
|
# the built files being rebuilt in source dist
|
||||||
$(top_builddir)/include/mysqld_error.h: comp_err.c \
|
$(top_builddir)/include/mysqld_error.h: comp_err.c \
|
||||||
$(top_srcdir)/sql/share/errmsg.txt
|
$(top_srcdir)/sql/share/errmsg-utf8.txt
|
||||||
$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
|
$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
|
||||||
$(top_builddir)/extra/comp_err$(EXEEXT) \
|
$(top_builddir)/extra/comp_err$(EXEEXT) \
|
||||||
--charset=$(top_srcdir)/sql/share/charsets \
|
--charset=$(top_srcdir)/sql/share/charsets \
|
||||||
@ -38,7 +38,7 @@ $(top_builddir)/include/mysqld_error.h: comp_err.c \
|
|||||||
--header_file=$(top_builddir)/include/mysqld_error.h \
|
--header_file=$(top_builddir)/include/mysqld_error.h \
|
||||||
--name_file=$(top_builddir)/include/mysqld_ername.h \
|
--name_file=$(top_builddir)/include/mysqld_ername.h \
|
||||||
--state_file=$(top_builddir)/include/sql_state.h \
|
--state_file=$(top_builddir)/include/sql_state.h \
|
||||||
--in_file=$(top_srcdir)/sql/share/errmsg.txt
|
--in_file=$(top_srcdir)/sql/share/errmsg-utf8.txt
|
||||||
$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
|
$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
|
||||||
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
|
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static char *OUTFILE= (char*) "errmsg.sys";
|
|||||||
static char *HEADERFILE= (char*) "mysqld_error.h";
|
static char *HEADERFILE= (char*) "mysqld_error.h";
|
||||||
static char *NAMEFILE= (char*) "mysqld_ername.h";
|
static char *NAMEFILE= (char*) "mysqld_ername.h";
|
||||||
static char *STATEFILE= (char*) "sql_state.h";
|
static char *STATEFILE= (char*) "sql_state.h";
|
||||||
static char *TXTFILE= (char*) "../sql/share/errmsg.txt";
|
static char *TXTFILE= (char*) "../sql/share/errmsg-utf8.txt";
|
||||||
static char *DATADIRECTORY= (char*) "../sql/share/";
|
static char *DATADIRECTORY= (char*) "../sql/share/";
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
|
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
|
||||||
|
@ -477,6 +477,9 @@ uint my_charset_repertoire(CHARSET_INFO *cs);
|
|||||||
|
|
||||||
my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
|
my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
|
||||||
|
|
||||||
|
extern size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n,
|
||||||
|
const char* fmt, va_list ap);
|
||||||
|
|
||||||
#define _MY_U 01 /* Upper case */
|
#define _MY_U 01 /* Upper case */
|
||||||
#define _MY_L 02 /* Lower case */
|
#define _MY_L 02 /* Lower case */
|
||||||
#define _MY_NMR 04 /* Numeral (digit) */
|
#define _MY_NMR 04 /* Numeral (digit) */
|
||||||
|
@ -659,6 +659,7 @@ extern void my_osmaperr(unsigned long last_error);
|
|||||||
extern void TERMINATE(FILE *file, uint flag);
|
extern void TERMINATE(FILE *file, uint flag);
|
||||||
#endif
|
#endif
|
||||||
extern void init_glob_errs(void);
|
extern void init_glob_errs(void);
|
||||||
|
extern const char** get_global_errmsgs();
|
||||||
extern void wait_for_free_space(const char *filename, int errors);
|
extern void wait_for_free_space(const char *filename, int errors);
|
||||||
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
|
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
|
||||||
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
|
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
|
||||||
@ -672,7 +673,8 @@ extern void my_error _VARARGS((int nr,myf MyFlags, ...));
|
|||||||
extern void my_printf_error _VARARGS((uint my_err, const char *format,
|
extern void my_printf_error _VARARGS((uint my_err, const char *format,
|
||||||
myf MyFlags, ...))
|
myf MyFlags, ...))
|
||||||
ATTRIBUTE_FORMAT(printf, 2, 4);
|
ATTRIBUTE_FORMAT(printf, 2, 4);
|
||||||
extern int my_error_register(const char **errmsgs, int first, int last);
|
extern int my_error_register(const char** (*get_errmsgs) (),
|
||||||
|
int first, int last);
|
||||||
extern const char **my_error_unregister(int first, int last);
|
extern const char **my_error_unregister(int first, int last);
|
||||||
extern void my_message(uint my_err, const char *str,myf MyFlags);
|
extern void my_message(uint my_err, const char *str,myf MyFlags);
|
||||||
extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags);
|
extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags);
|
||||||
|
@ -219,6 +219,10 @@ const char *client_errors[]=
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char** get_client_errmsgs()
|
||||||
|
{
|
||||||
|
return client_errors;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Register client error messages for use with my_error().
|
Register client error messages for use with my_error().
|
||||||
@ -232,7 +236,7 @@ const char *client_errors[]=
|
|||||||
|
|
||||||
void init_client_errs(void)
|
void init_client_errs(void)
|
||||||
{
|
{
|
||||||
(void) my_error_register(client_errors, CR_ERROR_FIRST, CR_ERROR_LAST);
|
(void) my_error_register(get_client_errmsgs, CR_ERROR_FIRST, CR_ERROR_LAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1087,6 +1087,9 @@ net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
|
|||||||
bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
|
bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
|
||||||
const char *sqlstate)
|
const char *sqlstate)
|
||||||
{
|
{
|
||||||
|
uint error;
|
||||||
|
uchar converted_err[MYSQL_ERRMSG_SIZE];
|
||||||
|
uint32 converted_err_len;
|
||||||
MYSQL_DATA *data= thd->cur_data;
|
MYSQL_DATA *data= thd->cur_data;
|
||||||
struct embedded_query_result *ei;
|
struct embedded_query_result *ei;
|
||||||
|
|
||||||
@ -1101,7 +1104,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
|
|||||||
|
|
||||||
ei= data->embedded_info;
|
ei= data->embedded_info;
|
||||||
ei->last_errno= sql_errno;
|
ei->last_errno= sql_errno;
|
||||||
strmake(ei->info, err, sizeof(ei->info)-1);
|
converted_err_len= convert_error_message((char*)converted_err,
|
||||||
|
sizeof(converted_err),
|
||||||
|
thd->variables.character_set_results,
|
||||||
|
err, strlen(err),
|
||||||
|
system_charset_info, &error);
|
||||||
|
strmake(ei->info, (const char*) converted_err, sizeof(ei->info)-1);
|
||||||
strmov(ei->sqlstate, sqlstate);
|
strmov(ei->sqlstate, sqlstate);
|
||||||
ei->server_status= thd->server_status;
|
ei->server_status= thd->server_status;
|
||||||
thd->cur_data= 0;
|
thd->cur_data= 0;
|
||||||
|
@ -39,7 +39,7 @@ sub fix_charset_dir {
|
|||||||
sub fix_language {
|
sub fix_language {
|
||||||
my ($self, $config, $group_name, $group)= @_;
|
my ($self, $config, $group_name, $group)= @_;
|
||||||
return my_find_dir($self->get_basedir($group),
|
return my_find_dir($self->get_basedir($group),
|
||||||
\@share_locations, "english");
|
\@share_locations);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub fix_datadir {
|
sub fix_datadir {
|
||||||
@ -197,7 +197,7 @@ my @mysqld_rules=
|
|||||||
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
|
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
|
||||||
{ 'tmpdir' => \&fix_tmpdir },
|
{ 'tmpdir' => \&fix_tmpdir },
|
||||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||||
{ 'language' => \&fix_language },
|
{ 'lc-messages-dir' => \&fix_language },
|
||||||
{ 'datadir' => \&fix_datadir },
|
{ 'datadir' => \&fix_datadir },
|
||||||
{ 'pid-file' => \&fix_pidfile },
|
{ 'pid-file' => \&fix_pidfile },
|
||||||
{ '#host' => \&fix_host },
|
{ '#host' => \&fix_host },
|
||||||
|
@ -67,11 +67,11 @@ is( $config->value('client', 'host'),
|
|||||||
ok ( $config->value("mysqld.1", 'character-sets-dir') =~ /$basedir.*charsets$/,
|
ok ( $config->value("mysqld.1", 'character-sets-dir') =~ /$basedir.*charsets$/,
|
||||||
"'character-sets-dir' generated");
|
"'character-sets-dir' generated");
|
||||||
|
|
||||||
ok ( $config->value("mysqld.1", 'language') =~ /$basedir.*english$/,
|
ok ( $config->value("mysqld.1", 'lc-messages-dir') =~ /$basedir.*share$/,
|
||||||
"'language' generated");
|
"'lc-messages-dir' generated");
|
||||||
|
|
||||||
ok ( $config->value("ENV", 'MASTER_MY_PORT') =~ /\d/,
|
ok ( $config->value("ENV", 'MASTER_MY_PORT') =~ /\d/,
|
||||||
"'language' generated");
|
"'lc-messages-dir' generated");
|
||||||
|
|
||||||
my $gen2_cnf= "$dir/gen2.cnf";
|
my $gen2_cnf= "$dir/gen2.cnf";
|
||||||
open(OUT, ">", $gen2_cnf) or die;
|
open(OUT, ">", $gen2_cnf) or die;
|
||||||
|
@ -955,12 +955,12 @@ sub command_line_setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Look for language files and charsetsdir, use same share
|
# Look for language files and charsetsdir, use same share
|
||||||
$path_language= mtr_path_exists("$basedir/share/mysql/english",
|
$path_language= mtr_path_exists("$basedir/share/mysql",
|
||||||
"$basedir/sql/share/english",
|
"$basedir/sql/share",
|
||||||
"$basedir/share/english");
|
"$basedir/share");
|
||||||
|
|
||||||
|
|
||||||
my $path_share= dirname($path_language);
|
my $path_share= $path_language;
|
||||||
$path_charsetsdir= mtr_path_exists("$path_share/charsets");
|
$path_charsetsdir= mtr_path_exists("$path_share/charsets");
|
||||||
|
|
||||||
if (using_extern())
|
if (using_extern())
|
||||||
@ -1432,7 +1432,7 @@ sub collect_mysqld_features {
|
|||||||
mtr_init_args(\$args);
|
mtr_init_args(\$args);
|
||||||
mtr_add_arg($args, "--no-defaults");
|
mtr_add_arg($args, "--no-defaults");
|
||||||
mtr_add_arg($args, "--datadir=%s", mixed_path($tmpdir));
|
mtr_add_arg($args, "--datadir=%s", mixed_path($tmpdir));
|
||||||
mtr_add_arg($args, "--language=%s", $path_language);
|
mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
|
||||||
mtr_add_arg($args, "--skip-grant-tables");
|
mtr_add_arg($args, "--skip-grant-tables");
|
||||||
mtr_add_arg($args, "--verbose");
|
mtr_add_arg($args, "--verbose");
|
||||||
mtr_add_arg($args, "--help");
|
mtr_add_arg($args, "--help");
|
||||||
@ -2700,7 +2700,7 @@ sub mysql_install_db {
|
|||||||
|
|
||||||
my $install_datadir= $datadir || $mysqld->value('datadir');
|
my $install_datadir= $datadir || $mysqld->value('datadir');
|
||||||
my $install_basedir= $mysqld->value('basedir');
|
my $install_basedir= $mysqld->value('basedir');
|
||||||
my $install_lang= $mysqld->value('language');
|
my $install_lang= $mysqld->value('lc-messages-dir');
|
||||||
my $install_chsdir= $mysqld->value('character-sets-dir');
|
my $install_chsdir= $mysqld->value('character-sets-dir');
|
||||||
|
|
||||||
mtr_report("Installing system database...");
|
mtr_report("Installing system database...");
|
||||||
@ -2723,7 +2723,7 @@ sub mysql_install_db {
|
|||||||
$path_vardir_trace);
|
$path_vardir_trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
mtr_add_arg($args, "--language=%s", $install_lang);
|
mtr_add_arg($args, "--lc-messages-dir=%s", $install_lang);
|
||||||
mtr_add_arg($args, "--character-sets-dir=%s", $install_chsdir);
|
mtr_add_arg($args, "--character-sets-dir=%s", $install_chsdir);
|
||||||
|
|
||||||
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
|
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
|
||||||
|
@ -47,11 +47,11 @@ insert into t1 values (0x01,0x01);
|
|||||||
select * from t1 where a=b;
|
select * from t1 where a=b;
|
||||||
a b
|
a b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: ''
|
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
|
||||||
select * from t1 where a=b and b=0x01;
|
select * from t1 where a=b and b=0x01;
|
||||||
a b
|
a b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: ''
|
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill);
|
CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill);
|
||||||
INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2);
|
INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2);
|
||||||
|
32
mysql-test/r/ctype_errors.result
Normal file
32
mysql-test/r/ctype_errors.result
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Start of 5.4 tests
|
||||||
|
CREATE TABLE t1(f1 INT);
|
||||||
|
SET lc_messages=ru_RU;
|
||||||
|
SHOW VARIABLES LIKE 'lc_messages';
|
||||||
|
Variable_name Value
|
||||||
|
lc_messages ru_RU
|
||||||
|
CREATE TABLE t1(f1 INT);
|
||||||
|
ERROR 42S01: \0422\0430\0431\043B\0438\0446\0430 't1' \0443\0436\0435 \0441\0443\0449\0435\0441\0442\0432\0443\0435\0442
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1(f1 INT);
|
||||||
|
ERROR 42S01: Таблица 't1' уже существует
|
||||||
|
SHOW VARIABLES LIKE 'lc_messages';
|
||||||
|
Variable_name Value
|
||||||
|
lc_messages en_US
|
||||||
|
CREATE TABLE t1(f1 INT);
|
||||||
|
ERROR 42S01: Table 't1' already exists
|
||||||
|
SHOW GLOBAL VARIABLES LIKE 'lc_messages';
|
||||||
|
Variable_name Value
|
||||||
|
lc_messages en_US
|
||||||
|
SET GLOBAL lc_messages=ru_RU;
|
||||||
|
SHOW GLOBAL VARIABLES LIKE 'lc_messages';
|
||||||
|
Variable_name Value
|
||||||
|
lc_messages ru_RU
|
||||||
|
SET GLOBAL lc_messages=en_US;
|
||||||
|
DROP TABLE t1;
|
||||||
|
drop table `ק`;
|
||||||
|
ERROR 42S02: Unknown table 'ק'
|
||||||
|
SET lc_messages=cs_CZ;
|
||||||
|
SET NAMES UTF8;
|
||||||
|
USE nonexistant;
|
||||||
|
ERROR 42000: Nezn-Bámá databáze 'nonexistant'
|
||||||
|
End of 5.4 tests
|
@ -162,10 +162,10 @@ Field Type Null Key Default Extra
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET NAMES binary;
|
SET NAMES binary;
|
||||||
CREATE TABLE `goodÐÌÏÈÏ` (a int);
|
CREATE TABLE `goodÐÌÏÈÏ` (a int);
|
||||||
ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ'
|
ERROR HY000: Invalid utf8 character string: 'good\xD0\xCC\xCF\xC8\xCF'
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
CREATE TABLE `goodÐÌÏÈÏ` (a int);
|
CREATE TABLE `goodÐÌÏÈÏ` (a int);
|
||||||
ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ'
|
ERROR HY000: Invalid utf8 character string: 'good\xD0\xCC\xCF\xC8\xCF'
|
||||||
set names latin1;
|
set names latin1;
|
||||||
create table t1 (a char(10) character set koi8r, b text character set koi8r);
|
create table t1 (a char(10) character set koi8r, b text character set koi8r);
|
||||||
insert into t1 values ('test','test');
|
insert into t1 values ('test','test');
|
||||||
|
@ -19,7 +19,7 @@ col2 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
|
|||||||
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
|
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
|
||||||
INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
|
INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
|
||||||
INSERT INTO t1 VALUES('A ', 'A ');
|
INSERT INTO t1 VALUES('A ', 'A ');
|
||||||
ERROR 23000: Duplicate entry '' for key 'key1'
|
ERROR 23000: Duplicate entry 'A -A ' for key 'key1'
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
|
c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
|
||||||
|
@ -363,9 +363,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10)));
|
|||||||
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
||||||
insert into t1 values ('aaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaa');
|
||||||
insert into t1 values ('aaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values ('aaaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values (repeat('b',20));
|
insert into t1 values (repeat('b',20));
|
||||||
select c c1 from t1 where c='1';
|
select c c1 from t1 where c='1';
|
||||||
c1
|
c1
|
||||||
@ -396,9 +396,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10))) engine=innodb;
|
|||||||
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
||||||
insert into t1 values ('aaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaa');
|
||||||
insert into t1 values ('aaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values ('aaaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values (repeat('b',20));
|
insert into t1 values (repeat('b',20));
|
||||||
select c c1 from t1 where c='1';
|
select c c1 from t1 where c='1';
|
||||||
c1
|
c1
|
||||||
@ -430,19 +430,19 @@ insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
|
|||||||
insert into t1 values ('a');
|
insert into t1 values ('a');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aa' for key 'c'
|
||||||
insert into t1 values ('b');
|
insert into t1 values ('b');
|
||||||
insert into t1 values ('bb');
|
insert into t1 values ('bb');
|
||||||
insert into t1 values ('bbb');
|
insert into t1 values ('bbb');
|
||||||
ERROR 23000: Duplicate entry 'bbb' for key 'c'
|
ERROR 23000: Duplicate entry 'bb' for key 'c'
|
||||||
insert into t1 values ('а');
|
insert into t1 values ('а');
|
||||||
insert into t1 values ('аа');
|
insert into t1 values ('аа');
|
||||||
insert into t1 values ('ааа');
|
insert into t1 values ('ааа');
|
||||||
ERROR 23000: Duplicate entry 'ааа' for key 'c'
|
ERROR 23000: Duplicate entry 'аа' for key 'c'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'ббб' for key 'c'
|
ERROR 23000: Duplicate entry 'бб' for key 'c'
|
||||||
insert into t1 values ('ꪪ');
|
insert into t1 values ('ꪪ');
|
||||||
insert into t1 values ('ꪪꪪ');
|
insert into t1 values ('ꪪꪪ');
|
||||||
insert into t1 values ('ꪪꪪꪪ');
|
insert into t1 values ('ꪪꪪꪪ');
|
||||||
@ -453,19 +453,19 @@ insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
|
|||||||
insert into t1 values ('a');
|
insert into t1 values ('a');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aa' for key 'c'
|
||||||
insert into t1 values ('b');
|
insert into t1 values ('b');
|
||||||
insert into t1 values ('bb');
|
insert into t1 values ('bb');
|
||||||
insert into t1 values ('bbb');
|
insert into t1 values ('bbb');
|
||||||
ERROR 23000: Duplicate entry 'bbb' for key 'c'
|
ERROR 23000: Duplicate entry 'bb' for key 'c'
|
||||||
insert into t1 values ('а');
|
insert into t1 values ('а');
|
||||||
insert into t1 values ('аа');
|
insert into t1 values ('аа');
|
||||||
insert into t1 values ('ааа');
|
insert into t1 values ('ааа');
|
||||||
ERROR 23000: Duplicate entry 'ааа' for key 'c'
|
ERROR 23000: Duplicate entry 'аа' for key 'c'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'ббб' for key 'c'
|
ERROR 23000: Duplicate entry 'бб' for key 'c'
|
||||||
insert into t1 values ('ꪪ');
|
insert into t1 values ('ꪪ');
|
||||||
insert into t1 values ('ꪪꪪ');
|
insert into t1 values ('ꪪꪪ');
|
||||||
insert into t1 values ('ꪪꪪꪪ');
|
insert into t1 values ('ꪪꪪꪪ');
|
||||||
@ -483,14 +483,14 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
@ -519,14 +519,14 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
@ -549,14 +549,14 @@ unique key a (c(1))
|
|||||||
) engine=innodb;
|
) engine=innodb;
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
@ -577,9 +577,9 @@ create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10)
|
|||||||
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
|
||||||
insert into t1 values ('aaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaa');
|
||||||
insert into t1 values ('aaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values ('aaaaaaaaaaaa');
|
insert into t1 values ('aaaaaaaaaaaa');
|
||||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
|
||||||
insert into t1 values (repeat('b',20));
|
insert into t1 values (repeat('b',20));
|
||||||
select c c1 from t1 where c='1';
|
select c c1 from t1 where c='1';
|
||||||
c1
|
c1
|
||||||
@ -611,19 +611,19 @@ insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
|
|||||||
insert into t1 values ('a');
|
insert into t1 values ('a');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'c'
|
ERROR 23000: Duplicate entry 'aa' for key 'c'
|
||||||
insert into t1 values ('b');
|
insert into t1 values ('b');
|
||||||
insert into t1 values ('bb');
|
insert into t1 values ('bb');
|
||||||
insert into t1 values ('bbb');
|
insert into t1 values ('bbb');
|
||||||
ERROR 23000: Duplicate entry 'bbb' for key 'c'
|
ERROR 23000: Duplicate entry 'bb' for key 'c'
|
||||||
insert into t1 values ('а');
|
insert into t1 values ('а');
|
||||||
insert into t1 values ('аа');
|
insert into t1 values ('аа');
|
||||||
insert into t1 values ('ааа');
|
insert into t1 values ('ааа');
|
||||||
ERROR 23000: Duplicate entry 'ааа' for key 'c'
|
ERROR 23000: Duplicate entry 'аа' for key 'c'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'ббб' for key 'c'
|
ERROR 23000: Duplicate entry 'бб' for key 'c'
|
||||||
insert into t1 values ('ꪪ');
|
insert into t1 values ('ꪪ');
|
||||||
insert into t1 values ('ꪪꪪ');
|
insert into t1 values ('ꪪꪪ');
|
||||||
insert into t1 values ('ꪪꪪꪪ');
|
insert into t1 values ('ꪪꪪꪪ');
|
||||||
@ -641,14 +641,14 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
@ -677,14 +677,14 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
@ -707,14 +707,14 @@ unique key a (c(1))
|
|||||||
) engine=innodb;
|
) engine=innodb;
|
||||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||||
insert into t1 values ('aa');
|
insert into t1 values ('aa');
|
||||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('aaa');
|
insert into t1 values ('aaa');
|
||||||
ERROR 23000: Duplicate entry 'aaa' for key 'a'
|
ERROR 23000: Duplicate entry 'a' for key 'a'
|
||||||
insert into t1 values ('б');
|
insert into t1 values ('б');
|
||||||
insert into t1 values ('бб');
|
insert into t1 values ('бб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
insert into t1 values ('ббб');
|
insert into t1 values ('ббб');
|
||||||
ERROR 23000: Duplicate entry 'бÐ' for key 'a'
|
ERROR 23000: Duplicate entry 'б' for key 'a'
|
||||||
select c as c_all from t1 order by c;
|
select c as c_all from t1 order by c;
|
||||||
c_all
|
c_all
|
||||||
a
|
a
|
||||||
|
@ -55,3 +55,32 @@ Error 1054 Unknown column 'b' in 'field list'
|
|||||||
INSERT INTO t1 SELECT b FROM t1;
|
INSERT INTO t1 SELECT b FROM t1;
|
||||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
SET NAMES utf8;
|
||||||
|
SET sql_quote_show_create= _binary x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
|
||||||
|
SET sql_quote_show_create= _utf8 x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create=_latin1 x'5452DC45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create='TRÜE';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create=TRÜE;
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET NAMES latin1;
|
||||||
|
SET sql_quote_show_create= _binary x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
|
||||||
|
SET sql_quote_show_create= _utf8 x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create=_latin1 x'5452DC45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create='TR.E';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR.E'
|
||||||
|
SET sql_quote_show_create=TR.E;
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'E'
|
||||||
|
SET NAMES binary;
|
||||||
|
SET sql_quote_show_create= _binary x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
|
||||||
|
SET sql_quote_show_create= _utf8 x'5452C39C45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
SET sql_quote_show_create=_latin1 x'5452DC45';
|
||||||
|
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||||
|
@ -16,7 +16,7 @@ DROP EVENT Lower_case;
|
|||||||
SET NAMES cp1251;
|
SET NAMES cp1251;
|
||||||
CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
|
CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
|
||||||
CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
|
CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
|
||||||
ERROR HY000: Event 'ДоЛеН_регистър_1251' already exists
|
ERROR HY000: Event 'ÄîËåÍ_ðåãèñòúð_1251' already exists
|
||||||
DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
|
DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
CREATE EVENT долен_региÑ<C2B8>тър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
|
CREATE EVENT долен_региÑ<C2B8>тър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
|
||||||
|
@ -2725,7 +2725,7 @@ create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
|
|||||||
create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
|
create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
|
||||||
insert into t1 values (0x41),(0x4120),(0x4100);
|
insert into t1 values (0x41),(0x4120),(0x4100);
|
||||||
insert into t2 values (0x41),(0x4120),(0x4100);
|
insert into t2 values (0x41),(0x4120),(0x4100);
|
||||||
ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry 'A\x00' for key 'PRIMARY'
|
||||||
insert into t2 values (0x41),(0x4120);
|
insert into t2 values (0x41),(0x4120);
|
||||||
insert into t3 values (0x41),(0x4120),(0x4100);
|
insert into t3 values (0x41),(0x4120),(0x4100);
|
||||||
ERROR 23000: Duplicate entry 'A ' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry 'A ' for key 'PRIMARY'
|
||||||
|
@ -251,13 +251,13 @@ insert t1 values ('cccc', 'tttt'),
|
|||||||
(0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1),
|
(0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1),
|
||||||
(0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1);
|
(0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1);
|
||||||
insert t1 (c) values ('cc22');
|
insert t1 (c) values ('cc22');
|
||||||
ERROR 23000: Duplicate entry 'cc22' for key 'c'
|
ERROR 23000: Duplicate entry 'cc' for key 'c'
|
||||||
insert t1 (t) values ('ttt22');
|
insert t1 (t) values ('ttt22');
|
||||||
ERROR 23000: Duplicate entry 'ttt22' for key 't'
|
ERROR 23000: Duplicate entry 'ttt' for key 't'
|
||||||
insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1);
|
insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1);
|
||||||
ERROR 23000: Duplicate entry 'б!#"Ð' for key 'c'
|
ERROR 23000: Duplicate entry '\0431!' for key 'c'
|
||||||
insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1);
|
insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1);
|
||||||
ERROR 23000: Duplicate entry 'бб!#"б' for key 't'
|
ERROR 23000: Duplicate entry '\0431\0431!' for key 't'
|
||||||
select c from t1 where c='cccc';
|
select c from t1 where c='cccc';
|
||||||
c
|
c
|
||||||
cccc
|
cccc
|
||||||
|
@ -207,6 +207,8 @@ Warning (Code 1286): Unknown table engine 'nonexistent2'
|
|||||||
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
||||||
Error (Code 1050): Table 't2' already exists
|
Error (Code 1050): Table 't2' already exists
|
||||||
drop tables t1, t2;
|
drop tables t1, t2;
|
||||||
|
Variable_name Value
|
||||||
|
lc_messages ru_RU
|
||||||
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>create table t1 (a char(5));
|
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>create table t1 (a char(5));
|
||||||
insert into t1 values ('\0b\0');
|
insert into t1 values ('\0b\0');
|
||||||
a
|
a
|
||||||
|
@ -2332,21 +2332,21 @@ DECLARE céèçà foo CONDITION FOR SQLSTATE '12345';
|
|||||||
SIGNAL céèçà SET MYSQL_ERRNO = 1000;
|
SIGNAL céèçà SET MYSQL_ERRNO = 1000;
|
||||||
end $$
|
end $$
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '©Ã¨Ã§Ã foo CONDITION FOR SQLSTATE '12345';
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '©Ã¨Ã§Ã foo CONDITION FOR SQLSTATE '12345';
|
||||||
SIGNAL céèçà SET MYSQL_ERRNO = 1' at line 3
|
SIGNAL céèçà SET ' at line 3
|
||||||
create procedure test_signal()
|
create procedure test_signal()
|
||||||
begin
|
begin
|
||||||
DECLARE "céèçà " CONDITION FOR SQLSTATE '12345';
|
DECLARE "céèçà " CONDITION FOR SQLSTATE '12345';
|
||||||
SIGNAL "céèçà " SET MYSQL_ERRNO = 1000;
|
SIGNAL "céèçà " SET MYSQL_ERRNO = 1000;
|
||||||
end $$
|
end $$
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"céèçà " CONDITION FOR SQLSTATE '12345';
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"céèçà " CONDITION FOR SQLSTATE '12345';
|
||||||
SIGNAL "céèçà" SET MYSQL_ERRNO =' at line 3
|
SIGNAL "céèçà" S' at line 3
|
||||||
create procedure test_signal()
|
create procedure test_signal()
|
||||||
begin
|
begin
|
||||||
DECLARE 'céèçà ' CONDITION FOR SQLSTATE '12345';
|
DECLARE 'céèçà ' CONDITION FOR SQLSTATE '12345';
|
||||||
SIGNAL 'céèçà ' SET MYSQL_ERRNO = 1000;
|
SIGNAL 'céèçà ' SET MYSQL_ERRNO = 1000;
|
||||||
end $$
|
end $$
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''céèçà ' CONDITION FOR SQLSTATE '12345';
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''céèçà ' CONDITION FOR SQLSTATE '12345';
|
||||||
SIGNAL 'céèçà' SET MYSQL_ERRNO =' at line 3
|
SIGNAL 'céèçà' S' at line 3
|
||||||
create procedure test_signal()
|
create procedure test_signal()
|
||||||
begin
|
begin
|
||||||
DECLARE `céèçà ` CONDITION FOR SQLSTATE '12345';
|
DECLARE `céèçà ` CONDITION FOR SQLSTATE '12345';
|
||||||
|
@ -47,7 +47,7 @@ create table t1 (s1 binary(2) primary key);
|
|||||||
insert into t1 values (0x01);
|
insert into t1 values (0x01);
|
||||||
insert into t1 values (0x0120);
|
insert into t1 values (0x0120);
|
||||||
insert into t1 values (0x0100);
|
insert into t1 values (0x0100);
|
||||||
ERROR 23000: Duplicate entry '' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '\x01\x00' for key 'PRIMARY'
|
||||||
select hex(s1) from t1 order by s1;
|
select hex(s1) from t1 order by s1;
|
||||||
hex(s1)
|
hex(s1)
|
||||||
0100
|
0100
|
||||||
|
@ -71,7 +71,7 @@ hex(a)
|
|||||||
1
|
1
|
||||||
1
|
1
|
||||||
alter table t1 add unique (a);
|
alter table t1 add unique (a);
|
||||||
ERROR 23000: Duplicate entry '' for key 'a'
|
ERROR 23000: Duplicate entry '\x00' for key 'a'
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a bit(2));
|
create table t1 (a bit(2));
|
||||||
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
|
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
|
||||||
|
@ -864,7 +864,7 @@ select @@query_prealloc_size = @test;
|
|||||||
@@query_prealloc_size = @test
|
@@query_prealloc_size = @test
|
||||||
1
|
1
|
||||||
set global sql_mode=repeat('a',80);
|
set global sql_mode=repeat('a',80);
|
||||||
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||||
End of 4.1 tests
|
End of 4.1 tests
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
select a into @x from t1;
|
select a into @x from t1;
|
||||||
@ -1176,18 +1176,18 @@ ERROR HY000: Variable 'init_file' is a read only variable
|
|||||||
SET @@global.init_file= 'x';
|
SET @@global.init_file= 'x';
|
||||||
ERROR HY000: Variable 'init_file' is a read only variable
|
ERROR HY000: Variable 'init_file' is a read only variable
|
||||||
#
|
#
|
||||||
SHOW VARIABLES like 'language';
|
SHOW VARIABLES like 'lc_messages_dir';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
language #
|
lc_messages_dir #
|
||||||
SELECT @@session.language;
|
SELECT @@session.lc_messages_dir;
|
||||||
ERROR HY000: Variable 'language' is a GLOBAL variable
|
ERROR HY000: Variable 'lc_messages_dir' is a GLOBAL variable
|
||||||
SELECT @@global.language;
|
SELECT @@global.lc_messages_dir;
|
||||||
@@global.language
|
@@global.lc_messages_dir
|
||||||
#
|
#
|
||||||
SET @@session.language= 'x';
|
SET @@session.lc_messages_dir= 'x';
|
||||||
ERROR HY000: Variable 'language' is a read only variable
|
ERROR HY000: Variable 'lc_messages_dir' is a read only variable
|
||||||
SET @@global.language= 'x';
|
SET @@global.lc_messages_dir= 'x';
|
||||||
ERROR HY000: Variable 'language' is a read only variable
|
ERROR HY000: Variable 'lc_messages_dir' is a read only variable
|
||||||
#
|
#
|
||||||
SHOW VARIABLES like 'large_page_size';
|
SHOW VARIABLES like 'large_page_size';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
@ -35,7 +35,7 @@ Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
|||||||
insert into t1 values ("hej"),("då");
|
insert into t1 values ("hej"),("då");
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
||||||
Warning 1366 Incorrect integer value: 'd?' for column 'a' at row 2
|
Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
|
||||||
set SQL_WARNINGS=1;
|
set SQL_WARNINGS=1;
|
||||||
insert into t1 values ("hej");
|
insert into t1 values ("hej");
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -43,7 +43,7 @@ Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
|||||||
insert into t1 values ("hej"),("då");
|
insert into t1 values ("hej"),("då");
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
|
||||||
Warning 1366 Incorrect integer value: 'd?' for column 'a' at row 2
|
Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set SQL_WARNINGS=0;
|
set SQL_WARNINGS=0;
|
||||||
drop temporary table if exists not_exists;
|
drop temporary table if exists not_exists;
|
||||||
|
@ -2123,10 +2123,10 @@ IS NOT TRUE <--------30 characters-------> 3
|
|||||||
IS NOT TRUE ---äÖüß@µ*$-- 4
|
IS NOT TRUE ---äÖüß@µ*$-- 4
|
||||||
IS TRUE -1 5
|
IS TRUE -1 5
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: ''
|
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
|
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
|
Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: '-1'
|
Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
SHOW CREATE VIEW v1;
|
SHOW CREATE VIEW v1;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
|
||||||
@ -2140,10 +2140,10 @@ IS NOT TRUE <--------30 characters-------> 3
|
|||||||
IS NOT TRUE ---äÖüß@µ*$-- |