BitKeeper/etc/logging_ok:
  auto-union
This commit is contained in:
unknown 2003-08-05 16:08:36 +03:00
commit 46a2d8a2f6
137 changed files with 1568 additions and 2988 deletions

View File

@ -622,3 +622,7 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
libmysqld/client.c
libmysqld/client_settings.h
libmysqld/libmysql.c
libmysqld/pack.c

View File

@ -20,10 +20,12 @@ bk@admin.bk
bk@mysql.r18.ru
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
dlenev@mysql.com
gluh@gluh.(none)
gluh@gluh.mysql.r18.ru
greg@mysql.com
guilhem@mysql.com
gweir@build.mysql.com
gweir@work.mysql.com
heikki@donna.mysql.fi
heikki@hundin.mysql.fi
@ -51,6 +53,8 @@ jcole@sarvik.tfr.cafe.ee
jcole@tetra.spaceapes.com
jorge@linux.jorge.mysql.com
kaj@work.mysql.com
konstantin@mysql.com
kostja@oak.local
lenz@kallisto.mysql.com
lenz@mysql.com
miguel@hegel.(none)

76
Docs/README.1st Executable file
View File

@ -0,0 +1,76 @@
This ALPHA build of MySQL 4.1 for the Windows platform does not come
with an installer. A full-featured installer is being developed for the
4.1 series, and it is scheduled to be released with MySQL 4.1 BETA.
** FRESH INSTALL **
To install MySQL 4.1 as a 'fresh' install, unzip this archive to a directory
of your choice (we suggest 'c:\', which will cause MySQL to be installed in
a directory named 'mysql' in 'c:\'). You should then follow the directions
in the user manual for starting/stopping MySQL:
(Windows 9x/ME) http://www.mysql.com/doc/en/Win95_start.html
(Windows NT/2000/XP) http://www.mysql.com/doc/en/NT_start.html
** UPGRADE INSTALL **
To install MySQL 4.1 as an upgrade to your current version of MySQL, you need
to perform the following steps:
* Back up your original installation (always a good idea!)
* Unzip the 4.1 archive to a directory that is different than where your
current MySQL installation is located. (Or, if you do unzip this
archive into the same location as your existing installation, do NOT
unpack the 'data' subdirectory. If you unpack the 'data' directory,
your existing databases will be overwritten.)
* Shut down all MySQL server processes/services.
* Remove the Win32 MySQL service (if appropriate for your OS):
c:\mysql\bin\mysqld-nt --remove
* Exit 'WinMySQLAdmin' (if it is running).
* If you unzipped this archive into a directory different than that
of your existing MySQL installation, copy from the archive all its
directories and their contents EXCEPT the 'data' directory into the
existing installation.
* Start the MySQL server with the '--skip-grant-tables' option. Assuming
your MySQL installation is located at 'c:\mysql', the command looks like
this:
c:\mysql\bin\mysqld-opt --skip-grant-tables
If your installation is located in some other directory, adjust the
pathname in that command (and in the following commands).
* Execute the 'mysql_fix_privilege_tables.sql' script that is located in
the 'scripts' directory:
c:\mysql\bin\mysql -f mysql < c:\mysql\scripts\mysql_fix_privilege_tables.sql
This script performs any actions necessary to convert your grant tables
to the current format. You may see some "duplicate column" warnings as
it runs; these can be ignored.
* Stop the server:
c:\mysql\bin\mysqladmin -u root shutdown
* Re-install the Win32 MySQL service (if required):
c:\mysql\bin\mysqld-nt --install
* Re-start the server or service using your normal startup procedure.
** Further Questions **
You can find further information about running MySQL on Windows in the
manual that ships in the 'Doc' subdirectory, or online at the MySQL AB
web site:
http://www.mysql.com/doc/en/Windows.html

View File

@ -92,7 +92,7 @@ To build the latest Windows source package from the current
BitKeeper source tree, use the following instructions. Please
note that this procedure must be performed on a system
running a Unix or Unix-like operating system. (The procedure
is know to work well on Linux, for example.
is known to work well on Linux, for example.)
- Clone the BitKeeper source tree for MySQL (version 4.1
or above, as desired). For more information how to clone

View File

@ -352,6 +352,11 @@ static void write_header(FILE *sql_file, char *db_name)
mysql_get_server_info(&mysql_connection));
if (!opt_set_names)
fprintf(sql_file,"\n/*!40101 SET NAMES %s*/;\n",default_charset);
fprintf(md_result_file,"\
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n\
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;\n\
");
}
return;
} /* write_header */
@ -361,6 +366,14 @@ static void write_footer(FILE *sql_file)
{
if (opt_xml)
fprintf(sql_file,"</mysqldump>");
else
{
fprintf(md_result_file,"\n
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n\
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n\
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n\
");
}
fputs("\n", sql_file);
} /* write_footer */

View File

@ -328,7 +328,7 @@ static void get_replace_column(struct st_query *q);
static void free_replace_column();
/* Disable functions that only exist in MySQL 4.0 */
#if MYSQL_VERSION_ID < 40000 || defined(EMBEDDED_LIBRARY)
#if MYSQL_VERSION_ID < 40000
void mysql_enable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
void mysql_disable_rpl_parse(MYSQL* mysql __attribute__((unused))) {}
int mysql_rpl_parse_enabled(MYSQL* mysql __attribute__((unused))) { return 1; }

View File

@ -627,7 +627,7 @@ extern my_string my_path(my_string to,const char *progname,
const char *own_pathname_part);
extern my_string my_load_path(my_string to, const char *path,
const char *own_path_prefix);
extern int wild_compare(const char *str,const char *wildstr);
extern int wild_compare(const char *str,const char *wildstr,pbool str_is_pattern);
extern WF_PACK *wf_comp(my_string str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer);

View File

@ -129,11 +129,22 @@ typedef struct st_mysql_data {
unsigned int fields;
MYSQL_ROWS *data;
MEM_ROOT alloc;
#ifdef EMBEDDED_LIBRARY
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
MYSQL_ROWS **prev_ptr;
#endif
} MYSQL_DATA;
enum mysql_option
{
MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION
};
struct st_mysql_options {
unsigned int connect_timeout, read_timeout, write_timeout;
unsigned int port, protocol;
@ -165,18 +176,10 @@ struct st_mysql_options {
a read that is replication-aware
*/
my_bool no_master_reads;
#ifdef EMBEDDED_LIBRARY
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
my_bool separate_thread;
#endif
};
enum mysql_option
{
MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT
enum mysql_option methods_to_use;
};
enum mysql_status
@ -199,8 +202,7 @@ enum mysql_rpl_type
MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
};
#ifndef EMBEDDED_LIBRARY
struct st_mysql_methods;
typedef struct st_mysql
{
@ -245,34 +247,11 @@ typedef struct st_mysql
struct st_mysql* last_used_con;
LIST *stmts; /* list of all statements */
} MYSQL;
#else
struct st_mysql_res;
typedef struct st_mysql
{
const struct st_mysql_methods *methods;
struct st_mysql_res *result;
void *thd;
struct charset_info_st *charset;
unsigned int server_language;
MYSQL_FIELD *fields;
MEM_ROOT field_alloc;
my_ulonglong affected_rows;
unsigned int field_count;
struct st_mysql_options options;
enum mysql_status status;
my_bool free_me; /* If free in mysql_close */
my_ulonglong insert_id; /* id if insert on table with NEXTNR */
unsigned int last_errno;
unsigned int server_status;
char *last_error; /* Used by embedded server */
char sqlstate[SQLSTATE_LENGTH+1]; /* Used by embedded server */
} MYSQL;
#endif
typedef struct st_mysql_res {
my_ulonglong row_count;
MYSQL_FIELD *fields;
@ -285,6 +264,7 @@ typedef struct st_mysql_res {
MYSQL_ROW row; /* If unbuffered read */
MYSQL_ROW current_row; /* buffer to current row */
my_bool eof; /* Used by mysql_fetch_row */
const struct st_mysql_methods *methods;
} MYSQL_RES;
#define MAX_MYSQL_MANAGER_ERR 256
@ -371,12 +351,10 @@ MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
unsigned int port,
const char *unix_socket,
unsigned long clientflag);
void STDCALL mysql_close(MYSQL *sock);
int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
int STDCALL mysql_query(MYSQL *mysql, const char *q);
int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
unsigned long length);
my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
unsigned long length);
/* perform query on master */
@ -437,8 +415,6 @@ MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
const char *wild);
MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
const char *arg);
void STDCALL mysql_free_result(MYSQL_RES *result);
@ -559,6 +535,24 @@ typedef struct st_mysql_stmt
} MYSQL_STMT;
#define mysql_read_query_result(mysql) (*(mysql)->methods->read_query_result)(mysql)
#define mysql_store_result(mysql) (*(mysql)->methods->store_result)(mysql)
#define mysql_use_result(mysql) (*(mysql)->methods->use_result)(mysql)
typedef struct st_mysql_methods
{
my_bool STDCALL (*read_query_result)(MYSQL *mysql);
my_bool STDCALL (*advanced_command)(MYSQL *mysql,
enum enum_server_command command,
const char *header,
unsigned long header_length,
const char *arg,
unsigned long arg_length, my_bool skip_check);
MYSQL_RES * STDCALL (*store_result)(MYSQL *mysql);
MYSQL_RES * STDCALL (*use_result)(MYSQL *mysql);
void STDCALL (*fetch_lengths)(unsigned long *to, MYSQL_ROW column, uint field_count);
} MYSQL_METHODS;
MYSQL_STMT * STDCALL mysql_prepare(MYSQL * mysql, const char *query,
unsigned long length);
int STDCALL mysql_execute(MYSQL_STMT * stmt);
@ -593,6 +587,8 @@ MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
void STDCALL mysql_close(MYSQL *sock);
/* status return codes */
#define MYSQL_NO_DATA 100
@ -613,9 +609,9 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
They are not for general usage
*/
my_bool
simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
unsigned long length, my_bool skip_check);
#define simple_command(mysql, command, arg, length, skip_check) \
(*(mysql)->methods->advanced_command)(mysql, command, \
NullS, 0, arg, length, skip_check)
unsigned long net_safe_read(MYSQL* mysql);
void mysql_once_init(void);

View File

@ -130,7 +130,7 @@ typedef struct st_vio Vio;
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
typedef struct st_net {
#ifndef EMBEDDED_LIBRARY
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
Vio* vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */
@ -234,7 +234,8 @@ void my_net_local_init(NET *net);
void net_end(NET *net);
void net_clear(NET *net);
my_bool net_realloc(NET *net, unsigned long length);
#ifndef EMBEDDED_LIBRARY
#ifndef EMBEDDED_LIBRARY /* To be removed by HF */
my_bool net_flush(NET *net);
#else
#define net_flush(A)
@ -339,6 +340,7 @@ void my_thread_end(void);
#ifdef _global_h
ulong STDCALL net_field_length(uchar **packet);
my_ulonglong net_field_length_ll(uchar **packet);
char *net_store_length(char *pkg, ulonglong length);
#endif
#ifdef __cplusplus

View File

@ -19,11 +19,11 @@
#ifdef EMBEDDED_LIBRARY
/* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
#undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_OPENSSL
#undef HAVE_VIO
#undef HAVE_ISAM
#undef HAVE_SMEM /* No shared memory */

View File

@ -287,4 +287,5 @@
#define ER_CANT_AGGREGATE_3COLLATIONS 1268
#define ER_CANT_AGGREGATE_NCOLLATIONS 1269
#define ER_VARIABLE_IS_NOT_STRUCT 1270
#define ER_ERROR_MESSAGES 271
#define ER_UNKNOWN_COLLATION 1271
#define ER_ERROR_MESSAGES 272

View File

@ -27,17 +27,15 @@ my_ulonglong net_field_length_ll(uchar **packet);
MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
my_bool default_value, uint server_capabilities);
my_bool advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check);
void free_rows(MYSQL_DATA *cur);
MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
uint field_count);
my_bool mysql_autenticate(MYSQL *mysql, const char *passwd);
void fetch_lengths(ulong *to, MYSQL_ROW column, uint field_count);
void free_old_query(MYSQL *mysql);
void end_server(MYSQL *mysql);
my_bool mysql_reconnect(MYSQL *mysql);
void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group);
#ifdef __cplusplus
}
#endif

View File

@ -220,7 +220,7 @@ enum SSL_type
};
#ifndef EMBEDDED_LIBRARY
/* HFTODO - hide this if we don't want client in embedded server */
/* This structure is for every connection on both sides */
struct st_vio
{
@ -263,5 +263,4 @@ struct st_vio
#endif /* HAVE_SMEM */
#endif /* HAVE_VIO */
};
#endif /* EMBEDDED_LIBRARY */
#endif /* vio_violite_h_ */

View File

@ -14,12 +14,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
extern uint mysql_port;
extern my_string mysql_unix_port;
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \
CLIENT_LOCAL_FILES | CLIENT_TRANSACTIONS | \
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION)
sig_handler pipe_sig_handler(int sig __attribute__((unused)));
my_bool stmt_close(MYSQL_STMT *stmt, my_bool skip_list);
void read_user_name(char *name);
@ -39,3 +40,4 @@ my_bool send_file_to_server(MYSQL *mysql, const char *filename);
#define set_sigpipe(mysql)
#define reset_sigpipe(mysql)
#endif

View File

@ -58,12 +58,19 @@
#endif
#include <sql_common.h>
#include "client_settings.h"
ulong net_buffer_length=8192;
ulong max_allowed_packet= 1024L*1024L*1024L;
ulong net_read_timeout= NET_READ_TIMEOUT;
ulong net_write_timeout= NET_WRITE_TIMEOUT;
#ifdef EMBEDDED_LIBRARY
#undef net_flush
my_bool net_flush(NET *net);
#endif
#if defined(MSDOS) || defined(__WIN__)
/* socket_errno is defined in my_global.h for all platforms */
#define perror(A)
@ -85,19 +92,6 @@ static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
const char *from, ulong length);
my_bool stmt_close(MYSQL_STMT *stmt, my_bool skip_list);
/*
Initialize the MySQL library
SYNOPSIS
mysql_once_init()
NOTES
Can't be static on NetWare
This function is called by mysql_init() and indirectly called
by mysql_real_query(), so one should never have to call this from an
outside program.
*/
static my_bool mysql_client_init= 0;
static my_bool org_my_init_done= 0;
@ -145,7 +139,7 @@ void mysql_once_init(void)
#endif
}
#ifndef EMBEDDED_LIBRARY
int STDCALL mysql_server_init(int argc __attribute__((unused)),
char **argv __attribute__((unused)),
char **groups __attribute__((unused)))
@ -163,6 +157,8 @@ void STDCALL mysql_server_end()
mysql_thread_end();
}
#endif /*EMBEDDED_LIBRARY*/
my_bool STDCALL mysql_thread_init()
{
#ifdef THREAD
@ -183,17 +179,6 @@ void STDCALL mysql_thread_end()
Let the user specify that we don't want SIGPIPE; This doesn't however work
with threaded applications as we can have multiple read in progress.
*/
#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD)
#define init_sigpipe_variables sig_return old_signal_handler=(sig_return) 0
#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE,pipe_sig_handler)
#define reset_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) signal(SIGPIPE,old_signal_handler);
#else
#define init_sigpipe_variables
#define set_sigpipe(mysql)
#define reset_sigpipe(mysql)
#endif
static MYSQL* spawn_init(MYSQL* parent, const char* host,
unsigned int port,
const char* user,
@ -856,7 +841,6 @@ STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
return 0;
}
/**************************************************************************
Return next field of the query results
**************************************************************************/
@ -884,7 +868,7 @@ mysql_fetch_lengths(MYSQL_RES *res)
if (!(column=res->current_row))
return 0; /* Something is wrong */
if (res->data)
fetch_lengths(res->lengths, column, res->field_count);
(*res->methods->fetch_lengths)(res->lengths, column, res->field_count);
return res->lengths;
}
@ -995,6 +979,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
free_rows(query);
DBUG_RETURN(NULL);
}
result->methods= mysql->methods;
result->field_alloc=mysql->field_alloc;
mysql->fields=0;
result->field_count = (uint) query->rows;
@ -1720,6 +1705,7 @@ mysql_prepare_result(MYSQL_STMT *stmt)
MYF(MY_WME | MY_ZEROFILL))))
return 0;
result->methods= stmt->mysql->methods;
result->eof=1; /* Marker for buffered */
result->fields= stmt->fields;
result->field_count= stmt->field_count;
@ -1762,39 +1748,6 @@ static void store_param_type(NET *net, uint type)
net->write_pos+=2;
}
/*
Store the length of parameter data
(Same function as in sql/net_pkg.cc)
*/
char *
net_store_length(char *pkg, ulong length)
{
uchar *packet=(uchar*) pkg;
if (length < 251)
{
*packet=(uchar) length;
return (char*) packet+1;
}
/* 251 is reserved for NULL */
if (length < 65536L)
{
*packet++=252;
int2store(packet,(uint) length);
return (char*) packet+2;
}
if (length < 16777216L)
{
*packet++=253;
int3store(packet,(ulong) length);
return (char*) packet+3;
}
*packet++=254;
int8store(packet, (ulonglong) length);
return (char*) packet+9;
}
/****************************************************************************
Functions to store parameter data from a prepared statement.
@ -1994,8 +1947,9 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length)
mysql->last_used_con= mysql;
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
if (advanced_command(mysql, COM_EXECUTE, buff, MYSQL_STMT_HEADER, packet,
length, 1) ||
if ((*mysql->methods->advanced_command)(mysql, COM_EXECUTE, buff,
MYSQL_STMT_HEADER, packet,
length, 1) ||
mysql_read_query_result(mysql))
{
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
@ -2287,8 +2241,9 @@ mysql_send_long_data(MYSQL_STMT *stmt, uint param_number,
Note that we don't get any ok packet from the server in this case
This is intentional to save bandwidth.
*/
if (advanced_command(mysql, COM_LONG_DATA, extra_data,
MYSQL_LONG_DATA_HEADER, data, length, 1))
if ((*mysql->methods->advanced_command)(mysql, COM_LONG_DATA, extra_data,
MYSQL_LONG_DATA_HEADER, data,
length, 1))
{
set_stmt_errmsg(stmt, mysql->net.last_error,
mysql->net.last_errno, mysql->net.sqlstate);
@ -3240,6 +3195,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate);
DBUG_RETURN(1);
}
result->methods= mysql->methods;
stmt->result_buffered= 1;
if (!(result->data= read_binary_rows(stmt)))
{
@ -3435,7 +3391,7 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
mysql= stmt->mysql->last_used_con;
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
if (advanced_command(mysql, COM_RESET_STMT,buff,MYSQL_STMT_HEADER,0,0,1))
if ((*mysql->methods->advanced_command)(mysql, COM_RESET_STMT,buff,MYSQL_STMT_HEADER,0,0,1))
{
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
mysql->net.sqlstate);

View File

@ -32,7 +32,7 @@ noinst_LIBRARIES = libmysqld_int.a
pkglib_LIBRARIES = libmysqld.a
SUBDIRS = . examples
libmysqld_sources= libmysqld.c lib_sql.cc
libmysqlsources = errmsg.c get_password.c
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c
noinst_HEADERS = embedded_priv.h
@ -57,8 +57,6 @@ sqlsources = derror.cc field.cc field_conv.cc filesort.cc \
unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc \
spatial.cc gstream.cc sql_help.cc
EXTRA_DIST = lib_vio.c
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES=
@ -74,7 +72,8 @@ INC_LIB= $(top_builddir)/regex/libregex.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a
$(top_builddir)/regex/libregex.a \
$(top_builddir)/vio/libvio.a
#
# To make it easy for the end user to use the embedded library we
@ -115,11 +114,15 @@ link_sources:
for f in $(libmysqlsources); do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(srcdir)/../libmysql/$$f $(srcdir)/$$f; \
done
done; \
rm -f $(srcdir)/client_settings.h; \
@LN_CP_F@ $(srcdir)/../libmysql/client_settings.h $(srcdir)/client_settings.h;
clean-local:
rm -f `echo $(sqlsources) $(libmysqlsources) | sed "s;\.lo;.c;g"` \
$(top_srcdir)/linked_libmysqld_sources
$(top_srcdir)/linked_libmysqld_sources; \
rm -f client_settings.h
# Don't update the files from bitkeeper
%::SCCS/s.%

View File

@ -26,6 +26,4 @@ C_MODE_START
extern void lib_connection_phase(NET *net, int phase);
extern void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db);
extern void *create_embedded_thd(int client_flag, char *db);
extern my_bool simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
ulong length, my_bool skipp_check);
C_MODE_END

View File

@ -10,7 +10,7 @@ link_sources:
DEFS = -DEMBEDDED_LIBRARY
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \
-I$(top_srcdir) -I$(top_srcdir)/client $(openssl_includes)
LIBS = @LIBS@ @WRAPLIBS@
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @bdb_libs_with_path@ @LIBDL@ $(CXXLDFLAGS)
mysqltest_SOURCES = mysqltest.c

View File

@ -38,6 +38,7 @@ static char inited, org_my_init_done;
C_MODE_START
#include <mysql.h>
#include "errmsg.h"
#include <sql_common.h>
static int check_connections1(THD * thd);
static int check_connections2(THD * thd);
@ -47,9 +48,10 @@ static bool check_user(THD *thd, enum_server_command command,
char * get_mysql_home(){ return mysql_home;};
char * get_mysql_real_data_home(){ return mysql_real_data_home;};
my_bool simple_command(MYSQL *mysql,enum enum_server_command command,
const char *arg,
ulong length, my_bool skipp_check)
my_bool
emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check)
{
my_bool result= 1;
THD *thd=(THD *) mysql->thd;
@ -65,15 +67,23 @@ my_bool simple_command(MYSQL *mysql,enum enum_server_command command,
/* Clear result variables */
thd->clear_error();
mysql->affected_rows= ~(my_ulonglong) 0;
mysql->field_count= 0;
thd->store_globals(); // Fix if more than one connect
result= dispatch_command(command, thd, (char *) arg, length + 1);
free_old_query(mysql);
result= dispatch_command(command, thd, (char *) arg, arg_length + 1);
if (!skipp_check)
if (!skip_check)
result= thd->net.last_errno ? -1 : 0;
mysql->last_error= thd->net.last_error;
mysql->last_errno= thd->net.last_errno;
if ((mysql->net.last_errno= thd->net.last_errno))
{
memcpy(mysql->net.last_error, thd->net.last_error,
sizeof(mysql->net.last_error));
memcpy(mysql->net.sqlstate, thd->net.sqlstate,
sizeof(mysql->net.sqlstate));
}
mysql->warning_count= ((THD*)mysql->thd)->total_warn_count;
return result;
}
@ -144,7 +154,6 @@ char **copy_arguments(int argc, char **argv)
extern "C"
{
ulong max_allowed_packet, net_buffer_length;
char ** copy_arguments_ptr= 0;
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
@ -281,21 +290,6 @@ void STDCALL mysql_server_end()
my_end(0);
}
my_bool STDCALL mysql_thread_init()
{
#ifdef THREAD
return my_thread_init();
#else
return 0;
#endif
}
void STDCALL mysql_thread_end()
{
#ifdef THREAD
my_thread_end();
#endif
}
} /* extern "C" */
C_MODE_START
@ -303,7 +297,6 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db)
{
THD *thd = (THD *)mysql->thd;
thd->mysql= mysql;
mysql->last_error= thd->net.last_error;
}
void *create_embedded_thd(int client_flag, char *db)
@ -454,11 +447,6 @@ send_eof(THD *thd, bool no_flush)
{
}
uint STDCALL mysql_warning_count(MYSQL *mysql)
{
return ((THD *)mysql->thd)->total_warn_count;
}
void Protocol_simple::prepare_for_resend()
{
MYSQL_ROWS *cur;

View File

@ -1,236 +0,0 @@
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Note that we can't have assertion on file descriptors; The reason for
this is that during mysql shutdown, another thread can close a file
we are working on. In this case we should just return read errors from
the file descriptior.
*/
#ifdef DUMMY
#include <my_global.h>
#include "mysql_embed.h"
#include "mysql.h"
#ifndef HAVE_VIO /* is Vio enabled */
#include <errno.h>
#include <my_sys.h>
#include <violite.h>
#include <my_net.h>
#include <m_string.h>
#include <assert.h>
#ifndef __WIN__
#define HANDLE void *
#endif
struct st_vio
{
enum enum_vio_type type; /* Type of connection */
void *dest_thd;
char *packets, **last_packet;
char *where_in_packet, *end_of_packet;
my_bool reading;
MEM_ROOT root;
};
/* Initialize the communication buffer */
Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
{
DBUG_ENTER("vio_new");
Vio * vio;
if ((vio= (Vio *) my_malloc(sizeof(*vio),MYF(MY_WME|MY_ZEROFILL))))
{
init_alloc_root(&vio->root, 8192, 8192);
vio->root.min_malloc = sizeof(char *) + 4;
vio->last_packet = &vio->packets;
vio->type = type;
}
DBUG_RETURN(vio);
}
#ifdef __WIN__
Vio *vio_new_win32pipe(HANDLE hPipe)
{
return (NULL);
}
#endif
void vio_delete(Vio * vio)
{
DBUG_ENTER("vio_delete");
if (vio)
{
if (vio->type != VIO_CLOSED)
vio_close(vio);
free_root(&vio->root, MYF(0));
my_free((gptr) vio, MYF(0));
}
DBUG_VOID_RETURN;
}
void vio_reset(Vio *vio)
{
DBUG_ENTER("vio_reset");
free_root(&vio->root, MYF(MY_KEEP_PREALLOC));
vio->packets = vio->where_in_packet = vio->end_of_packet = 0;
vio->last_packet = &vio->packets;
DBUG_VOID_RETURN;
}
int vio_errno(Vio *vio __attribute__((unused)))
{
return socket_errno; /* On Win32 this mapped to WSAGetLastError() */
}
int vio_read(Vio * vio, gptr buf, int size)
{
vio->reading = 1;
if (vio->where_in_packet >= vio->end_of_packet)
{
DBUG_ASSERT(vio->packets);
vio->where_in_packet = vio->packets + sizeof(char *) + 4;
vio->end_of_packet = vio->where_in_packet +
uint4korr(vio->packets + sizeof(char *));
vio->packets = *(char **)vio->packets;
}
if (vio->where_in_packet + size > vio->end_of_packet)
size = vio->end_of_packet - vio->where_in_packet;
memcpy(buf, vio->where_in_packet, size);
vio->where_in_packet += size;
return (size);
}
int vio_write(Vio * vio, const gptr buf, int size)
{
DBUG_ENTER("vio_write");
char *packet;
if (vio->reading)
{
vio->reading = 0;
vio_reset(vio);
}
if ((packet = alloc_root(&vio->root, sizeof(char*) + 4 + size)))
{
*vio->last_packet = packet;
vio->last_packet = (char **)packet;
*((char **)packet) = 0; /* Set forward link to 0 */
packet += sizeof(char *);
int4store(packet, size);
memcpy(packet + 4, buf, size);
}
else
size= -1;
DBUG_RETURN(size);
}
int vio_blocking(Vio * vio, my_bool set_blocking_mode, my_bool *old_mode)
{
return (0);
}
my_bool
vio_is_blocking(Vio * vio)
{
return(0);
}
int vio_fastsend(Vio * vio)
{
return(0);
}
int vio_keepalive(Vio* vio, my_bool set_keep_alive)
{
return (0);
}
my_bool
vio_should_retry(Vio * vio __attribute__((unused)))
{
int en = socket_errno;
return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
en == SOCKET_EWOULDBLOCK);
}
int vio_close(Vio * vio)
{
return(0);
}
const char *vio_description(Vio * vio)
{
return "embedded vio";
}
enum enum_vio_type vio_type(Vio* vio)
{
return VIO_CLOSED;
}
my_socket vio_fd(Vio* vio)
{
return 0;
}
my_bool vio_peer_addr(Vio * vio, char *buf, uint16 *port)
{
return(0);
}
void vio_in_addr(Vio *vio, struct in_addr *in)
{
}
my_bool vio_poll_read(Vio *vio,uint timeout)
{
return 0;
}
int create_vio(NET *net, int separate_thread)
{
Vio * v = net->vio;
if (!v)
{
v = vio_new(0, separate_thread ? VIO_CLOSED : VIO_TYPE_TCPIP, 0);
net->vio = v;
}
return !v;
}
void set_thd(Vio *v, void *thd)
{
if (v)
{
v -> dest_thd = thd;
}
}
#endif /* HAVE_VIO */
#endif /* DUMMY */

File diff suppressed because it is too large Load Diff

View File

@ -150,3 +150,91 @@ select last_insert_id();
last_insert_id()
0
drop table t1;
create table t1(a int auto_increment,b int null,primary key(a));
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
insert into t1(a,b)values(NULL,1);
insert into t1(a,b)values(200,2);
insert into t1(a,b)values(0,3);
insert into t1(b)values(4);
insert into t1(b)values(5);
insert into t1(b)values(6);
insert into t1(b)values(7);
select * from t1 order by b;
a b
1 1
200 2
0 3
201 4
202 5
203 6
204 7
delete from t1 where a=0;
update t1 set a=0 where b=5;
select * from t1 order by b;
a b
1 1
200 2
201 4
0 5
203 6
204 7
delete from t1 where a=0;
update t1 set a=NULL where b=6;
Warnings:
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
update t1 set a=300 where b=7;
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
insert into t1(a,b)values(400,9);
insert into t1(a,b)values(0,10);
insert into t1(b)values(11);
insert into t1(b)values(12);
insert into t1(b)values(13);
insert into t1(b)values(14);
select * from t1 order by b;
a b
1 1
200 2
201 4
0 6
300 7
301 8
400 9
401 10
402 11
403 12
404 13
405 14
delete from t1 where a=0;
update t1 set a=0 where b=12;
select * from t1 order by b;
a b
1 1
200 2
201 4
300 7
301 8
400 9
401 10
402 11
0 12
404 13
405 14
delete from t1 where a=0;
update t1 set a=NULL where b=13;
Warnings:
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 9
update t1 set a=500 where b=14;
select * from t1 order by b;
a b
1 1
200 2
201 4
300 7
301 8
400 9
401 10
402 11
0 13
500 14
drop table t1;

View File

@ -203,7 +203,7 @@ a
2
check table t1;
Table Op Msg_type Msg_text
test.t1 check error The storage enginge for the table doesn't support check
test.t1 check error The storage engine for the table doesn't support check
drop table t1;
create table t1 (a int,b varchar(20)) type=bdb;
insert into t1 values (1,""), (2,"testing");

View File

@ -1,12 +1,12 @@
drop table if exists t1;
select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
0 256 00000000000000065536 2147483647 -2147483648 2147483648 +4294967296
0 256 00000000000000065536 2147483647 -2147483648 2147483648 4294967296
0 256 65536 2147483647 -2147483648 2147483648 4294967296
select 9223372036854775807,-009223372036854775808;
9223372036854775807 -009223372036854775808
9223372036854775807 -9223372036854775808
select +9999999999999999999,-9999999999999999999;
+9999999999999999999 -9999999999999999999
9999999999999999999 -9999999999999999999
9999999999999999999 -10000000000000000000
select cast(9223372036854775808 as unsigned)+1;
cast(9223372036854775808 as unsigned)+1
@ -14,6 +14,9 @@ cast(9223372036854775808 as unsigned)+1
select 9223372036854775808+1;
9223372036854775808+1
9223372036854775809
select -(0-3),round(-(0-3)), round(9999999999999999999);
-(0-3) round(-(0-3)) round(9999999999999999999)
3 3 10000000000000000000
create table t1 (a bigint unsigned not null, primary key(a));
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
select * from t1;

View File

@ -10,10 +10,10 @@ CASE "c" when "a" then 1 when "b" then 2 ELSE 3 END
3
select CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END;
CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END
0
ok
select CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END;
CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END
0
ok
select CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end;
CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end
a
@ -72,6 +72,48 @@ yellow
green
drop table t1;
SET NAMES latin1;
CREATE TABLE t1 SELECT
CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' END AS c1,
CASE WHEN 1 THEN _latin1'a' ELSE _latin1'a' COLLATE latin1_danish_ci END AS c2,
CASE WHEN 1 THEN 'a' ELSE 1 END AS c3,
CASE WHEN 1 THEN 1 ELSE 'a' END AS c4,
CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5,
CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6,
CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7,
CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8
;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` char(1) character set latin1 collate latin1_danish_ci default NULL,
`c2` char(1) character set latin1 collate latin1_danish_ci default NULL,
`c3` char(1) default NULL,
`c4` char(1) default NULL,
`c5` char(3) default NULL,
`c6` char(3) default NULL,
`c7` double(3,1) default NULL,
`c8` double(3,1) default NULL
) TYPE=MyISAM CHARSET=latin1
DROP TABLE t1;
SELECT CASE
WHEN 1
THEN _latin1'a' COLLATE latin1_danish_ci
ELSE _latin1'a' COLLATE latin1_swedish_ci
END;
ERROR HY000: Illegal mix of collations (latin1_danish_ci,EXPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation 'case'
SELECT CASE _latin1'a' COLLATE latin1_general_ci
WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1
WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2
END;
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_danish_ci,EXPLICIT), (latin1_swedish_ci,EXPLICIT) for operation 'case'
SELECT
CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END
;
CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END
1 2 1 2
CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a');
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'coalesce'
CREATE TABLE t1 SELECT COALESCE('a' COLLATE latin1_swedish_ci,'b' COLLATE latin1_bin);

View File

@ -7,6 +7,10 @@ CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
ERROR 42000: COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL
);
ERROR HY000: Unknown collation: 'some_non_existing_col'
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
INSERT INTO t1 (latin1_f) VALUES (_latin1'a');
INSERT INTO t1 (latin1_f) VALUES (_latin1'AD');
@ -482,7 +486,7 @@ y
Z
z
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
ERROR 42000: COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1'
ERROR HY000: Unknown collation: 'koi8r'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@ -526,3 +530,9 @@ latin1 latin1_swedish_ci 3 1
SET CHARACTER SET 'DEFAULT';
ERROR 42000: Unknown character set: 'DEFAULT'
DROP TABLE t1;
CREATE TABLE t1
(s1 CHAR(5) COLLATE latin1_german1_ci,
s2 CHAR(5) COLLATE latin1_swedish_ci);
SELECT * FROM t1 WHERE s1 = s2;
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
DROP TABLE t1;

View File

@ -42,3 +42,17 @@ Field Type Null Key Default Extra
SET CHARACTER SET koi8r;
DROP TABLE ÔÁÂÌÉÃÁ;
SET CHARACTER SET default;
SET CHARACTER SET koi8r;
CREATE DATABASE ÔÅÓÔ;
USE ÔÅÓÔ;
SHOW TABLES;
Tables_in_ÔÅÓÔ
SHOW TABLES IN ÔÅÓÔ;
Tables_in_ÔÅÓÔ
SET CHARACTER SET cp1251;
SHOW TABLES;
Tables_in_òåñò
SHOW TABLES IN òåñò;
Tables_in_òåñò
SET CHARACTER SET koi8r;
DROP DATABASE ÔÅÓÔ;

View File

@ -4,771 +4,6 @@ i int(10) unsigned not null auto_increment primary key,
a varchar(255) not null,
FULLTEXT KEY (a)
) TYPE=MyISAM;
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaaxxx');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaazzz');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
insert t1 (a) values ('aaayyy');
repair table t1 quick;
Table Op Msg_type Msg_text
test.t1 repair status OK

View File

@ -612,3 +612,9 @@ select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID =
Case When Count(*) < MAX_REQ Then 1 Else 0 End
1
drop table t1;
create table t1 (a char(10));
insert into t1 values ('a'),('b'),('c');
select coercibility(max(a)) from t1;
coercibility(max(a))
3
drop table t1;

View File

@ -143,3 +143,24 @@ select * from t1 where 'a' in (a,b,c collate latin1_bin);
a b c
a c c
drop table t1;
select '1.0' in (1,2);
'1.0' in (1,2)
1
select 1 in ('1.0',2);
1 in ('1.0',2)
1
select 1 in (1,'2.0');
1 in (1,'2.0')
1
select 1 in ('1.0',2.0);
1 in ('1.0',2.0)
1
select 1 in (1.0,'2.0');
1 in (1.0,'2.0')
1
select 1 in ('1.1',2);
1 in ('1.1',2)
0
select 1 in ('1.1',2.0);
1 in ('1.1',2.0)
0

View File

@ -0,0 +1,23 @@
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
select current_user();
current_user()
mysqltest_1@localhost
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'my_%'
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
show grants for mysqltest_2@localhost;
Grants for mysqltest_2@localhost
GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost'
GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION
show grants for mysqltest_3@localhost;
ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost'
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;

View File

@ -84,7 +84,7 @@ a b c a
1 1 1 test.t1
2 2 2 test.t1
select * from t2;
ERROR 42000: select command denied to user: 'mysqltest_2@localhost' for table 't2'
ERROR 42000: select command denied to user: 'mysqltest_2'@'localhost' for table 't2'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6
@ -98,17 +98,17 @@ select "user3";
user3
user3
select * from t1;
ERROR 42000: select command denied to user: 'mysqltest_3@localhost' for column 'b' in table 't1'
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for column 'b' in table 't1'
select a from t1;
a
1
2
select c from t1;
ERROR 42000: SELECT command denied to user: 'mysqltest_3@localhost' for column 'c' in table 't1'
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1'
select * from t2;
ERROR 42000: select command denied to user: 'mysqltest_3@localhost' for table 't2'
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for table 't2'
select mysqltest.t1.c from test.t1,mysqltest.t1;
ERROR 42000: SELECT command denied to user: 'mysqltest_3@localhost' for column 'c' in table 't1'
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 6

View File

@ -156,7 +156,7 @@ level id parent_id
1 1007 101
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The storage enginge for the table doesn't support optimize
test.t1 optimize error The storage engine for the table doesn't support optimize
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 id A # NULL NULL BTREE
@ -180,7 +180,7 @@ create table t1 (a int) type=innodb;
insert into t1 values (1), (2);
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The storage enginge for the table doesn't support optimize
test.t1 optimize error The storage engine for the table doesn't support optimize
delete from t1 where a = 1;
select * from t1;
a
@ -712,7 +712,7 @@ world 2
hello 1
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize error The storage enginge for the table doesn't support optimize
test.t1 optimize error The storage engine for the table doesn't support optimize
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 a A 2 NULL NULL BTREE
@ -1289,7 +1289,7 @@ a b
111 100
drop table t1;
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
(stamp))TYPE=InnoDB;
insert into t1 values (1),(2),(3);
insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 );

View File

@ -57,14 +57,14 @@ test.t1 optimize status OK
check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check error The storage enginge for the table doesn't support check
test.t2 check error The storage engine for the table doesn't support check
repair table t1,t2;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair error The storage enginge for the table doesn't support repair
test.t2 repair error The storage engine for the table doesn't support repair
check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error The storage enginge for the table doesn't support check
test.t2 check error The storage engine for the table doesn't support check
test.t1 check status OK
lock tables t1 write;
check table t2,t1;

View File

@ -7,7 +7,7 @@ select 1 | NULL,1 & NULL,1+NULL,1-NULL;
NULL NULL NULL NULL
select NULL=NULL,NULL<>NULL,IFNULL(NULL,1.1)+0,IFNULL(NULL,1) | 0;
NULL=NULL NULL<>NULL IFNULL(NULL,1.1)+0 IFNULL(NULL,1) | 0
NULL NULL 1 1
NULL NULL 1.1 1
select strcmp("a",NULL),(1<NULL)+0.0,NULL regexp "a",null like "a%","a%" like null;
strcmp("a",NULL) (1<NULL)+0.0 NULL regexp "a" null like "a%" "a%" like null
NULL NULL NULL NULL NULL

View File

@ -374,22 +374,23 @@ drop database mysqltest;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
create table t1 (a char(1) not null);
insert into t1 values("á");
create table t1 (a char(1) not null collate koi8r_general_ci);
insert into t1 values(_koi8r"á");
set CHARACTER SET koi8r;
select * from t1;
a
á
set CHARACTER SET cp1251_koi8;
select * from t1;
a
á
À
set CHARACTER SET DEFAULT;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 5
Qcache_hits 4
drop table t1;
create database if not exists mysqltest;
create table mysqltest.t1 (i int not null);
@ -415,7 +416,7 @@ Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
Qcache_hits 6
drop database mysqltest;
drop table t1;
create table t1 (i int not null);
@ -429,7 +430,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@ -441,7 +442,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -454,7 +455,7 @@ FOUND_ROWS()
4
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 8
Qcache_hits 7
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -466,7 +467,7 @@ FOUND_ROWS()
1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 9
Qcache_hits 8
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -535,7 +536,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 12
Qcache_hits 11
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -552,7 +553,7 @@ a
3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 13
Qcache_hits 12
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
@ -561,6 +562,15 @@ set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit";
Variable_name Value
query_cache_min_res_unit 4096
create table t1 (a int not null);
insert into t1 values (1);
select "aaa" from t1;
aaa
aaa
select "AAA" from t1;
AAA
AAA
drop table t1;
create table t1 (a int);
set GLOBAL query_cache_size=1000;
show global variables like "query_cache_size";

View File

@ -7,7 +7,7 @@ test.t1 repair status OK
alter table t1 TYPE=HEAP;
repair table t1 use_frm;
Table Op Msg_type Msg_text
test.t1 repair error The storage enginge for the table doesn't support repair
test.t1 repair error The storage engine for the table doesn't support repair
drop table t1;
repair table t1 use_frm;
Table Op Msg_type Msg_text

View File

@ -4,20 +4,20 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
reset slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
change master to master_host='127.0.0.1';
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);

View File

@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master;

View File

@ -13,5 +13,5 @@ master_password='',master_port=SLAVE_PORT;
start slave;
flush logs;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000001 122 slave-bin.000001 Yes Yes 0 0 79 122

View File

@ -24,7 +24,3 @@ drop table t2;
drop table t3;
create table t1(a int, b int, unique(b));
insert into t1 values(1,10);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
show status like 'slave_running';
Variable_name Value
Slave_running OFF

View File

@ -92,7 +92,7 @@ slave-bin.000002 4 Query 1 110 use `test`; create table t1 (n int)
slave-bin.000002 62 Query 1 168 use `test`; insert into t1 values (1)
slave-bin.000002 122 Query 1 228 use `test`; drop table t1
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log

View File

@ -8,26 +8,26 @@ show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
stop slave;
change master to master_log_pos=73;
start slave;
stop slave;
change master to master_log_pos=73;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
stop slave;
change master to master_log_pos=173;
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79

View File

@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SHOW SLAVE STATUS;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
SHOW SLAVE HOSTS;
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 SLAVE_PORT 2 1

View File

@ -26,3 +26,6 @@ n
select * from t11;
ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1329

View File

@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
select * from t1;
s
Could not break slave
@ -56,8 +56,8 @@ Log_name
master-bin.000003
insert into t2 values (65);
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
select * from t2;
m
34
@ -82,8 +82,8 @@ select * from t4;
a
testing temporary tables part 2
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)

View File

@ -1225,3 +1225,17 @@ a (select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 an
2 2
1 2
drop table t1,t2,t3;
create table t1 (s1 int);
create table t2 (s1 int);
insert into t1 values (1);
insert into t2 values (1);
select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1);
s1
drop table t1,t2;
create table t1 (s1 int);
create table t2 (s1 int);
insert into t1 values (1);
insert into t2 values (1);
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
ERROR 42S02: Unknown table 'x' in field list
DROP TABLE t1, t2;

View File

@ -436,8 +436,8 @@ a
99999999999
drop table t1;
CREATE TABLE t1 (a_dec DECIMAL(-1,0));
ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead
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 '-1,0))' at line 1
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead
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 '-2,1))' at line 1
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
ERROR 42000: Too big column length for column 'a_dec' (max = 255). Use BLOB instead
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 '-1,1))' at line 1

View File

@ -184,6 +184,8 @@ set GLOBAL table_type=DEFAULT;
ERROR 42000: Variable 'table_type' doesn't have a default value
set character_set_client=UNKNOWN_CHARACTER_SET;
ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET'
set collation_connection=UNKNOWN_COLLATION;
ERROR HY000: Unknown collation: 'UNKNOWN_COLLATION'
set global autocommit=1;
ERROR HY000: Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL
select @@global.timestamp;

View File

@ -90,6 +90,12 @@ Warning 1263 Data truncated for column 'b' at row 2
Warning 1263 Data truncated for column 'b' at row 3
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
Warning 1263 Data truncated for column 'b' at row 4
insert into t2(b) values('mysqlab');
set sql_warnings=1;
insert into t2(b) values('mysqlab');
Warnings:
Warning 1263 Data truncated for column 'b' at row 1
set sql_warnings=0;
drop table t1, t2;
create table t1(a char(10));
alter table t1 add b char;

View File

@ -106,3 +106,36 @@ select last_insert_id();
drop table t1;
create table t1(a int auto_increment,b int null,primary key(a));
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
insert into t1(a,b)values(NULL,1);
insert into t1(a,b)values(200,2);
insert into t1(a,b)values(0,3);
insert into t1(b)values(4);
insert into t1(b)values(5);
insert into t1(b)values(6);
insert into t1(b)values(7);
select * from t1 order by b;
delete from t1 where a=0;
update t1 set a=0 where b=5;
select * from t1 order by b;
delete from t1 where a=0;
update t1 set a=NULL where b=6;
update t1 set a=300 where b=7;
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
insert into t1(a,b)values(400,9);
insert into t1(a,b)values(0,10);
insert into t1(b)values(11);
insert into t1(b)values(12);
insert into t1(b)values(13);
insert into t1(b)values(14);
select * from t1 order by b;
delete from t1 where a=0;
update t1 set a=0 where b=12;
select * from t1 order by b;
delete from t1 where a=0;
update t1 set a=NULL where b=13;
update t1 set a=500 where b=14;
select * from t1 order by b;
drop table t1;

View File

@ -13,6 +13,8 @@ select 9223372036854775807,-009223372036854775808;
select +9999999999999999999,-9999999999999999999;
select cast(9223372036854775808 as unsigned)+1;
select 9223372036854775808+1;
select -(0-3),round(-(0-3)), round(9999999999999999999);
#
# In 3.23 we have to disable the test of column to bigint as
# this fails on AIX powerpc (the resolution for double is not good enough)

View File

@ -42,6 +42,44 @@ insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium')
select max(case col when 1 then val else null end) as color from t1 group by row;
drop table t1;
SET NAMES latin1;
#
# CASE and argument types/collations aggregation into result
#
CREATE TABLE t1 SELECT
CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' END AS c1,
CASE WHEN 1 THEN _latin1'a' ELSE _latin1'a' COLLATE latin1_danish_ci END AS c2,
CASE WHEN 1 THEN 'a' ELSE 1 END AS c3,
CASE WHEN 1 THEN 1 ELSE 'a' END AS c4,
CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5,
CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6,
CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7,
CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8
;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--error 1265
SELECT CASE
WHEN 1
THEN _latin1'a' COLLATE latin1_danish_ci
ELSE _latin1'a' COLLATE latin1_swedish_ci
END;
--error 1268
SELECT CASE _latin1'a' COLLATE latin1_general_ci
WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1
WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2
END;
SELECT
CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END
;
#
# COALESCE is a CASE abbrevation:
#
@ -52,7 +90,6 @@ drop table t1;
#
# Check COALESCE argument types aggregation
SET NAMES latin1;
--error 1265
CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a');
--error 1265

View File

@ -12,6 +12,11 @@ CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
--error 1271
CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL
);
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
INSERT INTO t1 (latin1_f) VALUES (_latin1'a');
@ -93,7 +98,7 @@ SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_german2_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_general_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_bin FROM t1;
--error 1251
--error 1271
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
@ -143,3 +148,11 @@ SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
SET CHARACTER SET 'DEFAULT';
DROP TABLE t1;
CREATE TABLE t1
(s1 CHAR(5) COLLATE latin1_german1_ci,
s2 CHAR(5) COLLATE latin1_swedish_ci);
--error 1265
SELECT * FROM t1 WHERE s1 = s2;
DROP TABLE t1;

View File

@ -27,3 +27,14 @@ SHOW FIELDS FROM таблица;
SET CHARACTER SET koi8r;
DROP TABLE ÔÁÂÌÉÃÁ;
SET CHARACTER SET default;
SET CHARACTER SET koi8r;
CREATE DATABASE ÔÅÓÔ;
USE ÔÅÓÔ;
SHOW TABLES;
SHOW TABLES IN ÔÅÓÔ;
SET CHARACTER SET cp1251;
SHOW TABLES;
SHOW TABLES IN òåñò;
SET CHARACTER SET koi8r;
DROP DATABASE ÔÅÓÔ;

View File

@ -17,6 +17,7 @@ CREATE TABLE t1 (
) TYPE=MyISAM;
# two-level entry, second-level tree with depth 2
--disable_query_log
let $1=260;
while ($1)
{
@ -39,6 +40,7 @@ while ($1)
eval insert t1 (a) values ('aaayyy');
dec $1;
}
--enable_query_log
# converting to two-level
repair table t1 quick;

View File

@ -355,3 +355,8 @@ insert into t1 values (1, 3);
select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ;
select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ;
drop table t1;
create table t1 (a char(10));
insert into t1 values ('a'),('b'),('c');
select coercibility(max(a)) from t1;
drop table t1;

View File

@ -73,3 +73,11 @@ select * from t1 where 'a' collate latin1_general_ci in (a,b,c);
select * from t1 where 'a' collate latin1_bin in (a,b,c);
select * from t1 where 'a' in (a,b,c collate latin1_bin);
drop table t1;
select '1.0' in (1,2);
select 1 in ('1.0',2);
select 1 in (1,'2.0');
select 1 in ('1.0',2.0);
select 1 in (1.0,'2.0');
select 1 in ('1.1',2);
select 1 in ('1.1',2.0);

30
mysql-test/t/grant2.test Normal file
View File

@ -0,0 +1,30 @@
#
# GRANT tests that require several connections
# (usually it's GRANT, reconnect as another user, try something)
#
#
# wild_compare fun
#
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
connect (user1,localhost,mysqltest_1,,);
connection user1;
select current_user();
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
--error 1044
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
disconnect user1;
connection default;
show grants for mysqltest_1@localhost;
show grants for mysqltest_2@localhost;
--error 1141
show grants for mysqltest_3@localhost;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;

View File

@ -868,7 +868,7 @@ drop table t1;
CREATE TABLE t1 (col1 int(1))TYPE=InnoDB;
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP(+0),INDEX stamp_idx
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
(stamp))TYPE=InnoDB;
insert into t1 values (1),(2),(3);
insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 );

View File

@ -260,8 +260,9 @@ show status like "Qcache_queries_in_cache";
#
# Charset convertion (cp1251_koi8 always present)
#
create table t1 (a char(1) not null);
insert into t1 values("á");
create table t1 (a char(1) not null collate koi8r_general_ci);
insert into t1 values(_koi8r"á");
set CHARACTER SET koi8r;
select * from t1;
set CHARACTER SET cp1251_koi8;
select * from t1;
@ -368,6 +369,15 @@ drop table t2;
set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit";
#
# Case sensitive test
#
create table t1 (a int not null);
insert into t1 values (1);
select "aaa" from t1;
select "AAA" from t1;
drop table t1;
#
# Test of query cache resizing
#

View File

@ -0,0 +1 @@
--innodb

View File

@ -37,14 +37,21 @@ connection slave;
sync_with_master;
insert into t1 values(1,10);
connection master;
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
save_master_pos;
connection slave;
# don't sync_with_master because the slave SQL thread should be stopped because
# of the error so MASTER_POS_WAIT() will not return; just sleep and hope the
# slave SQL thread will have had time to stop.
# NOTE UNTIL MERGE 4.0 INTO 4.1
# Below we generate an error, but this error shows up in SHOW SLAVE STATUS
# in the next test. In 4.0 this is fixed (RESET SLAVE resets the error), but it
# has not been merged into 4.1 yet. So for the moment, I comment all lines
# below, to not generate the error, so that the test suite passes.
# When you do the 4.0 -> 4.1 merge, please remove this note and re-enable the
# error generation, by deleting the '#' characters below, and update the result.
# The changeset to merge in 4.1 is
# ChangeSet@1.1455.34.1, 2003-06-10 23:29:49+02:00, guilhem@mysql.com
sleep 1;
show status like 'slave_running';
#connection master;
#load data infile '../../std_data/rpl_loaddata.dat' into table t1;
#save_master_pos;
#connection slave;
# The SQL slave thread should be stopped now.
#wait_for_slave_to_stop;

View File

@ -31,3 +31,7 @@ drop table if exists t1,t2,t11;
save_master_pos;
connection slave;
sync_with_master;
# show slave status, just to see of it prints replicate-do-table
--replace_result $MASTER_MYPORT MASTER_PORT
show slave status;

View File

@ -807,6 +807,7 @@ INSERT INTO t1 VALUES("2f6161e879db43c1a5b82c21ddc49089", "Default", "System", "
INSERT INTO t1 VALUES("c373e9f5ad0791724315444553544200", "AddDocumentTest", "admin", "2003-06-09 10:51:25", "Movie Reviews", "0", "2003-06-09 10:51:25", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
SELECT 'c373e9f5ad0791a0dab5444553544200' IN(SELECT t1.FOLDERID FROM t1 WHERE t1.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t1.FOLDERNAME = 'Level1');
drop table t1;
#
# alloc_group_fields() working
#
@ -817,4 +818,26 @@ insert into t1 values (0,100),(1,2), (1,3), (2,2), (2,7), (2,-1), (3,10);
insert into t2 values (0,0), (1,1), (2,1), (3,1), (4,1);
insert into t3 values (3,3), (2,2), (1,1);
select a,(select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3;
drop table t1,t2,t3;s
drop table t1,t2,t3;
#
# aggregate functions in HAVING test
#
create table t1 (s1 int);
create table t2 (s1 int);
insert into t1 values (1);
insert into t2 values (1);
select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1);
drop table t1,t2;
#
# update subquery with wrong field (to force name resolving
# in UPDATE name space)
#
create table t1 (s1 int);
create table t2 (s1 int);
insert into t1 values (1);
insert into t2 values (1);
-- error 1109
update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A);
DROP TABLE t1, t2;

View File

@ -237,9 +237,9 @@ drop table t1;
# Test of wrong decimal type
#
--error 1074
--error 1064
CREATE TABLE t1 (a_dec DECIMAL(-1,0));
--error 1074
--error 1064
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
--error 1074
--error 1064
CREATE TABLE t1 (a_dec DECIMAL(-1,1));

View File

@ -120,6 +120,8 @@ set SESSION query_cache_size=10000;
set GLOBAL table_type=DEFAULT;
--error 1115
set character_set_client=UNKNOWN_CHARACTER_SET;
--error 1271
set collation_connection=UNKNOWN_COLLATION;
--error 1228
set global autocommit=1;
--error 1228

View File

@ -51,6 +51,10 @@ update t1 set c='mysql ab' where c='test';
update t1 set d=c;
create table t2(a tinyint NOT NULL, b char(3));
insert into t2 select b,c from t1;
insert into t2(b) values('mysqlab');
set sql_warnings=1;
insert into t2(b) values('mysqlab');
set sql_warnings=0;
drop table t1, t2;
#

View File

@ -63,7 +63,7 @@ static void init_state_maps(CHARSET_INFO *cs)
uint i;
uchar *state_map= cs->state_map;
uchar *ident_map= cs->ident_map;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
@ -76,13 +76,12 @@ static void init_state_maps(CHARSET_INFO *cs)
state_map[i]=(uchar) MY_LEX_IDENT;
#endif
else if (!my_isgraph(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'-']=state_map[(uchar)'+']=(uchar) MY_LEX_SIGNED_NUMBER;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;

View File

@ -23,11 +23,12 @@
char wild_many='*';
char wild_one='?';
char wild_prefix=0;
char wild_prefix=0; /* QQ this can potentially cause a SIGSEGV */
int wild_compare(register const char *str, register const char *wildstr)
int wild_compare(register const char *str, register const char *wildstr,
pbool str_is_pattern)
{
reg3 int flag;
char cmp;
DBUG_ENTER("wild_compare");
while (*wildstr)
@ -35,33 +36,55 @@ int wild_compare(register const char *str, register const char *wildstr)
while (*wildstr && *wildstr != wild_many && *wildstr != wild_one)
{
if (*wildstr == wild_prefix && wildstr[1])
{
wildstr++;
if (*wildstr++ != *str++) DBUG_RETURN(1);
if (str_is_pattern && *str++ != wild_prefix)
DBUG_RETURN(1);
}
if (*wildstr++ != *str++)
DBUG_RETURN(1);
}
if (! *wildstr ) DBUG_RETURN (*str != 0);
if (! *wildstr )
DBUG_RETURN(*str != 0);
if (*wildstr++ == wild_one)
{
if (! *str++) DBUG_RETURN (1); /* One char; skipp */
if (! *str || (str_is_pattern && *str == wild_many))
DBUG_RETURN(1); /* One char; skipp */
if (*str++ == wild_prefix && str_is_pattern && *str)
str++;
}
else
{ /* Found '*' */
if (!*wildstr) DBUG_RETURN(0); /* '*' as last char: OK */
flag=(*wildstr != wild_many && *wildstr != wild_one);
do
while (str_is_pattern && *str == wild_many)
str++;
for (; *wildstr == wild_many || *wildstr == wild_one; wildstr++)
if (*wildstr == wild_many)
{
while (str_is_pattern && *str == wild_many)
str++;
}
else
{
if (str_is_pattern && *str == wild_prefix && str[1])
str+=2;
else if (! *str++)
DBUG_RETURN (1);
}
if (!*wildstr)
DBUG_RETURN(0); /* '*' as last char: OK */
if ((cmp= *wildstr) == wild_prefix && wildstr[1] && !str_is_pattern)
cmp=wildstr[1];
for(;;str++)
{
if (flag)
{
char cmp;
if ((cmp= *wildstr) == wild_prefix && wildstr[1])
cmp=wildstr[1];
while (*str && *str != cmp)
str++;
if (!*str) DBUG_RETURN (1);
}
if (wild_compare(str,wildstr) == 0) DBUG_RETURN (0);
} while (*str++ && wildstr[0] != wild_many);
while (*str && *str != cmp)
str++;
if (!*str)
DBUG_RETURN (1);
if (wild_compare(str,wildstr,str_is_pattern) == 0)
DBUG_RETURN (0);
}
DBUG_RETURN(1);
}
}
DBUG_RETURN (*str != '\0');
DBUG_RETURN (*str != 0);
} /* wild_compare */

View File

@ -99,7 +99,7 @@ int wf_test(register WF_PACK *wf_pack, register const char *name)
not_pos=wf_pack->not_pos;
for (i=0 ; i < not_pos; i++)
if (wild_compare(name,wf_pack->wild[i]) == 0)
if (wild_compare(name,wf_pack->wild[i],0) == 0)
goto found;
if (i)
DBUG_RETURN(1); /* No-match */
@ -108,7 +108,7 @@ found:
/* Test that it isn't in not-list */
for (i=not_pos ; i < wf_pack->wilds; i++)
if (wild_compare(name,wf_pack->wild[i]) == 0)
if (wild_compare(name,wf_pack->wild[i],0) == 0)
DBUG_RETURN(1);
DBUG_RETURN(0);
} /* wf_test */

View File

@ -38,7 +38,28 @@
#include <my_global.h>
#include "mysql.h"
#ifdef EMBEDDED_LIBRARY
#undef MYSQL_SERVER
#ifndef MYSQL_CLIENT
#define MYSQL_CLIENT
#endif
#define CLI_MYSQL_REAL_CONNECT cli_mysql_real_connect
#define CLI_MYSQL_CLOSE cli_mysql_close
#undef net_flush
my_bool net_flush(NET *net);
#else /*EMBEDDED_LIBRARY*/
#define CLI_MYSQL_REAL_CONNECT mysql_real_connect
#define CLI_MYSQL_CLOSE mysql_close
#endif /*EMBEDDED_LIBRARY*/
#if !defined(MYSQL_SERVER) && (defined(__WIN__) || defined(_WIN32) || defined(_WIN64))
#include <winsock.h>
#include <odbcinst.h>
#endif /* !defined(MYSQL_SERVER) && (defined(__WIN__) ... */
@ -526,6 +547,10 @@ net_safe_read(MYSQL *mysql)
{
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
vio_description(net->vio),len));
#ifdef MYSQL_SERVER
if (socket_errno == SOCKET_EINTR)
return (packet_error);
#endif /*MYSQL_SERVER*/
end_server(mysql);
net->last_errno=(net->last_errno == ER_NET_PACKET_TOO_LARGE ?
CR_NET_PACKET_TOO_LARGE:
@ -572,8 +597,8 @@ void free_rows(MYSQL_DATA *cur)
}
}
my_bool
advanced_command(MYSQL *mysql, enum enum_server_command command,
static my_bool
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
const char *header, ulong header_length,
const char *arg, ulong arg_length, my_bool skip_check)
{
@ -635,13 +660,6 @@ end:
return result;
}
my_bool
simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
ulong length, my_bool skip_check)
{
return advanced_command(mysql, command, NullS, 0, arg, length, skip_check);
}
void free_old_query(MYSQL *mysql)
{
DBUG_ENTER("free_old_query");
@ -759,8 +777,8 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
return 0;
}
static void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group)
void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group)
{
int argc;
char *argv_buff[1],**argv;
@ -951,7 +969,7 @@ static void mysql_read_default_options(struct st_mysql_options *options,
else the lengths are calculated from the offset between pointers.
**************************************************************************/
void fetch_lengths(ulong *to, MYSQL_ROW column, uint field_count)
static void cli_fetch_lengths(ulong *to, MYSQL_ROW column, uint field_count)
{
ulong *prev_length;
byte *start=0;
@ -972,7 +990,6 @@ void fetch_lengths(ulong *to, MYSQL_ROW column, uint field_count)
}
}
/***************************************************************************
Change field rows to field structs
***************************************************************************/
@ -1000,7 +1017,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
for (row=data->data; row ; row = row->next,field++)
{
uchar *pos;
fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
field->catalog = strdup_root(alloc,(char*) row->data[0]);
field->db = strdup_root(alloc,(char*) row->data[1]);
field->table = strdup_root(alloc,(char*) row->data[2]);
@ -1041,7 +1058,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
/* old protocol, for backward compatibility */
for (row=data->data; row ; row = row->next,field++)
{
fetch_lengths(&lengths[0], row->data, default_value ? 6 : 5);
cli_fetch_lengths(&lengths[0], row->data, default_value ? 6 : 5);
field->org_table= field->table= strdup_root(alloc,(char*) row->data[0]);
field->name= strdup_root(alloc,(char*) row->data[1]);
field->length= (uint) uint3korr(row->data[2]);
@ -1278,6 +1295,7 @@ mysql_init(MYSQL *mysql)
#ifdef HAVE_SMEM
mysql->options.shared_memory_base_name= (char*) def_shared_memory_base_name;
#endif
mysql->options.methods_to_use= MYSQL_OPT_GUESS_CONNECTION;
return mysql;
}
@ -1409,10 +1427,23 @@ error:
before calling mysql_real_connect !
*/
MYSQL * STDCALL
mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,ulong client_flag)
static my_bool STDCALL cli_mysql_read_query_result(MYSQL *mysql);
static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql);
static MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql);
static MYSQL_METHODS client_methods=
{
cli_mysql_read_query_result,
cli_advanced_command,
cli_mysql_store_result,
cli_mysql_use_result,
cli_fetch_lengths
};
MYSQL * STDCALL
CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,ulong client_flag)
{
char buff[NAME_LEN+USERNAME_LENGTH+100],charset_name_buff[16];
char *end,*host_info,*charset_name;
@ -1441,6 +1472,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
user ? user : "(Null)"));
/* Don't give sigpipe errors if the client doesn't want them */
mysql->methods= &client_methods;
set_sigpipe(mysql);
net->vio = 0; /* If something goes wrong */
mysql->client_flag=0; /* For handshake */
@ -2112,8 +2144,7 @@ static void mysql_close_free(MYSQL *mysql)
}
void STDCALL
mysql_close(MYSQL *mysql)
void STDCALL CLI_MYSQL_CLOSE(MYSQL *mysql)
{
DBUG_ENTER("mysql_close");
if (mysql) /* Some simple safety */
@ -2165,8 +2196,7 @@ mysql_close(MYSQL *mysql)
DBUG_VOID_RETURN;
}
my_bool STDCALL mysql_read_query_result(MYSQL *mysql)
static my_bool STDCALL cli_mysql_read_query_result(MYSQL *mysql)
{
uchar *pos;
ulong field_count;
@ -2283,8 +2313,7 @@ mysql_real_query(MYSQL *mysql, const char *query, ulong length)
mysql_data_seek may be used.
**************************************************************************/
MYSQL_RES * STDCALL
mysql_store_result(MYSQL *mysql)
static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_store_result");
@ -2310,6 +2339,7 @@ mysql_store_result(MYSQL *mysql)
strmov(mysql->net.last_error, ER(mysql->net.last_errno));
DBUG_RETURN(0);
}
result->methods= mysql->methods;
result->eof=1; /* Marker for buffered */
result->lengths=(ulong*) (result+1);
if (!(result->data=read_rows(mysql,mysql->fields,mysql->field_count)))
@ -2339,8 +2369,7 @@ mysql_store_result(MYSQL *mysql)
have to wait for the client (and will not wait more than 30 sec/packet).
**************************************************************************/
MYSQL_RES * STDCALL
mysql_use_result(MYSQL *mysql)
static MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_use_result");
@ -2361,6 +2390,7 @@ mysql_use_result(MYSQL *mysql)
MYF(MY_WME | MY_ZEROFILL))))
DBUG_RETURN(0);
result->lengths=(ulong*) (result+1);
result->methods= mysql->methods;
if (!(result->row=(MYSQL_ROW)
my_malloc(sizeof(result->row[0])*(mysql->field_count+1), MYF(MY_WME))))
{ /* Ptrs: to one row */
@ -2477,6 +2507,10 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
mysql->options.shared_memory_base_name=my_strdup(arg,MYF(MY_WME));
#endif
case MYSQL_OPT_USE_REMOTE_CONNECTION:
case MYSQL_OPT_USE_EMBEDDED_CONNECTION:
case MYSQL_OPT_GUESS_CONNECTION:
mysql->options.methods_to_use= option;
break;
default:
DBUG_RETURN(1);

View File

@ -1,3 +1,19 @@
/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
#include <mysql_com.h>
#include <mysql.h>
@ -62,3 +78,30 @@ my_ulonglong net_field_length_ll(uchar **packet)
#endif
}
char *
net_store_length(char *pkg, ulonglong length)
{
uchar *packet=(uchar*) pkg;
if (length < LL(251))
{
*packet=(uchar) length;
return (char*) packet+1;
}
/* 251 is reserved for NULL */
if (length < LL(65536))
{
*packet++=252;
int2store(packet,(uint) length);
return (char*) packet+2;
}
if (length < LL(16777216))
{
*packet++=253;
int3store(packet,(ulong) length);
return (char*) packet+3;
}
*packet++=254;
int8store(packet,length);
return (char*) packet+8;
}

View File

@ -31,3 +31,4 @@
#define mysql_rpl_probe(mysql) 0
#undef HAVE_SMEM
#undef _CUSTOMCONFIG_

View File

@ -1132,7 +1132,7 @@ bool test_if_int(const char *str, int length, const char *int_end,
*/
#define FIELDFLAG_DECIMAL 1
#define FIELDFLAG_BINARY 1 // Shares same flag
#define FIELDFLAG_BINARY 1 // Shares same flag
#define FIELDFLAG_NUMBER 2
#define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_PACK 120 // Bits used for packing
@ -1163,7 +1163,8 @@ bool test_if_int(const char *str, int length, const char *int_end,
#define f_packtype(x) (((x) >> FIELDFLAG_PACK_SHIFT) & 15)
#define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC))
#define f_is_alpha(x) (!f_is_num(x))
#define f_is_enum(x) ((x) & FIELDFLAG_INTERVAL)
#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility
#define f_is_enum(x) ((x) & FIELDFLAG_INTERVAL)
#define f_is_bitfield(x) ((x) & FIELDFLAG_BITFIELD)
#define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB)
#define f_is_geom(x) ((x) & FIELDFLAG_GEOM)

View File

@ -172,7 +172,10 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions)
}
field->reset();
if (field == field->table->next_number_field)
{
field->table->auto_increment_field_not_null= false;
return 0; // field is set in handler.cc
}
if (current_thd->count_cuted_fields)
{
field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,ER_WARN_NULL_TO_NOTNULL);

View File

@ -102,8 +102,8 @@ struct hash_lex_struct
};
int ithis;
};
hash_lex_struct *get_hash_struct_by_len(hash_lex_struct **root_by_len,
hash_lex_struct *get_hash_struct_by_len(hash_lex_struct **root_by_len,
int len, int *max_len)
{
if (*max_len<len){

View File

@ -697,11 +697,15 @@ void handler::update_auto_increment()
longlong nr;
THD *thd;
DBUG_ENTER("update_auto_increment");
if (table->next_number_field->val_int() != 0)
if (table->next_number_field->val_int() != 0 ||
table->auto_increment_field_not_null &&
current_thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO)
{
table->auto_increment_field_not_null= false;
auto_increment_column_changed=0;
DBUG_VOID_RETURN;
}
table->auto_increment_field_not_null= false;
thd=current_thd;
if ((nr=thd->next_insert_id))
thd->next_insert_id=0; // Clear after use

View File

@ -49,15 +49,19 @@ Item::Item():
THD *thd= current_thd;
next= thd->free_list; // Put in free list
thd->free_list= this;
loop_id= 0;
/*
Item constructor can be called during execution other tnen SQL_COM
command => we should check thd->lex.current_select on zero (thd->lex
can be uninitialised)
*/
if (thd->lex.current_select &&
thd->lex.current_select->parsing_place == SELECT_LEX_NODE::SELECT_LIST)
thd->lex.current_select->select_items++;
if (thd->lex.current_select)
{
SELECT_LEX_NODE::enum_parsing_place place=
thd->lex.current_select->parsing_place;
if (place == SELECT_LEX_NODE::SELECT_LIST ||
place == SELECT_LEX_NODE::IN_HAVING)
thd->lex.current_select->select_n_having_items++;
}
}
/*
@ -66,7 +70,6 @@ Item::Item():
tables
*/
Item::Item(THD *thd, Item &item):
loop_id(0),
str_value(item.str_value),
name(item.name),
max_length(item.max_length),
@ -530,6 +533,11 @@ void Item_param::set_longdata(const char *str, ulong length)
int Item_param::save_in_field(Field *field, bool no_conversions)
{
THD *thd= current_thd;
if (thd->command == COM_PREPARE)
return -1;
if (null_value)
return (int) set_field_to_null(field);
@ -862,7 +870,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
sl= sl->outer_select())
{
table_list= (last= sl)->get_table_list();
if (sl->insert_select && table_list)
if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list)
{
// it is primary INSERT st_select_lex => skip first table resolving
table_list= table_list->next;
@ -871,7 +879,8 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
table_list, &where,
0)) != not_found_field)
break;
if ((refer= find_item_in_list(this, sl->item_list, &counter,
if (sl->resolve_mode == SELECT_LEX::SELECT_MODE &&
(refer= find_item_in_list(this, sl->item_list, &counter,
REPORT_EXCEPT_NOT_FOUND)) !=
(Item **) not_found_item)
break;
@ -1348,13 +1357,15 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
SELECT_LEX *last=0;
for ( ; sl ; sl= sl->outer_select())
{
if ((ref= find_item_in_list(this, (last= sl)->item_list,
last= sl;
if (sl->resolve_mode == SELECT_LEX::SELECT_MODE &&
(ref= find_item_in_list(this, sl->item_list,
&counter,
REPORT_EXCEPT_NOT_FOUND)) !=
(Item **)not_found_item)
break;
table_list= sl->get_table_list();
if (sl->insert_select && table_list)
if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list)
{
// it is primary INSERT st_select_lex => skip first table resolving
table_list= table_list->next;
@ -1442,7 +1453,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
max_length= (*ref)->max_length;
maybe_null= (*ref)->maybe_null;
decimals= (*ref)->decimals;
set_charset((*ref)->charset());
collation.set((*ref)->collation);
with_sum_func= (*ref)->with_sum_func;
fixed= 1;

View File

@ -83,7 +83,6 @@ public:
};
class Item {
uint loop_id; /* Used to find selfrefering loops */
Item(const Item &); /* Prevent use of these */
void operator=(Item &);
public:
@ -374,7 +373,7 @@ public:
Item_uint(const char *str_arg, uint length) :
Item_int(str_arg, (longlong) strtoull(str_arg,(char**) 0,10), length) {}
Item_uint(uint32 i) :Item_int((longlong) i, 10) {}
double val() { return ulonglong2double(value); }
double val() { return ulonglong2double((ulonglong)value); }
String *val_str(String*);
Item *new_item() { return new Item_uint(name,max_length); }
bool fix_fields(THD *thd, struct st_table_list *list, Item **item)

View File

@ -24,6 +24,32 @@
#include "mysql_priv.h"
#include <m_ctype.h>
static Item_result item_store_type(Item_result a,Item_result b)
{
if (a == STRING_RESULT || b == STRING_RESULT)
return STRING_RESULT;
else if (a == REAL_RESULT || b == REAL_RESULT)
return REAL_RESULT;
else
return INT_RESULT;
}
static void agg_result_type(Item_result *type, Item **items, uint nitems)
{
uint i;
type[0]= items[0]->result_type();
for (i=1 ; i < nitems ; i++)
type[0]= item_store_type(type[0], items[i]->result_type());
}
static void agg_cmp_type(Item_result *type, Item **items, uint nitems)
{
uint i;
type[0]= items[0]->result_type();
for (i=1 ; i < nitems ; i++)
type[0]= item_cmp_type(type[0], items[i]->result_type());
}
static void my_coll_agg_error(DTCollation &c1, DTCollation &c2, const char *fname)
{
my_error(ER_CANT_AGGREGATE_2COLLATIONS,MYF(0),
@ -223,7 +249,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
We must set cmp_charset here as we may be called from for an automatic
generated item, like in natural join
*/
if (cmp_collation.set((*a)->collation, (*b)->collation))
if (cmp_collation.set((*a)->collation, (*b)->collation) ||
cmp_collation.derivation == DERIVATION_NONE)
{
my_coll_agg_error((*a)->collation, (*b)->collation, owner->func_name());
return 1;
@ -556,10 +583,7 @@ void Item_func_between::fix_length_and_dec()
*/
if (!args[0] || !args[1] || !args[2])
return;
cmp_type=item_cmp_type(args[0]->result_type(),
item_cmp_type(args[1]->result_type(),
args[2]->result_type()));
agg_cmp_type(&cmp_type, args, 3);
if (cmp_type == STRING_RESULT &&
agg_arg_collations_for_comparison(cmp_collation, args, 3))
return;
@ -650,28 +674,17 @@ longlong Item_func_between::val_int()
return 0;
}
static Item_result item_store_type(Item_result a,Item_result b)
{
if (a == STRING_RESULT || b == STRING_RESULT)
return STRING_RESULT;
else if (a == REAL_RESULT || b == REAL_RESULT)
return REAL_RESULT;
else
return INT_RESULT;
}
void
Item_func_ifnull::fix_length_and_dec()
{
maybe_null=args[1]->maybe_null;
max_length=max(args[0]->max_length,args[1]->max_length);
decimals=max(args[0]->decimals,args[1]->decimals);
if ((cached_result_type=item_store_type(args[0]->result_type(),
args[1]->result_type())) !=
REAL_RESULT)
decimals= 0;
agg_result_type(&cached_result_type, args, 2);
if (cached_result_type == STRING_RESULT)
agg_arg_collations(collation, args, arg_count);
else if (cached_result_type != REAL_RESULT)
decimals= 0;
}
@ -744,19 +757,18 @@ Item_func_if::fix_length_and_dec()
cached_result_type= arg1_type;
set_charset(args[1]->charset());
}
else if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT)
{
cached_result_type = STRING_RESULT;
if (agg_arg_collations(collation, args+1, 2))
return;
}
else
{
set_charset(&my_charset_bin); // Number
if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT)
cached_result_type = REAL_RESULT;
agg_result_type(&cached_result_type, args+1, 2);
if (cached_result_type == STRING_RESULT)
{
if (agg_arg_collations(collation, args+1, 2))
return;
}
else
cached_result_type=arg1_type; // Should be INT_RESULT
{
set_charset(&my_charset_bin); // Number
}
}
}
@ -800,7 +812,7 @@ Item_func_nullif::fix_length_and_dec()
{
max_length=args[0]->max_length;
decimals=args[0]->decimals;
cached_result_type=args[0]->result_type();
agg_result_type(&cached_result_type, args, 2);
}
}
@ -863,58 +875,60 @@ Item *Item_func_case::find_item(String *str)
String *first_expr_str,*tmp;
longlong first_expr_int;
double first_expr_real;
bool int_used, real_used,str_used;
int_used=real_used=str_used=0;
/* These will be initialized later */
LINT_INIT(first_expr_str);
LINT_INIT(first_expr_int);
LINT_INIT(first_expr_real);
if (first_expr_num != -1)
{
switch (cmp_type)
{
case STRING_RESULT:
// We can't use 'str' here as this may be overwritten
if (!(first_expr_str= args[first_expr_num]->val_str(&str_value)))
return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible
break;
case INT_RESULT:
first_expr_int= args[first_expr_num]->val_int();
if (args[first_expr_num]->null_value)
return else_expr_num != -1 ? args[else_expr_num] : 0;
break;
case REAL_RESULT:
first_expr_real= args[first_expr_num]->val();
if (args[first_expr_num]->null_value)
return else_expr_num != -1 ? args[else_expr_num] : 0;
break;
case ROW_RESULT:
default:
// This case should never be choosen
DBUG_ASSERT(0);
break;
}
}
// Compare every WHEN argument with it and return the first match
for (uint i=0 ; i < ncases ; i+=2)
{
if (first_expr_num == -1)
{
// No expression between CASE and first WHEN
// No expression between CASE and the first WHEN
if (args[i]->val_int())
return args[i+1];
continue;
}
switch (args[i]->result_type()) {
switch (cmp_type) {
case STRING_RESULT:
if (!str_used)
{
str_used=1;
// We can't use 'str' here as this may be overwritten
if (!(first_expr_str= args[first_expr_num]->val_str(&str_value)))
return else_expr_num != -1 ? args[else_expr_num] : 0; // Impossible
}
if ((tmp=args[i]->val_str(str))) // If not null
{
if (sortcmp(tmp,first_expr_str,&my_charset_bin)==0)
if (sortcmp(tmp,first_expr_str,cmp_collation.collation)==0)
return args[i+1];
}
break;
case INT_RESULT:
if (!int_used)
{
int_used=1;
first_expr_int= args[first_expr_num]->val_int();
if (args[first_expr_num]->null_value)
return else_expr_num != -1 ? args[else_expr_num] : 0;
}
if (args[i]->val_int()==first_expr_int && !args[i]->null_value)
return args[i+1];
break;
case REAL_RESULT:
if (!real_used)
{
real_used=1;
first_expr_real= args[first_expr_num]->val();
if (args[first_expr_num]->null_value)
return else_expr_num != -1 ? args[else_expr_num] : 0;
}
if (args[i]->val()==first_expr_real && !args[i]->null_value)
return args[i+1];
break;
@ -982,22 +996,6 @@ double Item_func_case::val()
return res;
}
static void agg_result_type(Item_result *type, Item **items, uint nitems)
{
uint i;
type[0]= items[0]->result_type();
for (i=1 ; i < nitems ; i++)
type[0]= item_store_type(type[0], items[i]->result_type());
}
static void agg_cmp_type(Item_result *type, Item **items, uint nitems)
{
uint i;
type[0]= items[0]->result_type();
for (i=1 ; i < nitems ; i++)
type[0]= item_cmp_type(type[0], items[i]->result_type());
}
void Item_func_case::fix_length_and_dec()
{
Item **agg;
@ -1027,7 +1025,7 @@ void Item_func_case::fix_length_and_dec()
{
agg[0]= args[first_expr_num];
for (nagg= 0; nagg < ncases/2 ; nagg++)
agg[nagg+1]= args[nagg];
agg[nagg+1]= args[nagg*2];
nagg++;
agg_cmp_type(&cmp_type, agg, nagg);
if ((cmp_type == STRING_RESULT) &&
@ -1040,7 +1038,6 @@ void Item_func_case::fix_length_and_dec()
max_length=0;
decimals=0;
cached_result_type = args[1]->result_type();
for (uint i=0 ; i < ncases ; i+=2)
{
set_if_bigger(max_length,args[i+1]->max_length);
@ -1108,13 +1105,11 @@ void Item_func_coalesce::fix_length_and_dec()
{
max_length= 0;
decimals= 0;
cached_result_type = args[0]->result_type();
agg_result_type(&cached_result_type, args, arg_count);
for (uint i=0 ; i < arg_count ; i++)
{
set_if_bigger(max_length,args[i]->max_length);
set_if_bigger(decimals,args[i]->decimals);
cached_result_type=item_store_type(cached_result_type,
args[i]->result_type());
}
if (cached_result_type == STRING_RESULT)
agg_arg_collations(collation, args, arg_count);
@ -1404,7 +1399,8 @@ void Item_func_in::fix_length_and_dec()
Item **arg, **arg_end;
uint const_itm= 1;
if ((args[0]->result_type() == STRING_RESULT) &&
agg_cmp_type(&cmp_type, args, arg_count);
if ((cmp_type == STRING_RESULT) &&
(agg_arg_collations_for_comparison(cmp_collation, args, arg_count)))
return;
@ -1417,7 +1413,7 @@ void Item_func_in::fix_length_and_dec()
*/
if (const_itm && !nulls_in_row())
{
switch (args[0]->result_type()) {
switch (cmp_type) {
case STRING_RESULT:
uint i;
array=new in_string(arg_count-1,(qsort2_cmp) srtcmp_in,
@ -1451,7 +1447,7 @@ void Item_func_in::fix_length_and_dec()
else
{
in_item= cmp_item::get_comparator(args[0]);
if (args[0]->result_type() == STRING_RESULT)
if (cmp_type == STRING_RESULT)
in_item->cmp_charset= cmp_collation.collation;
}
maybe_null= args[0]->maybe_null;

View File

@ -611,6 +611,7 @@ public:
class Item_func_in :public Item_int_func
{
Item_result cmp_type;
in_vector *array;
cmp_item *in_item;
bool have_null;

View File

@ -470,7 +470,7 @@ Item *create_load_file(Item* a)
}
Item *create_func_cast(Item *a, Item_cast cast_type, CHARSET_INFO *cs)
Item *create_func_cast(Item *a, Cast_target cast_type, CHARSET_INFO *cs)
{
Item *res;
LINT_INIT(res);

View File

@ -28,7 +28,7 @@ Item *create_func_bit_length(Item* a);
Item *create_func_coercibility(Item* a);
Item *create_func_ceiling(Item* a);
Item *create_func_char_length(Item* a);
Item *create_func_cast(Item *a, Item_cast cast_type, CHARSET_INFO *cs);
Item *create_func_cast(Item *a, Cast_target cast_type, CHARSET_INFO *cs);
Item *create_func_connection_id(void);
Item *create_func_conv(Item* a, Item *b, Item *c);
Item *create_func_cos(Item* a);

View File

@ -597,7 +597,8 @@ void Item_func_neg::fix_length_and_dec()
{
decimals=args[0]->decimals;
max_length=args[0]->max_length;
hybrid_type= args[0]->result_type() == INT_RESULT ? INT_RESULT : REAL_RESULT;
hybrid_type= args[0]->result_type() == INT_RESULT && !args[0]->unsigned_flag ?
INT_RESULT : REAL_RESULT;
}
double Item_func_abs::val()

View File

@ -1066,7 +1066,7 @@ public:
/* For type casts */
enum Item_cast
enum Cast_target
{
ITEM_CAST_BINARY, ITEM_CAST_SIGNED_INT, ITEM_CAST_UNSIGNED_INT,
ITEM_CAST_DATE, ITEM_CAST_TIME, ITEM_CAST_DATETIME, ITEM_CAST_CHAR

View File

@ -2206,7 +2206,13 @@ void Item_func_set_collation::fix_length_and_dec()
set_collation= get_charset_by_csname(args[0]->charset()->csname,
MY_CS_BINSORT,MYF(0));
else
set_collation= get_charset_by_name(colname,MYF(0));
{
if (!(set_collation= get_charset_by_name(colname,MYF(0))))
{
my_error(ER_UNKNOWN_COLLATION, MYF(0), colname);
return;
}
}
if (!set_collation || !my_charset_same(args[0]->charset(),set_collation))
{

View File

@ -508,7 +508,7 @@ void Item_in_subselect::single_value_transformer(THD *thd,
{
sl->item_list.push_back(item);
setup_ref_array(thd, &sl->ref_pointer_array,
1 + sl->select_items +
1 + sl->select_n_having_items +
sl->order_list.elements + sl->group_list.elements);
// To prevent crash on Item_ref_null_helper destruction in case of error
sl->ref_pointer_array[0]= 0;
@ -759,6 +759,7 @@ static Item_result set_row(SELECT_LEX *select_lex, Item * item,
if (!(row[i]= Item_cache::get_cache(res_type)))
return STRING_RESULT; // we should return something
row[i]->set_len_n_dec(sel_item->max_length, sel_item->decimals);
row[i]->collation.set(sel_item->collation);
}
}
if (select_lex->item_list.elements > 1)
@ -770,6 +771,7 @@ void subselect_single_select_engine::fix_length_and_dec(Item_cache **row)
{
DBUG_ASSERT(row || select_lex->item_list.elements==1);
res_type= set_row(select_lex, item, row, &maybe_null);
item->collation.set(row[0]->collation);
if (cols() != 1)
maybe_null= 0;
}

View File

@ -199,7 +199,7 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
decimals=item->decimals;
maybe_null=item->maybe_null;
unsigned_flag=item->unsigned_flag;
set_charset(item->charset());
collation.set(item->collation);
result_field=0;
null_value=1;
fix_length_and_dec();

View File

@ -221,6 +221,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
#define MODE_MYSQL323 32768
#define MODE_MYSQL40 65536
#define MODE_ANSI (MODE_MYSQL40*2)
#define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2)
#define RAID_BLOCK_SIZE 1024

View File

@ -212,7 +212,7 @@ const char *sql_mode_names[] =
"?", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION",
"POSTGRESQL", "ORACLE", "MSSQL", "DB2", "SAPDB", "NO_KEY_OPTIONS",
"NO_TABLE_OPTIONS", "NO_FIELD_OPTIONS", "MYSQL323", "MYSQL40", "ANSI",
NullS
"NO_AUTO_VALUE_ON_ZERO", NullS
};
TYPELIB sql_mode_typelib= { array_elements(sql_mode_names)-1,"",
sql_mode_names };
@ -225,6 +225,13 @@ const char *localhost= "localhost", *delayed_user= "DELAYED";
#endif
bool opt_large_files= sizeof(my_off_t) > 4;
/*
Used with --help for detailed option
*/
bool opt_help= 0;
bool opt_verbose= 0;
arg_cmp_func Arg_comparator::comparator_matrix[4][2] =
{{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string},
{&Arg_comparator::compare_real, &Arg_comparator::compare_e_real},
@ -3636,8 +3643,12 @@ Disable with --skip-bdb (will save memory).",
"Percentage of dirty pages allowed in bufferpool.", (gptr*) &srv_max_buf_pool_modified_pct,
(gptr*) &srv_max_buf_pool_modified_pct, 0, GET_ULONG, REQUIRED_ARG, 90, 0, 100, 0, 0, 0},
#endif /* End HAVE_INNOBASE_DB */
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0},
{"help", '?', "Display this help and exit.",
(gptr*) &opt_help, (gptr*) &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"verbose", 'v', "Used with --help option for detailed help",
(gptr*) &opt_verbose, (gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"init-file", OPT_INIT_FILE, "Read SQL commands from this file at startup.",
(gptr*) &opt_init_file, (gptr*) &opt_init_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@ -3973,8 +3984,6 @@ replicating a LOAD DATA INFILE command.",
0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'v', "Synonym for option -V.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0},
{"log-warnings", 'W', "Log some not critical warnings to the log file.",
(gptr*) &global_system_variables.log_warnings,
(gptr*) &max_system_variables.log_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0,
@ -4573,6 +4582,10 @@ and you are welcome to modify and redistribute it under the GPL license\n\
Starts the MySQL server\n");
printf("Usage: %s [OPTIONS]\n", my_progname);
if (!opt_verbose)
puts("\nFor more help options (several pages), use mysqld --verbose --help\n");
else
{
#ifdef __WIN__
puts("NT and Win32 specific options:\n\
--install Install the default service (NT)\n\
@ -4596,7 +4609,8 @@ Starts the MySQL server\n");
puts("\n\
To see what values a running MySQL server is using, type\n\
'mysqladmin variables' instead of 'mysqld --help'.");
'mysqladmin variables' instead of 'mysqld --verbose --help'.\n");
}
}
@ -4870,14 +4884,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
#endif
#include <sslopt-case.h>
case 'v':
case 'V':
print_version();
exit(0);
case 'I':
case '?':
usage();
exit(0);
case 'T':
test_flags= argument ? (uint) atoi(argument) : 0;
test_flags&= ~TEST_NO_THREADS;
@ -5351,6 +5360,11 @@ static void get_options(int argc,char **argv)
exit(ho_error);
}
if (opt_help)
{
usage();
exit(0);
}
#if defined(HAVE_BROKEN_REALPATH)
my_use_symdir=0;
my_disable_symlinks=1;

View File

@ -30,7 +30,10 @@
3 byte length & 1 byte package-number.
*/
#ifndef EMBEDDED_LIBRARY
/*
HFTODO this must be hidden if we don't want client capabilities in
embedded library
*/
#ifdef __WIN__
#include <winsock.h>
#endif
@ -46,6 +49,17 @@
#include <signal.h>
#include <errno.h>
#ifdef EMBEDDED_LIBRARY
#undef net_flush
extern "C" {
my_bool net_flush(NET *net);
}
#endif /*EMBEDDED_LIBRARY */
/*
The following handles the differences when this is linked between the
client and the server.
@ -959,5 +973,3 @@ my_net_read(NET *net)
return len;
}
#endif /* #ifndef EMBEDDED_LIBRARY */

View File

@ -83,6 +83,7 @@ void send_error(THD *thd, uint sql_errno, const char *err)
#ifdef EMBEDDED_LIBRARY
net->last_errno= sql_errno;
strmake(net->last_error, err, sizeof(net->last_error)-1);
strmov(net->sqlstate, mysql_errno_to_sqlstate(sql_errno));
#else
if (net->vio == 0)
@ -230,12 +231,12 @@ net_printf(THD *thd, uint errcode, ...)
#else
net->last_errno= errcode;
strmake(net->last_error, text_pos, length);
strmake(net->sqlstate, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH);
#endif
thd->is_fatal_error=0; // Error message is given
DBUG_VOID_RETURN;
}
/*
Return ok to the client.
@ -350,40 +351,6 @@ send_eof(THD *thd, bool no_flush)
}
#endif /* EMBEDDED_LIBRARY */
/****************************************************************************
Store a field length in logical packet
This is used to code the string length for normal protocol
****************************************************************************/
char *
net_store_length(char *pkg, ulonglong length)
{
uchar *packet=(uchar*) pkg;
if (length < LL(251))
{
*packet=(uchar) length;
return (char*) packet+1;
}
/* 251 is reserved for NULL */
if (length < LL(65536))
{
*packet++=252;
int2store(packet,(uint) length);
return (char*) packet+2;
}
if (length < LL(16777216))
{
*packet++=253;
int3store(packet,(ulong) length);
return (char*) packet+3;
}
*packet++=254;
int8store(packet,length);
return (char*) packet+8;
}
/*
Faster net_store_length when we know length is a 32 bit integer
*/

View File

@ -1240,7 +1240,7 @@ bool sys_var_collation::check(THD *thd, set_var *var)
if (!(tmp=get_charset_by_name(res->c_ptr(),MYF(0))))
{
my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), res->c_ptr());
my_error(ER_UNKNOWN_COLLATION, MYF(0), res->c_ptr());
return 1;
}
var->save_result.charset= tmp; // Save for update

View File

@ -34,9 +34,9 @@
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 54 75 76 77 78 79 7A 5B 5C 5D 5E 5F
70 71 72 73 74 75 76 77 78 79 7A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 54 75 76 77 78 79 7A 7B 7C 7D 7E 7F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
90 83 82 83 84 85 86 87 88 89 9A 8B 9C 9D 9E 9F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A2 A2 BC A4 B4 A6 A7 B8 A9 BA AB AC AD AE BF
@ -56,9 +56,9 @@
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 74 55 56 57 58 59 5A 5B 5C 5D 5E 5F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 74 55 56 57 58 59 5A 7B 7C 7D 7E 7F
50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
80 81 82 81 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
80 91 92 93 94 95 96 97 98 99 8A 9B 8C 9D 8E 8F
A0 A1 A1 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF

View File

@ -54,8 +54,8 @@ v/*
"M-Bálo prostoru/pamìti pro thread",
"Nemohu zjistit jm-Béno stroje pro Va¹i adresu",
"Chyba p-Bøi ustavování spojení",
"P-Břístup pro uživatele '%-.32s@%-.64s' k databázi '%-.64s' není povolen",
"P-Břístup pro uživatele '%-.32s@%-.64s' (s heslem %s)",
"P-Břístup pro uživatele '%-.32s'@'%-.64s' k databázi '%-.64s' není povolen",
"P-Břístup pro uživatele '%-.32s'@'%-.64s' (s heslem %s)",
"Nebyla vybr-Bána ¾ádná databáze",
"Nezn-Bámý pøíkaz",
"Sloupec '%-.64s' nem-Bù¾e být null",
@ -152,8 +152,8 @@ v/*
"Regul-Bární výraz vrátil chybu '%-.64s'",
"Pokud nen-Bí ¾ádná GROUP BY klauzule, není dovoleno souèasné pou¾ití GROUP polo¾ek (MIN(),MAX(),COUNT()...) s ne GROUP polo¾kami",
"Neexistuje odpov-Bídající grant pro u¾ivatele '%-.32s' na stroji '%-.64s'",
"%-.16s p-Bříkaz nepřístupný pro uživatele: '%-.32s@%-.64s' pro tabulku '%-.64s'",
"%-.16s p-Bříkaz nepřístupný pro uživatele: '%-.32s@%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'",
"%-.16s p-Bříkaz nepřístupný pro uživatele: '%-.32s'@'%-.64s' pro tabulku '%-.64s'",
"%-.16s p-Bříkaz nepřístupný pro uživatele: '%-.32s'@'%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'",
"Neplatn-Bý pøíkaz GRANT/REVOKE. Prosím, pøeètìte si v manuálu, jaká privilegia je mo¾né pou¾ít.",
"Argument p-Bøíkazu GRANT u¾ivatel nebo stroj je pøíli¹ dlouhý",
"Tabulka '%-.64s.%s' neexistuje",
@ -221,7 +221,7 @@ v/*
"DROP DATABASE not allowed while thread is holding global read lock",
"CREATE DATABASE not allowed while thread is holding global read lock",
"Wrong arguments to %s",
"%-.32s@%-.64s is not allowed to create new users",
"'%-.32s'@'%-.64s' is not allowed to create new users",
"Incorrect table definition; all MERGE tables must be in the same database",
"Deadlock found when trying to get lock; Try restarting transaction",
"The used table type doesn't support FULLTEXT indexes",
@ -276,3 +276,4 @@ v/*
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",

View File

@ -48,8 +48,8 @@
"Udgået for tråde/hukommelse",
"Kan ikke få værtsnavn for din adresse",
"Forkert håndtryk (handshake)",
"Adgang nægtet bruger: '%-.32s@%-.64s' til databasen '%-.64s'",
"Adgang nægtet bruger: '%-.32s@%-.64s' (Bruger adgangskode: %s)",
"Adgang nægtet bruger: '%-.32s'@'%-.64s' til databasen '%-.64s'",
"Adgang nægtet bruger: '%-.32s'@'%-.64s' (Bruger adgangskode: %s)",
"Ingen database valgt",
"Ukendt kommando",
"Kolonne '%-.64s' kan ikke være NULL",
@ -146,8 +146,8 @@
"Fik fejl '%-.64s' fra regexp",
"Sammenblanding af GROUP kolonner (MIN(),MAX(),COUNT()...) uden GROUP kolonner er ikke tilladt, hvis der ikke er noget GROUP BY prædikat",
"Denne tilladelse findes ikke for brugeren '%-.32s' på vært '%-.64s'",
"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s@%-.64s' for tabellen '%-.64s'",
"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s@%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'",
"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for tabellen '%-.64s'",
"%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'",
"Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres.",
"Værts- eller brugernavn for langt til GRANT",
"Tabellen '%-.64s.%-.64s' eksisterer ikke",
@ -215,7 +215,7 @@
"DROP DATABASE er ikke tilladt mens en tråd holder på globalt read lock",
"CREATE DATABASE er ikke tilladt mens en tråd holder på globalt read lock",
"Wrong arguments to %s",
"%-.32s@%-.64s is not allowed to create new users",
"'%-.32s'@'%-.64s' is not allowed to create new users",
"Incorrect table definition; all MERGE tables must be in the same database",
"Deadlock found when trying to get lock; Try restarting transaction",
"The used table type doesn't support FULLTEXT indexes",
@ -270,3 +270,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",

View File

@ -56,8 +56,8 @@
"Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen",
"Kan de hostname niet krijgen van uw adres",
"Verkeerde handshake",
"Toegang geweigerd voor gebruiker: '%-.32s@%-.64s' naar database '%-.64s'",
"Toegang geweigerd voor gebruiker: '%-.32s@%-.64s' (Wachtwoord gebruikt: %s)",
"Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' naar database '%-.64s'",
"Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' (Wachtwoord gebruikt: %s)",
"Geen database geselecteerd",
"Onbekend commando",
"Kolom '%-.64s' kan niet null zijn",
@ -154,8 +154,8 @@
"Fout '%-.64s' ontvangen van regexp",
"Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is",
"Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s'",
"%-.16s commando geweigerd voor gebruiker: '%-.32s@%-.64s' voor tabel '%-.64s'",
"%-.16s commando geweigerd voor gebruiker: '%-.32s@%-.64s' voor kolom '%-.64s' in tabel '%-.64s'",
"%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor tabel '%-.64s'",
"%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor kolom '%-.64s' in tabel '%-.64s'",
"Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden.",
"De host of gebruiker parameter voor GRANT is te lang",
"Tabel '%-.64s.%s' bestaat niet",
@ -223,7 +223,7 @@
"DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit",
"CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit",
"Foutieve parameters voor %s",
"%-.32s@%-.64s mag geen nieuwe gebruikers creeren",
"'%-.32s'@'%-.64s' mag geen nieuwe gebruikers creeren",
"Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren",
"Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie",
"Het gebruikte tabel type ondersteund geen FULLTEXT indexen",
@ -278,3 +278,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",

View File

@ -45,8 +45,8 @@
"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",
"Can't get hostname for your address",
"Bad handshake",
"Access denied for user: '%-.32s@%-.64s' to database '%-.64s'",
"Access denied for user: '%-.32s@%-.64s' (Using password: %s)",
"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'",
"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)",
"No Database Selected",
"Unknown command",
"Column '%-.64s' cannot be null",
@ -143,8 +143,8 @@
"Got error '%-.64s' from regexp",
"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause",
"There is no such grant defined for user '%-.32s' on host '%-.64s'",
"%-.16s command denied to user: '%-.32s@%-.64s' for table '%-.64s'",
"%-.16s command denied to user: '%-.32s@%-.64s' for column '%-.64s' in table '%-.64s'",
"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'",
"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'",
"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used",
"The host or user argument to GRANT is too long",
"Table '%-.64s.%-.64s' doesn't exist",
@ -179,7 +179,7 @@
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
"Key '%-.64s' doesn't exist in table '%-.64s'",
"Can't open table",
"The storage enginge for the table doesn't support %s",
"The storage engine for the table doesn't support %s",
"You are not allowed to execute this command in a transaction",
"Got error %d during COMMIT",
"Got error %d during ROLLBACK",
@ -212,7 +212,7 @@
"DROP DATABASE not allowed while thread is holding global read lock",
"CREATE DATABASE not allowed while thread is holding global read lock",
"Wrong arguments to %s",
"%-.32s@%-.64s is not allowed to create new users",
"'%-.32s'@'%-.64s' is not allowed to create new users",
"Incorrect table definition; all MERGE tables must be in the same database",
"Deadlock found when trying to get lock; Try restarting transaction",
"The used table type doesn't support FULLTEXT indexes",
@ -272,3 +272,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",

View File

@ -50,8 +50,8 @@
"Mälu sai otsa. Võimalik, et aitab swap-i lisamine või käsu 'ulimit' abil MySQL-le rohkema mälu kasutamise lubamine",
"Ei suuda lahendada IP aadressi masina nimeks",
"Väär handshake",
"Ligipääs keelatud kasutajale '%-.32s@%-.64s' andmebaasile '%-.64s'",
"Ligipääs keelatud kasutajale '%-.32s@%-.64s' (kasutab parooli: %s)",
"Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' andmebaasile '%-.64s'",
"Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' (kasutab parooli: %s)",
"Andmebaasi ei ole valitud",
"Tundmatu käsk",
"Tulp '%-.64s' ei saa omada nullväärtust",
@ -148,8 +148,8 @@
"regexp tagastas vea '%-.64s'",
"GROUP tulpade (MIN(),MAX(),COUNT()...) kooskasutamine tavaliste tulpadega ilma GROUP BY klauslita ei ole lubatud",
"Sellist õigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s'",
"%-.16s käsk ei ole lubatud kasutajale '%-.32s@%-.64s' tabelis '%-.64s'",
"%-.16s käsk ei ole lubatud kasutajale '%-.32s@%-.64s' tulbale '%-.64s' tabelis '%-.64s'",
"%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tabelis '%-.64s'",
"%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tulbale '%-.64s' tabelis '%-.64s'",
"Vigane GRANT/REVOKE käsk. Tutvu kasutajajuhendiga",
"Masina või kasutaja nimi GRANT lauses on liiga pikk",
"Tabelit '%-.64s.%-.64s' ei eksisteeri",
@ -217,7 +217,7 @@
"DROP DATABASE ei ole lubatud kui lõim omab globaalset READ lukku",
"CREATE DATABASE ei ole lubatud kui lõim omab globaalset READ lukku",
"Vigased parameetrid %s-le",
"Kasutajal %-.32s@%-.64s ei ole lubatud luua uusi kasutajaid",
"Kasutajal '%-.32s'@'%-.64s' ei ole lubatud luua uusi kasutajaid",
"Vigane tabelimääratlus; kõik MERGE tabeli liikmed peavad asuma samas andmebaasis",
"Lukustamisel tekkis tupik (deadlock); alusta transaktsiooni otsast",
"Antud tabelitüüp ei toeta FULLTEXT indekseid",
@ -272,3 +272,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",

Some files were not shown because too many files have changed in this diff Show More