mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
merge
This commit is contained in:
commit
652a29711b
88 changed files with 6315 additions and 536 deletions
|
@ -97,6 +97,7 @@ joerg@mysql.com
|
|||
joreland@mysql.com
|
||||
jorge@linux.jorge.mysql.com
|
||||
jplindst@t41.(none)
|
||||
kaa@polly.local
|
||||
kaj@work.mysql.com
|
||||
kent@mysql.com
|
||||
konstantin@mysql.com
|
||||
|
|
29
config/ac-macros/ha_federated.m4
Normal file
29
config/ac-macros/ha_federated.m4
Normal file
|
@ -0,0 +1,29 @@
|
|||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CHECK_FEDERATED
|
||||
dnl Sets HAVE_FEDERATED if --with-federated-storage-engine is used
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_CHECK_FEDERATED], [
|
||||
AC_ARG_WITH([federated-storage-engine],
|
||||
[
|
||||
--with-federated-storage-engine
|
||||
Enable the MySQL Storage Engine],
|
||||
[federateddb="$withval"],
|
||||
[federateddb=no])
|
||||
AC_MSG_CHECKING([for MySQL federated storage engine])
|
||||
|
||||
case "$federateddb" in
|
||||
yes )
|
||||
AC_DEFINE([HAVE_FEDERATED_DB], [1], [Define to enable Federated Handler])
|
||||
AC_MSG_RESULT([yes])
|
||||
[federateddb=yes]
|
||||
;;
|
||||
* )
|
||||
AC_MSG_RESULT([no])
|
||||
[federateddb=no]
|
||||
;;
|
||||
esac
|
||||
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl END OF MYSQL_CHECK_FEDERATED SECTION
|
||||
dnl ---------------------------------------------------------------------------
|
22
configure.in
22
configure.in
|
@ -17,7 +17,7 @@ SHARED_LIB_VERSION=14:0:0
|
|||
# ndb version
|
||||
NDB_VERSION_MAJOR=5
|
||||
NDB_VERSION_MINOR=0
|
||||
NDB_VERSION_BUILD=2
|
||||
NDB_VERSION_BUILD=3
|
||||
NDB_VERSION_STATUS="alpha"
|
||||
|
||||
# Set all version vars based on $VERSION. How do we do this more elegant ?
|
||||
|
@ -38,6 +38,7 @@ sinclude(config/ac-macros/compiler_flag.m4)
|
|||
sinclude(config/ac-macros/ha_archive.m4)
|
||||
sinclude(config/ac-macros/ha_berkeley.m4)
|
||||
sinclude(config/ac-macros/ha_example.m4)
|
||||
sinclude(config/ac-macros/ha_federated.m4)
|
||||
sinclude(config/ac-macros/ha_innodb.m4)
|
||||
sinclude(config/ac-macros/ha_isam.m4)
|
||||
sinclude(config/ac-macros/ha_ndbcluster.m4)
|
||||
|
@ -748,7 +749,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
|
|||
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
|
||||
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
||||
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
||||
sys/ioctl.h malloc.h sys/malloc.h linux/config.h sys/resource.h sys/param.h)
|
||||
sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h sys/resource.h sys/param.h)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for system libraries. Adds the library to $LIBS
|
||||
|
@ -775,6 +776,22 @@ AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt]))
|
|||
AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init))
|
||||
MYSQL_CHECK_ZLIB_WITH_COMPRESS
|
||||
|
||||
# For large pages support
|
||||
if test "$IS_LINUX" = "true"
|
||||
then
|
||||
# For SHM_HUGETLB on Linux
|
||||
AC_CHECK_DECLS(SHM_HUGETLB,
|
||||
AC_DEFINE([HAVE_LARGE_PAGES], [1],
|
||||
[Define if you have large pages support])
|
||||
AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1],
|
||||
[Define if /proc/meminfo shows the huge page size (Linux only)])
|
||||
, ,
|
||||
[
|
||||
#include <sys/shm.h>
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for TCP wrapper support
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -2420,6 +2437,7 @@ MYSQL_CHECK_EXAMPLEDB
|
|||
MYSQL_CHECK_ARCHIVEDB
|
||||
MYSQL_CHECK_CSVDB
|
||||
MYSQL_CHECK_NDBCLUSTER
|
||||
MYSQL_CHECK_FEDERATED
|
||||
|
||||
# If we have threads generate some library functions and test programs
|
||||
sql_server_dirs=
|
||||
|
|
|
@ -85,7 +85,7 @@ enum my_lex_states
|
|||
{
|
||||
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
|
||||
MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
|
||||
MY_LEX_REAL, MY_LEX_HEX_NUMBER,
|
||||
MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
|
||||
MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
|
||||
MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
|
||||
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
|
||||
|
|
|
@ -182,7 +182,8 @@ enum ha_base_keytype {
|
|||
HA_KEYTYPE_UINT24=13,
|
||||
HA_KEYTYPE_INT8=14,
|
||||
HA_KEYTYPE_VARTEXT=15, /* Key is sorted as letters */
|
||||
HA_KEYTYPE_VARBINARY=16 /* Key is sorted as unsigned chars */
|
||||
HA_KEYTYPE_VARBINARY=16, /* Key is sorted as unsigned chars */
|
||||
HA_KEYTYPE_BIT=17
|
||||
};
|
||||
|
||||
#define HA_MAX_KEYTYPE 31 /* Must be log2-1 */
|
||||
|
|
|
@ -34,6 +34,8 @@ typedef struct st_HA_KEYSEG /* Key-portion */
|
|||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
CHARSET_INFO *charset;
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
} HA_KEYSEG;
|
||||
|
||||
#define get_key_length(length,key) \
|
||||
|
@ -64,6 +66,21 @@ typedef struct st_HA_KEYSEG /* Key-portion */
|
|||
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
|
||||
((1 << (bit_len)) - 1))
|
||||
|
||||
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
|
||||
{ \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ((1 << (bit_ofs)) - 1)) | \
|
||||
((bits) << (bit_ofs)); \
|
||||
if ((bit_ofs) + (bit_len) > 8) \
|
||||
(bit_ptr)[1]= ((bits) & ((1 << (bit_len)) - 1)) >> (8 - (bit_ofs)); \
|
||||
}
|
||||
|
||||
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
|
||||
|
||||
extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
||||
my_bool, my_bool);
|
||||
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
||||
|
|
|
@ -72,6 +72,11 @@ C_MODE_START
|
|||
#define in_addr_t uint32
|
||||
#endif
|
||||
|
||||
/* On some operating systems (e.g. Solaris) INADDR_NONE is not defined */
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE -1 /* Error value from inet_addr */
|
||||
#endif
|
||||
|
||||
/* Thread safe or portable version of some functions */
|
||||
|
||||
void my_inet_ntoa(struct in_addr in, char *buf);
|
||||
|
|
|
@ -168,6 +168,16 @@ extern char *my_strdup_with_length(const byte *from, uint length,
|
|||
#define TRASH(A,B) /* nothing */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern uint my_get_large_page_size(void);
|
||||
extern gptr my_large_malloc(uint size, myf my_flags);
|
||||
extern void my_large_free(gptr ptr, myf my_flags);
|
||||
#else
|
||||
#define my_get_large_page_size() (0)
|
||||
#define my_large_malloc(A,B) my_malloc_lock((A),(B))
|
||||
#define my_large_free(A,B) my_free_lock((A),(B))
|
||||
#endif /* HAVE_LARGE_PAGES */
|
||||
|
||||
#ifdef HAVE_ALLOCA
|
||||
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
|
||||
#pragma alloca
|
||||
|
@ -213,6 +223,11 @@ extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
|
|||
myf MyFlags);
|
||||
extern uint my_file_limit;
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern my_bool my_use_large_pages;
|
||||
extern uint my_large_page_size;
|
||||
#endif
|
||||
|
||||
/* charsets */
|
||||
extern CHARSET_INFO *default_charset_info;
|
||||
extern CHARSET_INFO *all_charsets[256];
|
||||
|
|
|
@ -145,7 +145,8 @@ enum mysql_option
|
|||
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, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH
|
||||
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
|
||||
MYSQL_REPORT_DATA_TRUNCATION
|
||||
};
|
||||
|
||||
struct st_mysql_options {
|
||||
|
@ -186,6 +187,8 @@ struct st_mysql_options {
|
|||
char *client_ip;
|
||||
/* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
|
||||
my_bool secure_auth;
|
||||
/* 0 - never report, 1 - always report (default) */
|
||||
my_bool report_data_truncation;
|
||||
|
||||
/* function pointers for local infile support */
|
||||
int (*local_infile_init)(void **, const char *, void *);
|
||||
|
|
|
@ -210,6 +210,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
|
|||
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
|
||||
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
|
||||
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
|
||||
MYSQL_TYPE_BIT,
|
||||
MYSQL_TYPE_ENUM=247,
|
||||
MYSQL_TYPE_SET=248,
|
||||
MYSQL_TYPE_TINY_BLOB=249,
|
||||
|
@ -250,6 +251,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
|
|||
#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
|
||||
#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
|
||||
#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
|
||||
#define FIELD_TYPE_BIT MYSQL_TYPE_BIT
|
||||
|
||||
|
||||
/* Shutdown/kill enums and constants */
|
||||
|
|
|
@ -331,33 +331,43 @@ buf_page_is_corrupted(
|
|||
}
|
||||
}
|
||||
#endif
|
||||
old_checksum = buf_calc_page_old_checksum(read_buf);
|
||||
|
||||
/* If we use checksums validation, make additional check before returning
|
||||
TRUE to ensure that the checksum is not equal to BUF_NO_CHECKSUM_MAGIC which
|
||||
might be stored by InnoDB with checksums disabled.
|
||||
Otherwise, skip checksum calculation and return FALSE */
|
||||
|
||||
if (srv_use_checksums) {
|
||||
old_checksum = buf_calc_page_old_checksum(read_buf);
|
||||
|
||||
old_checksum_field = mach_read_from_4(read_buf + UNIV_PAGE_SIZE
|
||||
old_checksum_field = mach_read_from_4(read_buf + UNIV_PAGE_SIZE
|
||||
- FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||
|
||||
/* There are 2 valid formulas for old_checksum_field:
|
||||
1. Very old versions of InnoDB only stored 8 byte lsn to the start
|
||||
and the end of the page.
|
||||
2. Newer InnoDB versions store the old formula checksum there. */
|
||||
/* There are 2 valid formulas for old_checksum_field:
|
||||
1. Very old versions of InnoDB only stored 8 byte lsn to the start
|
||||
and the end of the page.
|
||||
2. Newer InnoDB versions store the old formula checksum there. */
|
||||
|
||||
if (old_checksum_field != mach_read_from_4(read_buf + FIL_PAGE_LSN)
|
||||
&& old_checksum_field != old_checksum) {
|
||||
if (old_checksum_field != mach_read_from_4(read_buf + FIL_PAGE_LSN)
|
||||
&& old_checksum_field != old_checksum
|
||||
&& old_checksum_field != BUF_NO_CHECKSUM_MAGIC) {
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
checksum = buf_calc_page_new_checksum(read_buf);
|
||||
checksum_field = mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
checksum = buf_calc_page_new_checksum(read_buf);
|
||||
checksum_field = mach_read_from_4(read_buf + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
|
||||
/* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id
|
||||
(always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */
|
||||
/* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id
|
||||
(always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */
|
||||
|
||||
if (checksum_field != 0 && checksum_field != checksum) {
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
if (checksum_field != 0 && checksum_field != checksum
|
||||
&& checksum_field != BUF_NO_CHECKSUM_MAGIC) {
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
@ -379,8 +389,10 @@ buf_page_print(
|
|||
ut_print_buf(stderr, read_buf, UNIV_PAGE_SIZE);
|
||||
fputs("InnoDB: End of page dump\n", stderr);
|
||||
|
||||
checksum = buf_calc_page_new_checksum(read_buf);
|
||||
old_checksum = buf_calc_page_old_checksum(read_buf);
|
||||
checksum = srv_use_checksums ?
|
||||
buf_calc_page_new_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC;
|
||||
old_checksum = srv_use_checksums ?
|
||||
buf_calc_page_old_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC;
|
||||
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
|
@ -548,7 +560,7 @@ buf_pool_init(
|
|||
}
|
||||
/*----------------------------------------*/
|
||||
} else {
|
||||
buf_pool->frame_mem = ut_malloc_low(
|
||||
buf_pool->frame_mem = os_mem_alloc_large(
|
||||
UNIV_PAGE_SIZE * (n_frames + 1),
|
||||
TRUE, FALSE);
|
||||
}
|
||||
|
|
|
@ -448,7 +448,8 @@ buf_flush_init_for_writing(
|
|||
/* Store the new formula checksum */
|
||||
|
||||
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
|
||||
buf_calc_page_new_checksum(page));
|
||||
srv_use_checksums ?
|
||||
buf_calc_page_new_checksum(page) : BUF_NO_CHECKSUM_MAGIC);
|
||||
|
||||
/* We overwrite the first 4 bytes of the end lsn field to store
|
||||
the old formula checksum. Since it depends also on the field
|
||||
|
@ -456,7 +457,8 @@ buf_flush_init_for_writing(
|
|||
new formula checksum. */
|
||||
|
||||
mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM,
|
||||
buf_calc_page_old_checksum(page));
|
||||
srv_use_checksums ?
|
||||
buf_calc_page_old_checksum(page) : BUF_NO_CHECKSUM_MAGIC);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -49,7 +49,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \
|
|||
thr0loc.h thr0loc.ic trx0purge.h trx0purge.ic trx0rec.h \
|
||||
trx0rec.ic trx0roll.h trx0roll.ic trx0rseg.h trx0rseg.ic \
|
||||
trx0sys.h trx0sys.ic trx0trx.h trx0trx.ic trx0types.h \
|
||||
trx0undo.h trx0undo.ic univ.i \
|
||||
trx0undo.h trx0undo.ic trx0xa.h univ.i \
|
||||
usr0sess.h usr0sess.ic usr0types.h ut0byte.h ut0byte.ic \
|
||||
ut0dbg.h ut0lst.h ut0mem.h ut0mem.ic ut0rnd.h ut0rnd.ic \
|
||||
ut0sort.h ut0ut.h ut0ut.ic
|
||||
|
|
|
@ -52,6 +52,8 @@ Created 11/5/1995 Heikki Tuuri
|
|||
/* Modes for buf_page_get_known_nowait */
|
||||
#define BUF_MAKE_YOUNG 51
|
||||
#define BUF_KEEP_OLD 52
|
||||
/* Magic value to use instead of checksums when they are disabled */
|
||||
#define BUF_NO_CHECKSUM_MAGIC 0xDEADBEEFUL
|
||||
|
||||
extern buf_pool_t* buf_pool; /* The buffer pool of the database */
|
||||
extern ibool buf_debug_prints;/* If this is set TRUE, the program
|
||||
|
|
|
@ -12,6 +12,11 @@ Created 9/30/1995 Heikki Tuuri
|
|||
|
||||
#include "univ.i"
|
||||
|
||||
#ifdef UNIV_LINUX
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#endif
|
||||
|
||||
typedef void* os_process_t;
|
||||
typedef unsigned long int os_process_id_t;
|
||||
|
||||
|
@ -27,6 +32,10 @@ page size of an Intel x86 processor. We cannot use AWE with 2 MB or 4 MB
|
|||
pages. */
|
||||
#define OS_AWE_X86_PAGE_SIZE 4096
|
||||
|
||||
extern ibool os_use_large_pages;
|
||||
/* Large page size. This may be a boot-time option on some platforms */
|
||||
extern ulint os_large_page_size;
|
||||
|
||||
/********************************************************************
|
||||
Windows AWE support. Tries to enable the "lock pages in memory" privilege for
|
||||
the current process so that the current process can allocate memory-locked
|
||||
|
@ -103,6 +112,25 @@ os_mem_alloc_nocache(
|
|||
/* out: allocated memory */
|
||||
ulint n); /* in: number of bytes */
|
||||
/********************************************************************
|
||||
Allocates large pages memory. */
|
||||
|
||||
void*
|
||||
os_mem_alloc_large(
|
||||
/*=================*/
|
||||
/* out: allocated memory */
|
||||
ulint n, /* in: number of bytes */
|
||||
ibool set_to_zero, /* in: TRUE if allocated memory should be set
|
||||
to zero if UNIV_SET_MEM_TO_ZERO is defined */
|
||||
ibool assert_on_error); /* in: if TRUE, we crash mysqld if the memory
|
||||
cannot be allocated */
|
||||
/********************************************************************
|
||||
Frees large pages memory. */
|
||||
|
||||
void
|
||||
os_mem_free_large(
|
||||
/*=================*/
|
||||
void *ptr); /* in: number of bytes */
|
||||
/********************************************************************
|
||||
Sets the priority boost for threads released from waiting within the current
|
||||
process. */
|
||||
|
||||
|
|
|
@ -152,6 +152,19 @@ page_header_reset_last_insert(
|
|||
MLOG_2BYTES, mtr);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
Determine whether the page is in new-style compact format. */
|
||||
UNIV_INLINE
|
||||
ibool
|
||||
page_is_comp(
|
||||
/*=========*/
|
||||
/* out: TRUE if the page is in compact format
|
||||
FALSE if it is in old-style format */
|
||||
page_t* page) /* in: index page */
|
||||
{
|
||||
return(!!(page_header_get_field(page, PAGE_N_HEAP) & 0x8000));
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
Gets the first record on the page. */
|
||||
UNIV_INLINE
|
||||
|
@ -513,19 +526,6 @@ page_dir_calc_reserved_space(
|
|||
/ PAGE_DIR_SLOT_MIN_N_OWNED);
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
Determine whether the page is in new-style compact format. */
|
||||
UNIV_INLINE
|
||||
ibool
|
||||
page_is_comp(
|
||||
/*=========*/
|
||||
/* out: TRUE if the page is in compact format
|
||||
FALSE if it is in old-style format */
|
||||
page_t* page) /* in: index page */
|
||||
{
|
||||
return(!!(page_header_get_field(page, PAGE_N_HEAP) & 0x8000));
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
Gets the pointer to the next record on the page. */
|
||||
UNIV_INLINE
|
||||
|
|
|
@ -257,7 +257,7 @@ rec_get_next_offs(
|
|||
ibool comp) /* in: TRUE=compact page format */
|
||||
{
|
||||
if (comp) {
|
||||
lint ret = (int16_t) rec_get_bit_field_2(rec, REC_NEXT,
|
||||
lint ret = (signed short) rec_get_bit_field_2(rec, REC_NEXT,
|
||||
REC_NEXT_MASK, REC_NEXT_SHIFT);
|
||||
#if UNIV_PAGE_SIZE <= 32768
|
||||
/* with 64 KiB page size, the pointer will "wrap around",
|
||||
|
|
|
@ -107,6 +107,7 @@ extern ibool srv_very_fast_shutdown; /* if this TRUE, do not flush the
|
|||
extern ibool srv_innodb_status;
|
||||
|
||||
extern ibool srv_use_doublewrite_buf;
|
||||
extern ibool srv_use_checksums;
|
||||
|
||||
extern ibool srv_set_thread_priorities;
|
||||
extern int srv_query_thread_priority;
|
||||
|
|
|
@ -69,6 +69,10 @@ byte* os_awe_window;
|
|||
ulint os_awe_window_size;
|
||||
#endif
|
||||
|
||||
ibool os_use_large_pages;
|
||||
/* Large page size. This may be a boot-time option on some platforms */
|
||||
ulint os_large_page_size;
|
||||
|
||||
/********************************************************************
|
||||
Windows AWE support. Tries to enable the "lock pages in memory" privilege for
|
||||
the current process so that the current process can allocate memory-locked
|
||||
|
@ -515,6 +519,83 @@ os_mem_alloc_nocache(
|
|||
#endif
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Allocates large pages memory. */
|
||||
|
||||
void*
|
||||
os_mem_alloc_large(
|
||||
/*=================*/
|
||||
/* out: allocated memory */
|
||||
ulint n, /* in: number of bytes */
|
||||
ibool set_to_zero, /* in: TRUE if allocated memory should be set
|
||||
to zero if UNIV_SET_MEM_TO_ZERO is defined */
|
||||
ibool assert_on_error) /* in: if TRUE, we crash mysqld if the memory
|
||||
cannot be allocated */
|
||||
{
|
||||
#ifdef UNIV_LINUX
|
||||
ulint size;
|
||||
int shmid;
|
||||
void *ptr = NULL;
|
||||
struct shmid_ds buf;
|
||||
|
||||
if (!os_use_large_pages || !os_large_page_size) {
|
||||
goto skip;
|
||||
}
|
||||
|
||||
/* Align block size to os_large_page_size */
|
||||
size = ((n - 1) & ~(os_large_page_size - 1)) + os_large_page_size;
|
||||
|
||||
shmid = shmget(IPC_PRIVATE, (size_t)size, SHM_HUGETLB | SHM_R | SHM_W);
|
||||
if (shmid < 0) {
|
||||
fprintf(stderr, "InnoDB: HugeTLB: Warning: Failed to allocate %lu bytes. "
|
||||
"errno %d\n", n, errno);
|
||||
} else {
|
||||
ptr = shmat(shmid, NULL, 0);
|
||||
if (ptr == (void *)-1) {
|
||||
fprintf(stderr, "InnoDB: HugeTLB: Warning: Failed to attach shared memory "
|
||||
"segment, errno %d\n", errno);
|
||||
}
|
||||
/*
|
||||
Remove the shared memory segment so that it will be automatically freed
|
||||
after memory is detached or process exits
|
||||
*/
|
||||
shmctl(shmid, IPC_RMID, &buf);
|
||||
}
|
||||
|
||||
if (ptr) {
|
||||
if (set_to_zero) {
|
||||
#ifdef UNIV_SET_MEM_TO_ZERO
|
||||
memset(ret, '\0', size);
|
||||
#endif
|
||||
}
|
||||
|
||||
return(ptr);
|
||||
}
|
||||
|
||||
fprintf(stderr, "InnoDB HugeTLB: Warning: Using conventional memory pool\n");
|
||||
#endif
|
||||
skip:
|
||||
|
||||
return(ut_malloc_low(n, set_to_zero, assert_on_error));
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Frees large pages memory. */
|
||||
|
||||
void
|
||||
os_mem_free_large(
|
||||
/*=================*/
|
||||
void *ptr) /* in: number of bytes */
|
||||
{
|
||||
#ifdef UNIV_LINUX
|
||||
if (os_use_large_pages && os_large_page_size && !shmdt(ptr)) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ut_free(ptr);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Sets the priority boost for threads released from waiting within the current
|
||||
process. */
|
||||
|
|
|
@ -313,6 +313,7 @@ ibool srv_very_fast_shutdown = FALSE; /* if this TRUE, do not flush the
|
|||
ibool srv_innodb_status = FALSE;
|
||||
|
||||
ibool srv_use_doublewrite_buf = TRUE;
|
||||
ibool srv_use_checksums = TRUE;
|
||||
|
||||
ibool srv_set_thread_priorities = TRUE;
|
||||
int srv_query_thread_priority = 0;
|
||||
|
|
|
@ -124,6 +124,22 @@ trx_doublewrite_init(
|
|||
* sizeof(void*));
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Frees the doublewrite buffer. */
|
||||
static
|
||||
void
|
||||
trx_doublewrite_free(void)
|
||||
/*======================*/
|
||||
{
|
||||
mutex_free(&(trx_doublewrite->mutex));
|
||||
|
||||
mem_free(trx_doublewrite->buf_block_arr);
|
||||
ut_free(trx_doublewrite->write_buf_unaligned);
|
||||
|
||||
mem_free(trx_doublewrite);
|
||||
trx_doublewrite = NULL;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Marks the trx sys header when we have successfully upgraded to the >= 4.1.x
|
||||
multiple tablespace format. */
|
||||
|
@ -512,6 +528,9 @@ trx_sys_doublewrite_init_or_restore_pages(
|
|||
|
||||
fil_flush_file_spaces(FIL_TABLESPACE);
|
||||
|
||||
if (!srv_use_doublewrite_buf)
|
||||
trx_doublewrite_free();
|
||||
|
||||
leave_func:
|
||||
ut_free(unaligned_read_buf);
|
||||
}
|
||||
|
|
|
@ -3428,7 +3428,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
|||
{
|
||||
char *buffer= (char *)param->buffer;
|
||||
int err= 0;
|
||||
char *endptr;
|
||||
char *endptr= value + length;
|
||||
|
||||
/*
|
||||
This function should support all target buffer types: the rest
|
||||
|
@ -3439,39 +3439,33 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
|||
break;
|
||||
case MYSQL_TYPE_TINY:
|
||||
{
|
||||
longlong data= my_strntoll(&my_charset_latin1, value, length, 10,
|
||||
&endptr, &err);
|
||||
longlong data= my_strtoll10(value, &endptr, &err);
|
||||
*param->error= (IS_TRUNCATED(data, param->is_unsigned,
|
||||
INT_MIN8, INT_MAX8, UINT_MAX8) |
|
||||
test(err));
|
||||
INT_MIN8, INT_MAX8, UINT_MAX8) || err > 0);
|
||||
*buffer= (uchar) data;
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_SHORT:
|
||||
{
|
||||
longlong data= my_strntoll(&my_charset_latin1, value, length, 10,
|
||||
&endptr, &err);
|
||||
longlong data= my_strtoll10(value, &endptr, &err);
|
||||
*param->error= (IS_TRUNCATED(data, param->is_unsigned,
|
||||
INT_MIN16, INT_MAX16, UINT_MAX16) |
|
||||
test(err));
|
||||
INT_MIN16, INT_MAX16, UINT_MAX16) || err > 0);
|
||||
shortstore(buffer, (short) data);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_LONG:
|
||||
{
|
||||
longlong data= my_strntoll(&my_charset_latin1, value, length, 10,
|
||||
&endptr, &err);
|
||||
longlong data= my_strtoll10(value, &endptr, &err);
|
||||
*param->error= (IS_TRUNCATED(data, param->is_unsigned,
|
||||
INT_MIN32, INT_MAX32, UINT_MAX32) |
|
||||
test(err));
|
||||
INT_MIN32, INT_MAX32, UINT_MAX32) || err > 0);
|
||||
longstore(buffer, (int32) data);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_LONGLONG:
|
||||
{
|
||||
longlong data= my_strntoll(&my_charset_latin1, value, length, 10,
|
||||
&endptr, &err);
|
||||
*param->error= test(err);
|
||||
longlong data= my_strtoll10(value, &endptr, &err);
|
||||
*param->error= param->is_unsigned ? err != 0 :
|
||||
(err > 0 || (err == 0 && data < 0));
|
||||
longlongstore(buffer, data);
|
||||
break;
|
||||
}
|
||||
|
@ -3554,10 +3548,9 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
|
|||
*/
|
||||
|
||||
static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
longlong value)
|
||||
longlong value, my_bool is_unsigned)
|
||||
{
|
||||
char *buffer= (char *)param->buffer;
|
||||
uint field_is_unsigned= field->flags & UNSIGNED_FLAG;
|
||||
|
||||
switch (param->buffer_type) {
|
||||
case MYSQL_TYPE_NULL: /* do nothing */
|
||||
|
@ -3579,38 +3572,38 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
break;
|
||||
case MYSQL_TYPE_LONGLONG:
|
||||
longlongstore(buffer, value);
|
||||
*param->error= param->is_unsigned != is_unsigned && value < 0;
|
||||
break;
|
||||
case MYSQL_TYPE_FLOAT:
|
||||
{
|
||||
/*
|
||||
We need to store data in the buffer before the truncation check to
|
||||
workaround Intel FPU executive precision feature.
|
||||
(See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details)
|
||||
AFAIU it does not guarantee to work.
|
||||
*/
|
||||
float data;
|
||||
if (field_is_unsigned)
|
||||
{
|
||||
if (is_unsigned)
|
||||
data= (float) ulonglong2double(value);
|
||||
*param->error= (ulonglong) data != (ulonglong) value;
|
||||
}
|
||||
else
|
||||
{
|
||||
data= (float) value;
|
||||
/* printf("%lld, %f\n", value, data); */
|
||||
*param->error= value != ((longlong) data);
|
||||
}
|
||||
floatstore(buffer, data);
|
||||
*param->error= is_unsigned ?
|
||||
((ulonglong) value) != ((ulonglong) (*(float*) buffer)) :
|
||||
((longlong) value) != ((longlong) (*(float*) buffer));
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_DOUBLE:
|
||||
{
|
||||
double data;
|
||||
if (field_is_unsigned)
|
||||
{
|
||||
if (is_unsigned)
|
||||
data= ulonglong2double(value);
|
||||
*param->error= (ulonglong) data != (ulonglong) value;
|
||||
}
|
||||
else
|
||||
{
|
||||
data= value;
|
||||
*param->error= (longlong) data != value;
|
||||
}
|
||||
doublestore(buffer, data);
|
||||
*param->error= is_unsigned ?
|
||||
((ulonglong) value) != ((ulonglong) (*(double*) buffer)) :
|
||||
((longlong) value) != ((longlong) (*(double*) buffer));
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_TIME:
|
||||
|
@ -3626,7 +3619,7 @@ static void fetch_long_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
default:
|
||||
{
|
||||
char buff[22]; /* Enough for longlong */
|
||||
char *end= longlong10_to_str(value, buff, field_is_unsigned ? 10: -10);
|
||||
char *end= longlong10_to_str(value, buff, is_unsigned ? 10: -10);
|
||||
/* Resort to string conversion which supports all typecodes */
|
||||
uint length= (uint) (end-buff);
|
||||
|
||||
|
@ -3665,74 +3658,67 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
case MYSQL_TYPE_NULL: /* do nothing */
|
||||
break;
|
||||
case MYSQL_TYPE_TINY:
|
||||
{
|
||||
/*
|
||||
We need to _store_ data in the buffer before the truncation check to
|
||||
workaround Intel FPU executive precision feature.
|
||||
(See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 for details)
|
||||
Sic: AFAIU it does not guarantee to work.
|
||||
*/
|
||||
if (param->is_unsigned)
|
||||
{
|
||||
int8 data= (int8) value;
|
||||
*param->error= (double) data != value;
|
||||
*buffer= (uchar) data;
|
||||
}
|
||||
*buffer= (uint8) value;
|
||||
else
|
||||
{
|
||||
uchar data= (uchar) value;
|
||||
*param->error= (double) data != value;
|
||||
*buffer= data;
|
||||
}
|
||||
*buffer= (int8) value;
|
||||
*param->error= value != (param->is_unsigned ? (double) ((uint8) *buffer) :
|
||||
(double) ((int8) *buffer));
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_SHORT:
|
||||
{
|
||||
if (param->is_unsigned)
|
||||
{
|
||||
ushort data= (ushort) value;
|
||||
*param->error= (double) data != value;
|
||||
shortstore(buffer, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
short data= (short) value;
|
||||
*param->error= (double) data != value;
|
||||
shortstore(buffer, data);
|
||||
}
|
||||
*param->error= value != (param->is_unsigned ? (double) (*(ushort*) buffer):
|
||||
(double) (*(short*) buffer));
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_LONG:
|
||||
{
|
||||
if (param->is_unsigned)
|
||||
{
|
||||
uint32 data= (uint32) value;
|
||||
*param->error= (double) data != value;
|
||||
longstore(buffer, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
int32 data= (int32) value;
|
||||
*param->error= (double) data != value;
|
||||
longstore(buffer, data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
*param->error= value != (param->is_unsigned ? (double) (*(uint32*) buffer):
|
||||
(double) (*(int32*) buffer));
|
||||
break;
|
||||
case MYSQL_TYPE_LONGLONG:
|
||||
{
|
||||
if (param->is_unsigned)
|
||||
{
|
||||
ulonglong data= (ulonglong) value;
|
||||
*param->error= (double) data != value;
|
||||
longlongstore(buffer, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
longlong data= (longlong) value;
|
||||
*param->error= (double) data != value;
|
||||
longlongstore(buffer, data);
|
||||
}
|
||||
*param->error= value != (param->is_unsigned ?
|
||||
(double) (*(ulonglong*) buffer) :
|
||||
(double) (*(longlong*) buffer));
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_FLOAT:
|
||||
{
|
||||
float data= (float) value;
|
||||
*param->error= data != value;
|
||||
floatstore(buffer, data);
|
||||
*param->error= (*(float*) buffer) != value;
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_DOUBLE:
|
||||
|
@ -3813,8 +3799,9 @@ static void fetch_datetime_with_conversion(MYSQL_BIND *param,
|
|||
case MYSQL_TYPE_DOUBLE:
|
||||
{
|
||||
ulonglong value= TIME_to_ulonglong(time);
|
||||
return fetch_float_with_conversion(param, field,
|
||||
ulonglong2double(value), DBL_DIG);
|
||||
fetch_float_with_conversion(param, field,
|
||||
ulonglong2double(value), DBL_DIG);
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_TINY:
|
||||
case MYSQL_TYPE_SHORT:
|
||||
|
@ -3823,7 +3810,8 @@ static void fetch_datetime_with_conversion(MYSQL_BIND *param,
|
|||
case MYSQL_TYPE_LONGLONG:
|
||||
{
|
||||
longlong value= (longlong) TIME_to_ulonglong(time);
|
||||
return fetch_long_with_conversion(param, field, value);
|
||||
fetch_long_with_conversion(param, field, value, TRUE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
@ -3870,7 +3858,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
/* sic: we need to cast to 'signed char' as 'char' may be unsigned */
|
||||
longlong data= field_is_unsigned ? (longlong) value :
|
||||
(longlong) (signed char) value;
|
||||
fetch_long_with_conversion(param, field, data);
|
||||
fetch_long_with_conversion(param, field, data, 0);
|
||||
*row+= 1;
|
||||
break;
|
||||
}
|
||||
|
@ -3880,7 +3868,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
short value= sint2korr(*row);
|
||||
longlong data= field_is_unsigned ? (longlong) (unsigned short) value :
|
||||
(longlong) value;
|
||||
fetch_long_with_conversion(param, field, data);
|
||||
fetch_long_with_conversion(param, field, data, 0);
|
||||
*row+= 2;
|
||||
break;
|
||||
}
|
||||
|
@ -3890,14 +3878,15 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
|||
long value= sint4korr(*row);
|
||||
longlong data= field_is_unsigned ? (longlong) (unsigned long) value :
|
||||
(longlong) value;
|
||||
fetch_long_with_conversion(param, field, data);
|
||||
fetch_long_with_conversion(param, field, data, 0);
|
||||
*row+= 4;
|
||||
break;
|
||||
}
|
||||
case MYSQL_TYPE_LONGLONG:
|
||||
{
|
||||
longlong value= (longlong)sint8korr(*row);
|
||||
fetch_long_with_conversion(param, field, value);
|
||||
fetch_long_with_conversion(param, field, value,
|
||||
field->flags & UNSIGNED_FLAG);
|
||||
*row+= 8;
|
||||
break;
|
||||
}
|
||||
|
@ -4140,13 +4129,13 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
|
|||
enum enum_field_types type2)
|
||||
{
|
||||
static const enum enum_field_types
|
||||
range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, 0 },
|
||||
range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, 0 },
|
||||
range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, 0 },
|
||||
range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, MYSQL_TYPE_NULL },
|
||||
range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, MYSQL_TYPE_NULL },
|
||||
range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_NULL },
|
||||
range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
|
||||
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
|
||||
MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY,
|
||||
MYSQL_TYPE_DECIMAL, 0 },
|
||||
MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL },
|
||||
*range_list[]= { range1, range2, range3, range4 },
|
||||
**range_list_end= range_list + sizeof(range_list)/sizeof(*range_list);
|
||||
const enum enum_field_types **range, *type;
|
||||
|
@ -4157,7 +4146,7 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
|
|||
{
|
||||
/* check that both type1 and type2 are in the same range */
|
||||
bool type1_found= FALSE, type2_found= FALSE;
|
||||
for (type= *range; *type; type++)
|
||||
for (type= *range; *type != MYSQL_TYPE_NULL; type++)
|
||||
{
|
||||
type1_found|= type1 == *type;
|
||||
type2_found|= type2 == *type;
|
||||
|
@ -4340,7 +4329,6 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
|
|||
MYSQL_FIELD *field;
|
||||
ulong bind_count= stmt->field_count;
|
||||
uint param_count= 0;
|
||||
uchar report_data_truncation= 0;
|
||||
DBUG_ENTER("mysql_stmt_bind_result");
|
||||
DBUG_PRINT("enter",("field_count: %d", bind_count));
|
||||
|
||||
|
@ -4378,8 +4366,6 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
|
|||
|
||||
if (!param->error)
|
||||
param->error= ¶m->error_value;
|
||||
else
|
||||
report_data_truncation= REPORT_DATA_TRUNCATION;
|
||||
|
||||
param->param_number= param_count++;
|
||||
param->offset= 0;
|
||||
|
@ -4393,7 +4379,10 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
|
|||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
stmt->bind_result_done= BIND_RESULT_DONE | report_data_truncation;
|
||||
stmt->bind_result_done= BIND_RESULT_DONE;
|
||||
if (stmt->mysql->options.report_data_truncation)
|
||||
stmt->bind_result_done|= REPORT_DATA_TRUNCATION;
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,19 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
|
|||
length);
|
||||
|
||||
pos= (byte*) record+keyseg->start;
|
||||
if (type == HA_KEYTYPE_BIT)
|
||||
{
|
||||
if (keyseg->bit_length)
|
||||
{
|
||||
uchar bits= get_rec_bits((uchar*) record + keyseg->bit_pos,
|
||||
keyseg->bit_start, keyseg->bit_length);
|
||||
*key++= bits;
|
||||
length--;
|
||||
}
|
||||
memcpy((byte*) key, pos, length);
|
||||
key+= length;
|
||||
continue;
|
||||
}
|
||||
if (keyseg->flag & HA_SPACE_PACK)
|
||||
{
|
||||
end=pos+length;
|
||||
|
@ -333,6 +346,26 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
|
|||
}
|
||||
record[keyseg->null_pos]&= ~keyseg->null_bit;
|
||||
}
|
||||
if (keyseg->type == HA_KEYTYPE_BIT)
|
||||
{
|
||||
uint length= keyseg->length;
|
||||
|
||||
if (keyseg->bit_length)
|
||||
{
|
||||
uchar bits= *key++;
|
||||
set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start,
|
||||
keyseg->bit_length);
|
||||
length--;
|
||||
}
|
||||
else
|
||||
{
|
||||
clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start,
|
||||
keyseg->bit_length);
|
||||
}
|
||||
memcpy(record + keyseg->start, (byte*) key, length);
|
||||
key+= length;
|
||||
continue;
|
||||
}
|
||||
if (keyseg->flag & HA_SPACE_PACK)
|
||||
{
|
||||
uint length;
|
||||
|
|
|
@ -1049,12 +1049,13 @@ int mi_keyseg_write(File file, const HA_KEYSEG *keyseg)
|
|||
*ptr++ =keyseg->null_bit;
|
||||
*ptr++ =keyseg->bit_start;
|
||||
*ptr++ =keyseg->bit_end;
|
||||
*ptr++ =0; /* Not used */
|
||||
*ptr++= keyseg->bit_length;
|
||||
mi_int2store(ptr,keyseg->flag); ptr+=2;
|
||||
mi_int2store(ptr,keyseg->length); ptr+=2;
|
||||
mi_int4store(ptr,keyseg->start); ptr+=4;
|
||||
mi_int4store(ptr,keyseg->null_pos); ptr+=4;
|
||||
|
||||
mi_int4store(ptr, keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos);
|
||||
ptr+=4;
|
||||
|
||||
return my_write(file,(char*) buff, (uint) (ptr-buff), MYF(MY_NABP));
|
||||
}
|
||||
|
||||
|
@ -1066,12 +1067,19 @@ char *mi_keyseg_read(char *ptr, HA_KEYSEG *keyseg)
|
|||
keyseg->null_bit = *ptr++;
|
||||
keyseg->bit_start = *ptr++;
|
||||
keyseg->bit_end = *ptr++;
|
||||
ptr++;
|
||||
keyseg->bit_length = *ptr++;
|
||||
keyseg->flag = mi_uint2korr(ptr); ptr +=2;
|
||||
keyseg->length = mi_uint2korr(ptr); ptr +=2;
|
||||
keyseg->start = mi_uint4korr(ptr); ptr +=4;
|
||||
keyseg->null_pos = mi_uint4korr(ptr); ptr +=4;
|
||||
keyseg->charset=0; /* Will be filled in later */
|
||||
if (keyseg->null_bit)
|
||||
keyseg->bit_pos= keyseg->null_pos + (keyseg->null_bit == 7);
|
||||
else
|
||||
{
|
||||
keyseg->bit_pos= keyseg->null_pos;
|
||||
keyseg->null_pos= 0;
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
4
mysql-test/include/have_federated_db.inc
Normal file
4
mysql-test/include/have_federated_db.inc
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- require r/have_federated_db.require
|
||||
disable_query_log;
|
||||
show variables like "have_federated_db";
|
||||
enable_query_log;
|
|
@ -104,7 +104,7 @@ drop table t5 ;
|
|||
# c5 integer, c6 bigint, c7 float, c8 double,
|
||||
# c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
# c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
# c17 year, c18 bit, c19 bool, c20 char,
|
||||
# c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
# c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
# c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
# c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
|
|
@ -34,7 +34,7 @@ eval create table t9
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
|
|
@ -1347,7 +1347,7 @@ run_testcase ()
|
|||
tsrcdir=$TESTDIR/$tname-src
|
||||
result_file="r/$tname.result"
|
||||
echo $tname > $CURRENT_TEST
|
||||
SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0`
|
||||
SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0 \& \( $tname : federated \) = 0`
|
||||
if [ -n "$RESULT_EXT" -a \( x$RECORD = x1 -o -f "$result_file$RESULT_EXT" \) ] ; then
|
||||
result_file="$result_file$RESULT_EXT"
|
||||
fi
|
||||
|
|
File diff suppressed because it is too large
Load diff
566
mysql-test/r/federated.result
Normal file
566
mysql-test/r/federated.result
Normal file
|
@ -0,0 +1,566 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
drop database if exists federated;
|
||||
create database federated;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) DEFAULT CHARSET=latin1;
|
||||
drop database if exists federated;
|
||||
create database federated;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 (name, other) values ('First Name', 11111);
|
||||
insert into federated.t1 (name, other) values ('Second Name', 22222);
|
||||
insert into federated.t1 (name, other) values ('Third Name', 33333);
|
||||
insert into federated.t1 (name, other) values ('Fourth Name', 44444);
|
||||
insert into federated.t1 (name, other) values ('Fifth Name', 55555);
|
||||
insert into federated.t1 (name, other) values ('Sixth Name', 66666);
|
||||
insert into federated.t1 (name, other) values ('Seventh Name', 77777);
|
||||
insert into federated.t1 (name, other) values ('Eigth Name', 88888);
|
||||
insert into federated.t1 (name, other) values ('Ninth Name', 99999);
|
||||
insert into federated.t1 (name, other) values ('Tenth Name', 101010);
|
||||
select * from federated.t1;
|
||||
id name other created
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
3 Third Name 33333 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
select * from federated.t1 where id = 5;
|
||||
id name other created
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
select * from federated.t1 where name = 'Sixth Name';
|
||||
id name other created
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
select * from federated.t1 where id = 6 and name = 'Sixth Name';
|
||||
id name other created
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
select * from federated.t1 where other = 44444;
|
||||
id name other created
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
select * from federated.t1 where name like '%th%';
|
||||
id name other created
|
||||
3 Third Name 33333 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
update federated.t1 set name = '3rd name' where id = 3;
|
||||
select * from federated.t1 where name = '3rd name';
|
||||
id name other created
|
||||
3 3rd name 33333 2004-04-04 04:04:04
|
||||
update federated.t1 set name = 'Third name' where name = '3rd name';
|
||||
select * from federated.t1 where name = 'Third name';
|
||||
id name other created
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
select * from federated.t1 order by id DESC;
|
||||
id name other created
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
select * from federated.t1 order by name;
|
||||
id name other created
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
select * from federated.t1 order by name DESC;
|
||||
id name other created
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
select * from federated.t1 order by name ASC;
|
||||
id name other created
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
select * from federated.t1 group by other;
|
||||
id name other created
|
||||
1 First Name 11111 2004-04-04 04:04:04
|
||||
2 Second Name 22222 2004-04-04 04:04:04
|
||||
3 Third name 33333 2004-04-04 04:04:04
|
||||
4 Fourth Name 44444 2004-04-04 04:04:04
|
||||
5 Fifth Name 55555 2004-04-04 04:04:04
|
||||
6 Sixth Name 66666 2004-04-04 04:04:04
|
||||
7 Seventh Name 77777 2004-04-04 04:04:04
|
||||
8 Eigth Name 88888 2004-04-04 04:04:04
|
||||
9 Ninth Name 99999 2004-04-04 04:04:04
|
||||
10 Tenth Name 101010 2004-04-04 04:04:04
|
||||
delete from federated.t1 where id = 5;
|
||||
select * from federated.t1 where id = 5;
|
||||
id name other created
|
||||
delete from federated.t1;
|
||||
select * from federated.t1 where id = 5;
|
||||
id name other created
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) );
|
||||
insert into federated.t1 (name, other) values ('First Name', 11111);
|
||||
insert into federated.t1 (name, other) values ('Second Name', NULL);
|
||||
insert into federated.t1 (name, other) values ('Third Name', 33333);
|
||||
insert into federated.t1 (name, other) values (NULL, NULL);
|
||||
insert into federated.t1 (name, other) values ('Fifth Name', 55555);
|
||||
insert into federated.t1 (name, other) values ('Sixth Name', 66666);
|
||||
insert into federated.t1 (name) values ('Seventh Name');
|
||||
insert into federated.t1 (name, other) values ('Eigth Name', 88888);
|
||||
insert into federated.t1 (name, other) values ('Ninth Name', 99999);
|
||||
insert into federated.t1 (other) values ('fee fie foe fum');
|
||||
select * from federated.t1 where other IS NULL;
|
||||
id name other
|
||||
2 Second Name NULL
|
||||
4 NULL NULL
|
||||
7 Seventh Name NULL
|
||||
select * from federated.t1 where name IS NULL;
|
||||
id name other
|
||||
4 NULL NULL
|
||||
10 NULL fee fie foe fum
|
||||
select * from federated.t1 where name IS NULL and other IS NULL;
|
||||
id name other
|
||||
4 NULL NULL
|
||||
select * from federated.t1 where name IS NULL or other IS NULL;
|
||||
id name other
|
||||
2 Second Name NULL
|
||||
4 NULL NULL
|
||||
7 Seventh Name NULL
|
||||
10 NULL fee fie foe fum
|
||||
update federated.t1 set name = 'Fourth Name', other = 'four four four' where name IS NULL and other IS NULL;
|
||||
update federated.t1 set other = 'two two two two' where name = 'Secend Name';
|
||||
update federated.t1 set other = 'seven seven' where name like 'Sec%';
|
||||
update federated.t1 set other = 'seven seven' where name = 'Seventh Name';
|
||||
update federated.t1 set name = 'Tenth Name' where other like 'fee fie%';
|
||||
select * from federated.t1 where name IS NULL or other IS NULL ;
|
||||
id name other
|
||||
select * from federated.t1;
|
||||
id name other
|
||||
1 First Name 11111
|
||||
2 Second Name seven seven
|
||||
3 Third Name 33333
|
||||
4 Fourth Name four four four
|
||||
5 Fifth Name 55555
|
||||
6 Sixth Name 66666
|
||||
7 Seventh Name seven seven
|
||||
8 Eigth Name 88888
|
||||
9 Ninth Name 99999
|
||||
10 Tenth Name fee fie foe fum
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) DEFAULT CHARSET=latin1;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 values (NULL, NULL, NULL, NULL);
|
||||
insert into federated.t1 values ();
|
||||
insert into federated.t1 (id) values (1);
|
||||
insert into federated.t1 (name, floatval, other) values ('foo', 33.33333332, NULL);
|
||||
insert into federated.t1 (name, floatval, other) values (0, 00.3333, NULL);
|
||||
select * from federated.t1;
|
||||
id name floatval other
|
||||
NULL NULL NULL NULL
|
||||
NULL NULL NULL NULL
|
||||
1 NULL NULL NULL
|
||||
NULL foo 33.3333 NULL
|
||||
NULL 0 0.3333 NULL
|
||||
select count(*) from federated.t1 where id IS NULL and name IS NULL and floatval IS NULL and other IS NULL;
|
||||
count(*)
|
||||
2
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) DEFAULT CHARSET=latin1;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
|
||||
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
|
||||
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt:");
|
||||
select * from federated.t1;
|
||||
blurb_id blurb
|
||||
1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.
|
||||
2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.
|
||||
3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined.
|
||||
4 Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt:
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b));
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
|
||||
explain select * from federated.t1 order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select * from federated.t1 order by b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select * from federated.t1 order by c;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select a from federated.t1 order by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select b from federated.t1 order by b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select a,b from federated.t1 order by b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
|
||||
explain select a,b from federated.t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000
|
||||
explain select a,b,c from federated.t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
|
||||
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
|
||||
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
|
||||
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
|
||||
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
|
||||
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
|
||||
int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
|
||||
i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
|
||||
int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
|
||||
i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
|
||||
int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
|
||||
i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
|
||||
int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
|
||||
int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
|
||||
int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
|
||||
int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
|
||||
int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
|
||||
int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
|
||||
int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
|
||||
int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
|
||||
int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
|
||||
int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
|
||||
int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
|
||||
int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
|
||||
int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
|
||||
int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
|
||||
int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
|
||||
int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
|
||||
int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
|
||||
int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
|
||||
int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
|
||||
int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
|
||||
int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
|
||||
int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
|
||||
int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
|
||||
int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
|
||||
int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
|
||||
int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
|
||||
int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
|
||||
int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
|
||||
int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
|
||||
int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
|
||||
int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
|
||||
int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
|
||||
int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
|
||||
int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
|
||||
int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
|
||||
int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
|
||||
int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
|
||||
int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
|
||||
int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
|
||||
int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
|
||||
int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
|
||||
int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
|
||||
int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
|
||||
int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
|
||||
int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
|
||||
int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
|
||||
int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
|
||||
int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
|
||||
int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
|
||||
int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
|
||||
int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
|
||||
int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
|
||||
int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
|
||||
int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
|
||||
int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
|
||||
int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
|
||||
int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
|
||||
int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
|
||||
int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
|
||||
int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
|
||||
int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
|
||||
int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
|
||||
int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
|
||||
int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
|
||||
int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
|
||||
int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
|
||||
int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
|
||||
int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
|
||||
int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
|
||||
int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
|
||||
int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
|
||||
int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
|
||||
int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
|
||||
int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
|
||||
int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
|
||||
int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
|
||||
int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
|
||||
int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
|
||||
int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
|
||||
int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
|
||||
int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
|
||||
int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
|
||||
int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
|
||||
int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
|
||||
int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
|
||||
int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
|
||||
int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
|
||||
int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
|
||||
int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
|
||||
int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
|
||||
int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
|
||||
int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
|
||||
int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
|
||||
int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
|
||||
int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
|
||||
int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
|
||||
int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
|
||||
int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
|
||||
int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
|
||||
int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
|
||||
int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
|
||||
int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
|
||||
int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
|
||||
int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
|
||||
int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
|
||||
int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
|
||||
int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
|
||||
int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
|
||||
int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
|
||||
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
|
||||
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
|
||||
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
|
||||
int, i999 int, i1000 int, b blob) row_format=dynamic;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
|
||||
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
|
||||
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
|
||||
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
|
||||
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
|
||||
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
|
||||
int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
|
||||
i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
|
||||
int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
|
||||
i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
|
||||
int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
|
||||
i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
|
||||
int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
|
||||
int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
|
||||
int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
|
||||
int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
|
||||
int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
|
||||
int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
|
||||
int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
|
||||
int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
|
||||
int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
|
||||
int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
|
||||
int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
|
||||
int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
|
||||
int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
|
||||
int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
|
||||
int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
|
||||
int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
|
||||
int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
|
||||
int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
|
||||
int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
|
||||
int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
|
||||
int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
|
||||
int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
|
||||
int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
|
||||
int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
|
||||
int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
|
||||
int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
|
||||
int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
|
||||
int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
|
||||
int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
|
||||
int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
|
||||
int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
|
||||
int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
|
||||
int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
|
||||
int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
|
||||
int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
|
||||
int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
|
||||
int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
|
||||
int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
|
||||
int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
|
||||
int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
|
||||
int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
|
||||
int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
|
||||
int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
|
||||
int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
|
||||
int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
|
||||
int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
|
||||
int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
|
||||
int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
|
||||
int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
|
||||
int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
|
||||
int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
|
||||
int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
|
||||
int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
|
||||
int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
|
||||
int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
|
||||
int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
|
||||
int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
|
||||
int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
|
||||
int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
|
||||
int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
|
||||
int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
|
||||
int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
|
||||
int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
|
||||
int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
|
||||
int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
|
||||
int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
|
||||
int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
|
||||
int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
|
||||
int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
|
||||
int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
|
||||
int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
|
||||
int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
|
||||
int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
|
||||
int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
|
||||
int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
|
||||
int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
|
||||
int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
|
||||
int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
|
||||
int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
|
||||
int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
|
||||
int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
|
||||
int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
|
||||
int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
|
||||
int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
|
||||
int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
|
||||
int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
|
||||
int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
|
||||
int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
|
||||
int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
|
||||
int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
|
||||
int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
|
||||
int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
|
||||
int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
|
||||
int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
|
||||
int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
|
||||
int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
|
||||
int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
|
||||
int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
|
||||
int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
|
||||
int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
|
||||
int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
|
||||
int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
|
||||
int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
|
||||
int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
|
||||
int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
|
||||
int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
|
||||
int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
|
||||
int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
|
||||
int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
|
||||
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
|
||||
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
|
||||
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
|
||||
int, i999 int, i1000 int, b blob) row_format=dynamic ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG");
|
||||
update federated.t1 set b=repeat('a',256);
|
||||
update federated.t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0;
|
||||
select * from federated.t1 where i9=0 and i10=0;
|
||||
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
|
||||
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 PatrickG
|
||||
update federated.t1 set i50=20;
|
||||
select * from federated.t1;
|
||||
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
|
||||
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 PatrickG
|
||||
delete from federated.t1 where i51=20;
|
||||
select * from federated.t1;
|
||||
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
|
||||
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 PatrickG
|
||||
delete from federated.t1 where i50=20;
|
||||
select * from federated.t1;
|
||||
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code)) DEFAULT CHARSET=latin1;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 (code, fileguts, creation_date) values ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
|
||||
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
|
||||
select * from federated.t1;
|
||||
id code fileguts creation_date entered_time
|
||||
1 ASDFWERQWETWETAWETA *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2003-03-03 03:03:03 2004-04-04 04:04:04
|
||||
2 DEUEUEUEUEUEUEUEUEU *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2004-04-04 04:04:04 2004-04-04 04:04:04
|
||||
drop table if exists federated.t1;
|
||||
drop table if exists federated.t1;
|
||||
drop database if exists federated;
|
||||
drop table if exists federated.t1;
|
||||
drop database if exists federated;
|
2
mysql-test/r/have_federated_db.require
Normal file
2
mysql-test/r/have_federated_db.require
Normal file
|
@ -0,0 +1,2 @@
|
|||
Variable_name Value
|
||||
have_federated_db YES
|
|
@ -49,7 +49,6 @@ TABLE_PRIVILEGES
|
|||
COLUMN_PRIVILEGES
|
||||
TABLE_CONSTRAINTS
|
||||
KEY_COLUMN_USAGE
|
||||
TABLE_NAMES
|
||||
columns_priv
|
||||
db
|
||||
func
|
||||
|
@ -78,7 +77,6 @@ c table_name
|
|||
TABLES TABLES
|
||||
TABLE_PRIVILEGES TABLE_PRIVILEGES
|
||||
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
|
||||
TABLE_NAMES TABLE_NAMES
|
||||
tables_priv tables_priv
|
||||
time_zone time_zone
|
||||
time_zone_leap_second time_zone_leap_second
|
||||
|
@ -96,7 +94,6 @@ c table_name
|
|||
TABLES TABLES
|
||||
TABLE_PRIVILEGES TABLE_PRIVILEGES
|
||||
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
|
||||
TABLE_NAMES TABLE_NAMES
|
||||
tables_priv tables_priv
|
||||
time_zone time_zone
|
||||
time_zone_leap_second time_zone_leap_second
|
||||
|
@ -577,7 +574,6 @@ Tables_in_information_schema (T%) Table_type
|
|||
TABLES TEMPORARY
|
||||
TABLE_PRIVILEGES TEMPORARY
|
||||
TABLE_CONSTRAINTS TEMPORARY
|
||||
TABLE_NAMES TEMPORARY
|
||||
create table t1(a int);
|
||||
ERROR 42S02: Unknown table 't1' in information_schema
|
||||
use test;
|
||||
|
@ -589,7 +585,23 @@ Tables_in_information_schema (T%)
|
|||
TABLES
|
||||
TABLE_PRIVILEGES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_NAMES
|
||||
select table_name from tables where table_name='user';
|
||||
table_name
|
||||
user
|
||||
select column_name, privileges from columns
|
||||
where table_name='user' and column_name like '%o%';
|
||||
column_name privileges
|
||||
Host select,insert,update,references
|
||||
Password select,insert,update,references
|
||||
Drop_priv select,insert,update,references
|
||||
Reload_priv select,insert,update,references
|
||||
Shutdown_priv select,insert,update,references
|
||||
Process_priv select,insert,update,references
|
||||
Show_db_priv select,insert,update,references
|
||||
Lock_tables_priv select,insert,update,references
|
||||
Show_view_priv select,insert,update,references
|
||||
max_questions select,insert,update,references
|
||||
max_connections select,insert,update,references
|
||||
use test;
|
||||
create function sub1(i int) returns int
|
||||
return i+1;
|
||||
|
@ -627,3 +639,5 @@ constraint_name
|
|||
drop view t2;
|
||||
drop view t3;
|
||||
drop table t4;
|
||||
select * from information_schema.table_names;
|
||||
ERROR 42S02: Unknown table 'table_names' in information_schema
|
||||
|
|
|
@ -14,7 +14,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -325,6 +325,7 @@ NDB YES/NO Alias for NDBCLUSTER
|
|||
EXAMPLE YES/NO Example storage engine
|
||||
ARCHIVE YES/NO Archive storage engine
|
||||
CSV YES/NO CSV storage engine
|
||||
FEDERATED YES/NO Federated MySQL storage engine
|
||||
drop table if exists t5;
|
||||
prepare stmt1 from ' drop table if exists t5 ' ;
|
||||
execute stmt1 ;
|
||||
|
|
|
@ -11,7 +11,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -66,7 +66,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
|
|
@ -11,7 +11,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -66,7 +66,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
|
|
@ -12,7 +12,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 varchar(100), c24 varchar(100),
|
||||
c25 varchar(100), c26 varchar(100), c27 varchar(100), c28 varchar(100),
|
||||
c29 varchar(100), c30 varchar(100), c31 enum('one', 'two', 'three'),
|
||||
|
@ -67,7 +67,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
|
|
@ -13,7 +13,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -33,7 +33,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -53,7 +53,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -109,7 +109,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
@ -3062,7 +3062,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -3118,7 +3118,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
|
|
@ -11,7 +11,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -66,7 +66,7 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
|
|
|
@ -11,7 +11,7 @@ c1 tinyint, c2 smallint, c3 mediumint, c4 int,
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -66,11 +66,11 @@ def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
|||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
def test t9 t9 c16 c16 11 8 8 Y 128 0 63
|
||||
def test t9 t9 c17 c17 13 4 4 Y 32864 0 63
|
||||
def test t9 t9 c18 c18 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c18 c18 1 4 1 Y 32768 0 63
|
||||
def test t9 t9 c19 c19 1 1 1 Y 32768 0 63
|
||||
def test t9 t9 c20 c20 254 1 1 Y 0 0 8
|
||||
def test t9 t9 c21 c21 253 10 10 Y 0 0 8
|
||||
def test t9 t9 c22 c22 253 30 30 Y 0 0 8
|
||||
def test t9 t9 c21 c21 254 10 10 Y 0 0 8
|
||||
def test t9 t9 c22 c22 254 30 30 Y 0 0 8
|
||||
def test t9 t9 c23 c23 252 255 8 Y 144 0 63
|
||||
def test t9 t9 c24 c24 252 255 8 Y 16 0 8
|
||||
def test t9 t9 c25 c25 252 65535 4 Y 144 0 63
|
||||
|
@ -1756,9 +1756,9 @@ t5 CREATE TABLE `t5` (
|
|||
`param02` double default NULL,
|
||||
`const03` double NOT NULL default '0',
|
||||
`param03` double default NULL,
|
||||
`const04` char(3) NOT NULL default '',
|
||||
`const04` varchar(3) NOT NULL default '',
|
||||
`param04` longtext,
|
||||
`const05` binary(3) NOT NULL default '',
|
||||
`const05` varbinary(3) NOT NULL default '',
|
||||
`param05` longblob,
|
||||
`const06` varchar(10) NOT NULL default '',
|
||||
`param06` longtext,
|
||||
|
@ -1786,9 +1786,9 @@ def test t5 t5 const02 const02 5 3 3 N 32769 1 63
|
|||
def test t5 t5 param02 param02 5 20 1 Y 32768 31 63
|
||||
def test t5 t5 const03 const03 5 23 1 N 32769 31 63
|
||||
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
|
||||
def test t5 t5 const04 const04 254 3 3 N 1 0 8
|
||||
def test t5 t5 const04 const04 253 3 3 N 1 0 8
|
||||
def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8
|
||||
def test t5 t5 const05 const05 254 3 3 N 129 0 63
|
||||
def test t5 t5 const05 const05 253 3 3 N 129 0 63
|
||||
def test t5 t5 param05 param05 252 16777215 3 Y 144 0 63
|
||||
def test t5 t5 const06 const06 253 10 10 N 1 0 8
|
||||
def test t5 t5 param06 param06 252 16777215 10 Y 16 0 8
|
||||
|
@ -1892,38 +1892,38 @@ from t9 where c1= 1 ;
|
|||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 1 Y 128 31 63
|
||||
def @arg03 254 20 1 Y 128 31 63
|
||||
def @arg04 254 20 1 Y 128 31 63
|
||||
def @arg05 254 20 1 Y 128 31 63
|
||||
def @arg06 254 20 1 Y 128 31 63
|
||||
def @arg07 254 20 1 Y 128 31 63
|
||||
def @arg08 254 20 1 Y 128 31 63
|
||||
def @arg09 254 20 1 Y 128 31 63
|
||||
def @arg10 254 20 1 Y 128 31 63
|
||||
def @arg11 254 20 1 Y 128 31 63
|
||||
def @arg12 254 20 1 Y 128 31 63
|
||||
def @arg13 254 8192 10 Y 128 31 63
|
||||
def @arg14 254 8192 19 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 8 Y 128 31 63
|
||||
def @arg17 254 20 4 Y 128 31 63
|
||||
def @arg18 254 20 1 Y 128 31 63
|
||||
def @arg19 254 20 1 Y 128 31 63
|
||||
def @arg20 254 8192 1 Y 0 31 8
|
||||
def @arg21 254 8192 10 Y 0 31 8
|
||||
def @arg22 254 8192 30 Y 0 31 8
|
||||
def @arg23 254 8192 8 Y 128 31 63
|
||||
def @arg24 254 8192 8 Y 0 31 8
|
||||
def @arg25 254 8192 4 Y 128 31 63
|
||||
def @arg26 254 8192 4 Y 0 31 8
|
||||
def @arg27 254 8192 10 Y 128 31 63
|
||||
def @arg28 254 8192 10 Y 0 31 8
|
||||
def @arg29 254 8192 8 Y 128 31 63
|
||||
def @arg30 254 8192 8 Y 0 31 8
|
||||
def @arg31 254 8192 3 Y 0 31 8
|
||||
def @arg32 254 8192 6 Y 128 31 63
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 1 Y 128 31 63
|
||||
def @arg03 253 20 1 Y 128 31 63
|
||||
def @arg04 253 20 1 Y 128 31 63
|
||||
def @arg05 253 20 1 Y 128 31 63
|
||||
def @arg06 253 20 1 Y 128 31 63
|
||||
def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 31 63
|
||||
def @arg18 253 20 1 Y 128 31 63
|
||||
def @arg19 253 20 1 Y 128 31 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -1939,38 +1939,38 @@ from t9 where c1= 0 ;
|
|||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 0 Y 128 31 63
|
||||
def @arg03 254 20 0 Y 128 31 63
|
||||
def @arg04 254 20 0 Y 128 31 63
|
||||
def @arg05 254 20 0 Y 128 31 63
|
||||
def @arg06 254 20 0 Y 128 31 63
|
||||
def @arg07 254 20 0 Y 128 31 63
|
||||
def @arg08 254 20 0 Y 128 31 63
|
||||
def @arg09 254 20 0 Y 128 31 63
|
||||
def @arg10 254 20 0 Y 128 31 63
|
||||
def @arg11 254 20 0 Y 128 31 63
|
||||
def @arg12 254 20 0 Y 128 31 63
|
||||
def @arg13 254 8192 0 Y 128 31 63
|
||||
def @arg14 254 8192 0 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 0 Y 128 31 63
|
||||
def @arg17 254 20 0 Y 128 31 63
|
||||
def @arg18 254 20 0 Y 128 31 63
|
||||
def @arg19 254 20 0 Y 128 31 63
|
||||
def @arg20 254 8192 0 Y 0 31 8
|
||||
def @arg21 254 8192 0 Y 0 31 8
|
||||
def @arg22 254 8192 0 Y 0 31 8
|
||||
def @arg23 254 8192 0 Y 128 31 63
|
||||
def @arg24 254 8192 0 Y 0 31 8
|
||||
def @arg25 254 8192 0 Y 128 31 63
|
||||
def @arg26 254 8192 0 Y 0 31 8
|
||||
def @arg27 254 8192 0 Y 128 31 63
|
||||
def @arg28 254 8192 0 Y 0 31 8
|
||||
def @arg29 254 8192 0 Y 128 31 63
|
||||
def @arg30 254 8192 0 Y 0 31 8
|
||||
def @arg31 254 8192 0 Y 0 31 8
|
||||
def @arg32 254 8192 0 Y 0 31 8
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 0 Y 128 31 63
|
||||
def @arg03 253 20 0 Y 128 31 63
|
||||
def @arg04 253 20 0 Y 128 31 63
|
||||
def @arg05 253 20 0 Y 128 31 63
|
||||
def @arg06 253 20 0 Y 128 31 63
|
||||
def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 31 63
|
||||
def @arg18 253 20 0 Y 128 31 63
|
||||
def @arg19 253 20 0 Y 128 31 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
|
@ -1989,38 +1989,38 @@ execute stmt1 using @my_key ;
|
|||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 1 Y 128 31 63
|
||||
def @arg03 254 20 1 Y 128 31 63
|
||||
def @arg04 254 20 1 Y 128 31 63
|
||||
def @arg05 254 20 1 Y 128 31 63
|
||||
def @arg06 254 20 1 Y 128 31 63
|
||||
def @arg07 254 20 1 Y 128 31 63
|
||||
def @arg08 254 20 1 Y 128 31 63
|
||||
def @arg09 254 20 1 Y 128 31 63
|
||||
def @arg10 254 20 1 Y 128 31 63
|
||||
def @arg11 254 20 1 Y 128 31 63
|
||||
def @arg12 254 20 1 Y 128 31 63
|
||||
def @arg13 254 8192 10 Y 128 31 63
|
||||
def @arg14 254 8192 19 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 8 Y 128 31 63
|
||||
def @arg17 254 20 4 Y 128 31 63
|
||||
def @arg18 254 20 1 Y 128 31 63
|
||||
def @arg19 254 20 1 Y 128 31 63
|
||||
def @arg20 254 8192 1 Y 0 31 8
|
||||
def @arg21 254 8192 10 Y 0 31 8
|
||||
def @arg22 254 8192 30 Y 0 31 8
|
||||
def @arg23 254 8192 8 Y 128 31 63
|
||||
def @arg24 254 8192 8 Y 0 31 8
|
||||
def @arg25 254 8192 4 Y 128 31 63
|
||||
def @arg26 254 8192 4 Y 0 31 8
|
||||
def @arg27 254 8192 10 Y 128 31 63
|
||||
def @arg28 254 8192 10 Y 0 31 8
|
||||
def @arg29 254 8192 8 Y 128 31 63
|
||||
def @arg30 254 8192 8 Y 0 31 8
|
||||
def @arg31 254 8192 3 Y 0 31 8
|
||||
def @arg32 254 8192 6 Y 128 31 63
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 1 Y 128 31 63
|
||||
def @arg03 253 20 1 Y 128 31 63
|
||||
def @arg04 253 20 1 Y 128 31 63
|
||||
def @arg05 253 20 1 Y 128 31 63
|
||||
def @arg06 253 20 1 Y 128 31 63
|
||||
def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 31 63
|
||||
def @arg18 253 20 1 Y 128 31 63
|
||||
def @arg19 253 20 1 Y 128 31 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2029,38 +2029,38 @@ execute stmt1 using @my_key ;
|
|||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 0 Y 128 31 63
|
||||
def @arg03 254 20 0 Y 128 31 63
|
||||
def @arg04 254 20 0 Y 128 31 63
|
||||
def @arg05 254 20 0 Y 128 31 63
|
||||
def @arg06 254 20 0 Y 128 31 63
|
||||
def @arg07 254 20 0 Y 128 31 63
|
||||
def @arg08 254 20 0 Y 128 31 63
|
||||
def @arg09 254 20 0 Y 128 31 63
|
||||
def @arg10 254 20 0 Y 128 31 63
|
||||
def @arg11 254 20 0 Y 128 31 63
|
||||
def @arg12 254 20 0 Y 128 31 63
|
||||
def @arg13 254 8192 0 Y 128 31 63
|
||||
def @arg14 254 8192 0 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 0 Y 128 31 63
|
||||
def @arg17 254 20 0 Y 128 31 63
|
||||
def @arg18 254 20 0 Y 128 31 63
|
||||
def @arg19 254 20 0 Y 128 31 63
|
||||
def @arg20 254 8192 0 Y 0 31 8
|
||||
def @arg21 254 8192 0 Y 0 31 8
|
||||
def @arg22 254 8192 0 Y 0 31 8
|
||||
def @arg23 254 8192 0 Y 128 31 63
|
||||
def @arg24 254 8192 0 Y 0 31 8
|
||||
def @arg25 254 8192 0 Y 128 31 63
|
||||
def @arg26 254 8192 0 Y 0 31 8
|
||||
def @arg27 254 8192 0 Y 128 31 63
|
||||
def @arg28 254 8192 0 Y 0 31 8
|
||||
def @arg29 254 8192 0 Y 128 31 63
|
||||
def @arg30 254 8192 0 Y 0 31 8
|
||||
def @arg31 254 8192 0 Y 0 31 8
|
||||
def @arg32 254 8192 0 Y 0 31 8
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 0 Y 128 31 63
|
||||
def @arg03 253 20 0 Y 128 31 63
|
||||
def @arg04 253 20 0 Y 128 31 63
|
||||
def @arg05 253 20 0 Y 128 31 63
|
||||
def @arg06 253 20 0 Y 128 31 63
|
||||
def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 31 63
|
||||
def @arg18 253 20 0 Y 128 31 63
|
||||
def @arg19 253 20 0 Y 128 31 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
|
@ -2077,38 +2077,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
|
|||
from t9 where c1= 1 ;
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 1 Y 128 31 63
|
||||
def @arg03 254 20 1 Y 128 31 63
|
||||
def @arg04 254 20 1 Y 128 31 63
|
||||
def @arg05 254 20 1 Y 128 31 63
|
||||
def @arg06 254 20 1 Y 128 31 63
|
||||
def @arg07 254 20 1 Y 128 31 63
|
||||
def @arg08 254 20 1 Y 128 31 63
|
||||
def @arg09 254 20 1 Y 128 31 63
|
||||
def @arg10 254 20 1 Y 128 31 63
|
||||
def @arg11 254 20 1 Y 128 31 63
|
||||
def @arg12 254 20 1 Y 128 31 63
|
||||
def @arg13 254 8192 10 Y 128 31 63
|
||||
def @arg14 254 8192 19 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 8 Y 128 31 63
|
||||
def @arg17 254 20 4 Y 128 31 63
|
||||
def @arg18 254 20 1 Y 128 31 63
|
||||
def @arg19 254 20 1 Y 128 31 63
|
||||
def @arg20 254 8192 1 Y 0 31 8
|
||||
def @arg21 254 8192 10 Y 0 31 8
|
||||
def @arg22 254 8192 30 Y 0 31 8
|
||||
def @arg23 254 8192 8 Y 128 31 63
|
||||
def @arg24 254 8192 8 Y 0 31 8
|
||||
def @arg25 254 8192 4 Y 128 31 63
|
||||
def @arg26 254 8192 4 Y 0 31 8
|
||||
def @arg27 254 8192 10 Y 128 31 63
|
||||
def @arg28 254 8192 10 Y 0 31 8
|
||||
def @arg29 254 8192 8 Y 128 31 63
|
||||
def @arg30 254 8192 8 Y 0 31 8
|
||||
def @arg31 254 8192 3 Y 0 31 8
|
||||
def @arg32 254 8192 6 Y 128 31 63
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 1 Y 128 31 63
|
||||
def @arg03 253 20 1 Y 128 31 63
|
||||
def @arg04 253 20 1 Y 128 31 63
|
||||
def @arg05 253 20 1 Y 128 31 63
|
||||
def @arg06 253 20 1 Y 128 31 63
|
||||
def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 31 63
|
||||
def @arg18 253 20 1 Y 128 31 63
|
||||
def @arg19 253 20 1 Y 128 31 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2121,38 +2121,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
|
|||
from t9 where c1= 0 ;
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 0 Y 128 31 63
|
||||
def @arg03 254 20 0 Y 128 31 63
|
||||
def @arg04 254 20 0 Y 128 31 63
|
||||
def @arg05 254 20 0 Y 128 31 63
|
||||
def @arg06 254 20 0 Y 128 31 63
|
||||
def @arg07 254 20 0 Y 128 31 63
|
||||
def @arg08 254 20 0 Y 128 31 63
|
||||
def @arg09 254 20 0 Y 128 31 63
|
||||
def @arg10 254 20 0 Y 128 31 63
|
||||
def @arg11 254 20 0 Y 128 31 63
|
||||
def @arg12 254 20 0 Y 128 31 63
|
||||
def @arg13 254 8192 0 Y 128 31 63
|
||||
def @arg14 254 8192 0 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 0 Y 128 31 63
|
||||
def @arg17 254 20 0 Y 128 31 63
|
||||
def @arg18 254 20 0 Y 128 31 63
|
||||
def @arg19 254 20 0 Y 128 31 63
|
||||
def @arg20 254 8192 0 Y 0 31 8
|
||||
def @arg21 254 8192 0 Y 0 31 8
|
||||
def @arg22 254 8192 0 Y 0 31 8
|
||||
def @arg23 254 8192 0 Y 128 31 63
|
||||
def @arg24 254 8192 0 Y 0 31 8
|
||||
def @arg25 254 8192 0 Y 128 31 63
|
||||
def @arg26 254 8192 0 Y 0 31 8
|
||||
def @arg27 254 8192 0 Y 128 31 63
|
||||
def @arg28 254 8192 0 Y 0 31 8
|
||||
def @arg29 254 8192 0 Y 128 31 63
|
||||
def @arg30 254 8192 0 Y 0 31 8
|
||||
def @arg31 254 8192 0 Y 0 31 8
|
||||
def @arg32 254 8192 0 Y 0 31 8
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 0 Y 128 31 63
|
||||
def @arg03 253 20 0 Y 128 31 63
|
||||
def @arg04 253 20 0 Y 128 31 63
|
||||
def @arg05 253 20 0 Y 128 31 63
|
||||
def @arg06 253 20 0 Y 128 31 63
|
||||
def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 31 63
|
||||
def @arg18 253 20 0 Y 128 31 63
|
||||
def @arg19 253 20 0 Y 128 31 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2167,76 +2167,76 @@ set @my_key= 1 ;
|
|||
execute stmt1 using @my_key ;
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 1 Y 128 31 63
|
||||
def @arg03 254 20 1 Y 128 31 63
|
||||
def @arg04 254 20 1 Y 128 31 63
|
||||
def @arg05 254 20 1 Y 128 31 63
|
||||
def @arg06 254 20 1 Y 128 31 63
|
||||
def @arg07 254 20 1 Y 128 31 63
|
||||
def @arg08 254 20 1 Y 128 31 63
|
||||
def @arg09 254 20 1 Y 128 31 63
|
||||
def @arg10 254 20 1 Y 128 31 63
|
||||
def @arg11 254 20 1 Y 128 31 63
|
||||
def @arg12 254 20 1 Y 128 31 63
|
||||
def @arg13 254 8192 10 Y 128 31 63
|
||||
def @arg14 254 8192 19 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 8 Y 128 31 63
|
||||
def @arg17 254 20 4 Y 128 31 63
|
||||
def @arg18 254 20 1 Y 128 31 63
|
||||
def @arg19 254 20 1 Y 128 31 63
|
||||
def @arg20 254 8192 1 Y 0 31 8
|
||||
def @arg21 254 8192 10 Y 0 31 8
|
||||
def @arg22 254 8192 30 Y 0 31 8
|
||||
def @arg23 254 8192 8 Y 128 31 63
|
||||
def @arg24 254 8192 8 Y 0 31 8
|
||||
def @arg25 254 8192 4 Y 128 31 63
|
||||
def @arg26 254 8192 4 Y 0 31 8
|
||||
def @arg27 254 8192 10 Y 128 31 63
|
||||
def @arg28 254 8192 10 Y 0 31 8
|
||||
def @arg29 254 8192 8 Y 128 31 63
|
||||
def @arg30 254 8192 8 Y 0 31 8
|
||||
def @arg31 254 8192 3 Y 0 31 8
|
||||
def @arg32 254 8192 6 Y 128 31 63
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 1 Y 128 31 63
|
||||
def @arg03 253 20 1 Y 128 31 63
|
||||
def @arg04 253 20 1 Y 128 31 63
|
||||
def @arg05 253 20 1 Y 128 31 63
|
||||
def @arg06 253 20 1 Y 128 31 63
|
||||
def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 31 63
|
||||
def @arg18 253 20 1 Y 128 31 63
|
||||
def @arg19 253 20 1 Y 128 31 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
execute stmt1 using @my_key ;
|
||||
execute full_info ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @arg01 254 20 1 Y 128 31 63
|
||||
def @arg02 254 20 0 Y 128 31 63
|
||||
def @arg03 254 20 0 Y 128 31 63
|
||||
def @arg04 254 20 0 Y 128 31 63
|
||||
def @arg05 254 20 0 Y 128 31 63
|
||||
def @arg06 254 20 0 Y 128 31 63
|
||||
def @arg07 254 20 0 Y 128 31 63
|
||||
def @arg08 254 20 0 Y 128 31 63
|
||||
def @arg09 254 20 0 Y 128 31 63
|
||||
def @arg10 254 20 0 Y 128 31 63
|
||||
def @arg11 254 20 0 Y 128 31 63
|
||||
def @arg12 254 20 0 Y 128 31 63
|
||||
def @arg13 254 8192 0 Y 128 31 63
|
||||
def @arg14 254 8192 0 Y 128 31 63
|
||||
def @arg15 254 8192 19 Y 128 31 63
|
||||
def @arg16 254 8192 0 Y 128 31 63
|
||||
def @arg17 254 20 0 Y 128 31 63
|
||||
def @arg18 254 20 0 Y 128 31 63
|
||||
def @arg19 254 20 0 Y 128 31 63
|
||||
def @arg20 254 8192 0 Y 0 31 8
|
||||
def @arg21 254 8192 0 Y 0 31 8
|
||||
def @arg22 254 8192 0 Y 0 31 8
|
||||
def @arg23 254 8192 0 Y 128 31 63
|
||||
def @arg24 254 8192 0 Y 0 31 8
|
||||
def @arg25 254 8192 0 Y 128 31 63
|
||||
def @arg26 254 8192 0 Y 0 31 8
|
||||
def @arg27 254 8192 0 Y 128 31 63
|
||||
def @arg28 254 8192 0 Y 0 31 8
|
||||
def @arg29 254 8192 0 Y 128 31 63
|
||||
def @arg30 254 8192 0 Y 0 31 8
|
||||
def @arg31 254 8192 0 Y 0 31 8
|
||||
def @arg32 254 8192 0 Y 0 31 8
|
||||
def @arg01 253 20 1 Y 128 31 63
|
||||
def @arg02 253 20 0 Y 128 31 63
|
||||
def @arg03 253 20 0 Y 128 31 63
|
||||
def @arg04 253 20 0 Y 128 31 63
|
||||
def @arg05 253 20 0 Y 128 31 63
|
||||
def @arg06 253 20 0 Y 128 31 63
|
||||
def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 31 63
|
||||
def @arg18 253 20 0 Y 128 31 63
|
||||
def @arg19 253 20 0 Y 128 31 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
|
|
364
mysql-test/r/type_bit.result
Normal file
364
mysql-test/r/type_bit.result
Normal file
|
@ -0,0 +1,364 @@
|
|||
select 0 + b'1';
|
||||
0 + b'1'
|
||||
1
|
||||
select 0 + b'0';
|
||||
0 + b'0'
|
||||
0
|
||||
select 0 + b'000001';
|
||||
0 + b'000001'
|
||||
1
|
||||
select 0 + b'000011';
|
||||
0 + b'000011'
|
||||
3
|
||||
select 0 + b'000101';
|
||||
0 + b'000101'
|
||||
5
|
||||
select 0 + b'000000';
|
||||
0 + b'000000'
|
||||
0
|
||||
select 0 + b'10000000';
|
||||
0 + b'10000000'
|
||||
128
|
||||
select 0 + b'11111111';
|
||||
0 + b'11111111'
|
||||
255
|
||||
select 0 + b'10000001';
|
||||
0 + b'10000001'
|
||||
129
|
||||
select 0 + b'1000000000000000';
|
||||
0 + b'1000000000000000'
|
||||
32768
|
||||
select 0 + b'1111111111111111';
|
||||
0 + b'1111111111111111'
|
||||
65535
|
||||
select 0 + b'1000000000000001';
|
||||
0 + b'1000000000000001'
|
||||
32769
|
||||
drop table if exists t1;
|
||||
create table t1 (a bit(65));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 64); use BLOB instead
|
||||
create table t1 (a bit(0));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (a bit, key(a)) engine=innodb;
|
||||
ERROR 42000: The storage engine for the table doesn't support BIT FIELD
|
||||
create table t1 (a bit(64));
|
||||
insert into t1 values
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
(b'0000000000000000000000000000000000000000000000000000000000000001'),
|
||||
(b'1010101010101010101010101010101010101010101010101010101010101010'),
|
||||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
FFFFFFFFFFFFFFFF
|
||||
8000000000000000
|
||||
1
|
||||
AAAAAAAAAAAAAAAA
|
||||
5555555555555555
|
||||
drop table t1;
|
||||
create table t1 (a bit);
|
||||
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value adjusted for column 'a' at row 4
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
alter table t1 add unique (a);
|
||||
ERROR 23000: Duplicate entry '' for key 1
|
||||
drop table t1;
|
||||
create table t1 (a bit(2));
|
||||
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value adjusted for column 'a' at row 4
|
||||
select a+0 from t1;
|
||||
a+0
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
alter table t1 add key (a);
|
||||
explain select a+0 from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 2 NULL 4 Using index
|
||||
select a+0 from t1;
|
||||
a+0
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
create table t1 (a bit(7), b bit(9), key(a, b));
|
||||
insert into t1 values
|
||||
(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),
|
||||
(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),
|
||||
(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),
|
||||
(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),
|
||||
(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),
|
||||
(44, 307), (68, 454), (57, 135);
|
||||
explain select a+0 from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 38 Using index
|
||||
select a+0 from t1;
|
||||
a+0
|
||||
0
|
||||
4
|
||||
5
|
||||
9
|
||||
23
|
||||
24
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
34
|
||||
44
|
||||
49
|
||||
56
|
||||
57
|
||||
59
|
||||
60
|
||||
61
|
||||
68
|
||||
68
|
||||
75
|
||||
77
|
||||
78
|
||||
79
|
||||
87
|
||||
88
|
||||
94
|
||||
94
|
||||
104
|
||||
106
|
||||
108
|
||||
111
|
||||
116
|
||||
118
|
||||
119
|
||||
122
|
||||
123
|
||||
127
|
||||
explain select b+0 from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 38 Using index
|
||||
select b+0 from t1;
|
||||
b+0
|
||||
177
|
||||
245
|
||||
178
|
||||
363
|
||||
36
|
||||
398
|
||||
499
|
||||
399
|
||||
83
|
||||
438
|
||||
202
|
||||
307
|
||||
345
|
||||
379
|
||||
135
|
||||
188
|
||||
343
|
||||
152
|
||||
206
|
||||
454
|
||||
42
|
||||
133
|
||||
123
|
||||
349
|
||||
351
|
||||
411
|
||||
46
|
||||
468
|
||||
280
|
||||
446
|
||||
67
|
||||
368
|
||||
390
|
||||
380
|
||||
368
|
||||
118
|
||||
411
|
||||
403
|
||||
explain select a+0, b+0 from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 38 Using index
|
||||
select a+0, b+0 from t1;
|
||||
a+0 b+0
|
||||
0 177
|
||||
4 245
|
||||
5 178
|
||||
9 363
|
||||
23 36
|
||||
24 398
|
||||
28 499
|
||||
29 399
|
||||
30 83
|
||||
31 438
|
||||
34 202
|
||||
44 307
|
||||
49 345
|
||||
56 379
|
||||
57 135
|
||||
59 188
|
||||
60 343
|
||||
61 152
|
||||
68 206
|
||||
68 454
|
||||
75 42
|
||||
77 133
|
||||
78 123
|
||||
79 349
|
||||
87 351
|
||||
88 411
|
||||
94 46
|
||||
94 468
|
||||
104 280
|
||||
106 446
|
||||
108 67
|
||||
111 368
|
||||
116 390
|
||||
118 380
|
||||
119 368
|
||||
122 118
|
||||
123 411
|
||||
127 403
|
||||
explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 2 NULL 27 Using where; Using index; Using filesort
|
||||
select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
|
||||
a+0 b+0
|
||||
44 307
|
||||
49 345
|
||||
56 379
|
||||
60 343
|
||||
68 206
|
||||
68 454
|
||||
79 349
|
||||
87 351
|
||||
88 411
|
||||
94 468
|
||||
104 280
|
||||
106 446
|
||||
111 368
|
||||
116 390
|
||||
118 380
|
||||
119 368
|
||||
123 411
|
||||
127 403
|
||||
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort
|
||||
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
a+0 b+0
|
||||
57 135
|
||||
61 152
|
||||
59 188
|
||||
68 206
|
||||
44 307
|
||||
60 343
|
||||
49 345
|
||||
56 379
|
||||
68 454
|
||||
set @@max_length_for_sort_data=0;
|
||||
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
a+0 b+0
|
||||
57 135
|
||||
61 152
|
||||
59 188
|
||||
68 206
|
||||
44 307
|
||||
60 343
|
||||
49 345
|
||||
56 379
|
||||
68 454
|
||||
select hex(min(a)) from t1;
|
||||
hex(min(a))
|
||||
0
|
||||
select hex(min(b)) from t1;
|
||||
hex(min(b))
|
||||
24
|
||||
select hex(min(a)), hex(max(a)), hex(min(b)), hex(max(b)) from t1;
|
||||
hex(min(a)) hex(max(a)) hex(min(b)) hex(max(b))
|
||||
0 7F 24 1F3
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b bit, c bit(9), key(a, b, c));
|
||||
insert into t1 values
|
||||
(4, NULL, 1), (4, 0, 3), (2, 1, 4), (1, 1, 100), (4, 0, 23), (4, 0, 54),
|
||||
(56, 0, 22), (4, 1, 100), (23, 0, 1), (4, 0, 34);
|
||||
select a+0, b+0, c+0 from t1;
|
||||
a+0 b+0 c+0
|
||||
1 1 100
|
||||
2 1 4
|
||||
4 NULL 1
|
||||
4 0 3
|
||||
4 0 23
|
||||
4 0 34
|
||||
4 0 54
|
||||
4 1 100
|
||||
23 0 1
|
||||
56 0 22
|
||||
select hex(min(b)) from t1 where a = 4;
|
||||
hex(min(b))
|
||||
0
|
||||
select hex(min(c)) from t1 where a = 4 and b = 0;
|
||||
hex(min(c))
|
||||
3
|
||||
select hex(max(b)) from t1;
|
||||
hex(max(b))
|
||||
1
|
||||
select a+0, b+0, c+0 from t1 where a = 4 and b = 0 limit 2;
|
||||
a+0 b+0 c+0
|
||||
4 0 3
|
||||
4 0 23
|
||||
select a+0, b+0, c+0 from t1 order by b desc;
|
||||
a+0 b+0 c+0
|
||||
2 1 4
|
||||
1 1 100
|
||||
4 1 100
|
||||
4 0 3
|
||||
4 0 23
|
||||
4 0 54
|
||||
56 0 22
|
||||
23 0 1
|
||||
4 0 34
|
||||
4 NULL 1
|
||||
select a+0, b+0, c+0 from t1 order by c;
|
||||
a+0 b+0 c+0
|
||||
4 NULL 1
|
||||
23 0 1
|
||||
4 0 3
|
||||
2 1 4
|
||||
56 0 22
|
||||
4 0 23
|
||||
4 0 34
|
||||
4 0 54
|
||||
1 1 100
|
||||
4 1 100
|
||||
drop table t1;
|
||||
create table t1(a bit(2), b bit(2));
|
||||
insert into t1 (a) values (0x01), (0x03), (0x02);
|
||||
update t1 set b= concat(a);
|
||||
select a+0, b+0 from t1;
|
||||
a+0 b+0
|
||||
1 1
|
||||
3 3
|
||||
2 2
|
||||
drop table t1;
|
||||
create table t1 (a bit(7), key(a));
|
||||
insert into t1 values (44), (57);
|
||||
select a+0 from t1;
|
||||
a+0
|
||||
44
|
||||
57
|
||||
drop table t1;
|
|
@ -1299,6 +1299,8 @@ INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
|
|||
SELECT * FROM t2;
|
||||
OPTIMIZE TABLE t2;
|
||||
SELECT * FROM t2;
|
||||
REPAIR TABLE t2;
|
||||
SELECT * FROM t2;
|
||||
|
||||
#
|
||||
# Test bulk inserts
|
||||
|
|
505
mysql-test/t/federated.test
Normal file
505
mysql-test/t/federated.test
Normal file
|
@ -0,0 +1,505 @@
|
|||
--source include/have_federated_db.inc
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
# remote table creation
|
||||
|
||||
connection slave;
|
||||
--replicate-ignore-db=federated
|
||||
stop slave;
|
||||
|
||||
--disable_warnings
|
||||
# at this point, we are connected to master
|
||||
drop database if exists federated;
|
||||
--enable_warnings
|
||||
create database federated;
|
||||
|
||||
# I wanted to use timestamp, but results will fail if so!!!
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) DEFAULT CHARSET=latin1;
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
drop database if exists federated;
|
||||
--enable_warnings
|
||||
create database federated;
|
||||
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
|
||||
insert into federated.t1 (name, other) values ('First Name', 11111);
|
||||
insert into federated.t1 (name, other) values ('Second Name', 22222);
|
||||
insert into federated.t1 (name, other) values ('Third Name', 33333);
|
||||
insert into federated.t1 (name, other) values ('Fourth Name', 44444);
|
||||
insert into federated.t1 (name, other) values ('Fifth Name', 55555);
|
||||
insert into federated.t1 (name, other) values ('Sixth Name', 66666);
|
||||
insert into federated.t1 (name, other) values ('Seventh Name', 77777);
|
||||
insert into federated.t1 (name, other) values ('Eigth Name', 88888);
|
||||
insert into federated.t1 (name, other) values ('Ninth Name', 99999);
|
||||
insert into federated.t1 (name, other) values ('Tenth Name', 101010);
|
||||
|
||||
# basic select
|
||||
select * from federated.t1;
|
||||
# with primary key index_read_idx
|
||||
select * from federated.t1 where id = 5;
|
||||
# with regular key index_read -> index_read_idx
|
||||
select * from federated.t1 where name = 'Sixth Name';
|
||||
# regular and primary key index_read_idx
|
||||
select * from federated.t1 where id = 6 and name = 'Sixth Name';
|
||||
# with regular key index_read -> index_read_idx
|
||||
select * from federated.t1 where other = 44444;
|
||||
select * from federated.t1 where name like '%th%';
|
||||
# update - update_row, index_read_idx
|
||||
update federated.t1 set name = '3rd name' where id = 3;
|
||||
select * from federated.t1 where name = '3rd name';
|
||||
# update - update_row, index_read -> index_read_idx
|
||||
update federated.t1 set name = 'Third name' where name = '3rd name';
|
||||
select * from federated.t1 where name = 'Third name';
|
||||
# rnd_post, ::position
|
||||
select * from federated.t1 order by id DESC;
|
||||
select * from federated.t1 order by name;
|
||||
select * from federated.t1 order by name DESC;
|
||||
select * from federated.t1 order by name ASC;
|
||||
select * from federated.t1 group by other;
|
||||
|
||||
# ::delete_row
|
||||
delete from federated.t1 where id = 5;
|
||||
select * from federated.t1 where id = 5;
|
||||
|
||||
# ::delete_all_rows
|
||||
delete from federated.t1;
|
||||
select * from federated.t1 where id = 5;
|
||||
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) );
|
||||
insert into federated.t1 (name, other) values ('First Name', 11111);
|
||||
insert into federated.t1 (name, other) values ('Second Name', NULL);
|
||||
insert into federated.t1 (name, other) values ('Third Name', 33333);
|
||||
insert into federated.t1 (name, other) values (NULL, NULL);
|
||||
insert into federated.t1 (name, other) values ('Fifth Name', 55555);
|
||||
insert into federated.t1 (name, other) values ('Sixth Name', 66666);
|
||||
insert into federated.t1 (name) values ('Seventh Name');
|
||||
insert into federated.t1 (name, other) values ('Eigth Name', 88888);
|
||||
insert into federated.t1 (name, other) values ('Ninth Name', 99999);
|
||||
insert into federated.t1 (other) values ('fee fie foe fum');
|
||||
|
||||
select * from federated.t1 where other IS NULL;
|
||||
select * from federated.t1 where name IS NULL;
|
||||
select * from federated.t1 where name IS NULL and other IS NULL;
|
||||
select * from federated.t1 where name IS NULL or other IS NULL;
|
||||
update federated.t1 set name = 'Fourth Name', other = 'four four four' where name IS NULL and other IS NULL;
|
||||
update federated.t1 set other = 'two two two two' where name = 'Secend Name';
|
||||
update federated.t1 set other = 'seven seven' where name like 'Sec%';
|
||||
update federated.t1 set other = 'seven seven' where name = 'Seventh Name';
|
||||
update federated.t1 set name = 'Tenth Name' where other like 'fee fie%';
|
||||
select * from federated.t1 where name IS NULL or other IS NULL ;
|
||||
select * from federated.t1;
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) DEFAULT CHARSET=latin1;
|
||||
|
||||
connection master;
|
||||
# test NULLs
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
# these both should be the same
|
||||
insert into federated.t1 values (NULL, NULL, NULL, NULL);
|
||||
insert into federated.t1 values ();
|
||||
insert into federated.t1 (id) values (1);
|
||||
insert into federated.t1 (name, floatval, other) values ('foo', 33.33333332, NULL);
|
||||
insert into federated.t1 (name, floatval, other) values (0, 00.3333, NULL);
|
||||
select * from federated.t1;
|
||||
select count(*) from federated.t1 where id IS NULL and name IS NULL and floatval IS NULL and other IS NULL;
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) DEFAULT CHARSET=latin1;
|
||||
|
||||
connection master;
|
||||
drop table if exists federated.t1;
|
||||
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
|
||||
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
|
||||
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
|
||||
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt:");
|
||||
select * from federated.t1;
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b));
|
||||
|
||||
connection master;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
|
||||
insert into federated.t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
|
||||
explain select * from federated.t1 order by a;
|
||||
explain select * from federated.t1 order by b;
|
||||
explain select * from federated.t1 order by c;
|
||||
explain select a from federated.t1 order by a;
|
||||
explain select b from federated.t1 order by b;
|
||||
explain select a,b from federated.t1 order by b;
|
||||
explain select a,b from federated.t1;
|
||||
explain select a,b,c from federated.t1;
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
|
||||
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
|
||||
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
|
||||
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
|
||||
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
|
||||
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
|
||||
int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
|
||||
i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
|
||||
int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
|
||||
i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
|
||||
int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
|
||||
i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
|
||||
int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
|
||||
int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
|
||||
int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
|
||||
int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
|
||||
int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
|
||||
int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
|
||||
int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
|
||||
int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
|
||||
int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
|
||||
int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
|
||||
int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
|
||||
int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
|
||||
int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
|
||||
int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
|
||||
int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
|
||||
int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
|
||||
int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
|
||||
int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
|
||||
int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
|
||||
int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
|
||||
int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
|
||||
int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
|
||||
int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
|
||||
int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
|
||||
int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
|
||||
int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
|
||||
int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
|
||||
int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
|
||||
int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
|
||||
int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
|
||||
int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
|
||||
int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
|
||||
int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
|
||||
int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
|
||||
int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
|
||||
int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
|
||||
int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
|
||||
int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
|
||||
int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
|
||||
int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
|
||||
int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
|
||||
int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
|
||||
int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
|
||||
int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
|
||||
int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
|
||||
int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
|
||||
int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
|
||||
int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
|
||||
int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
|
||||
int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
|
||||
int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
|
||||
int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
|
||||
int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
|
||||
int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
|
||||
int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
|
||||
int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
|
||||
int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
|
||||
int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
|
||||
int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
|
||||
int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
|
||||
int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
|
||||
int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
|
||||
int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
|
||||
int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
|
||||
int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
|
||||
int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
|
||||
int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
|
||||
int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
|
||||
int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
|
||||
int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
|
||||
int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
|
||||
int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
|
||||
int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
|
||||
int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
|
||||
int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
|
||||
int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
|
||||
int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
|
||||
int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
|
||||
int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
|
||||
int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
|
||||
int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
|
||||
int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
|
||||
int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
|
||||
int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
|
||||
int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
|
||||
int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
|
||||
int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
|
||||
int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
|
||||
int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
|
||||
int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
|
||||
int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
|
||||
int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
|
||||
int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
|
||||
int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
|
||||
int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
|
||||
int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
|
||||
int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
|
||||
int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
|
||||
int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
|
||||
int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
|
||||
int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
|
||||
int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
|
||||
int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
|
||||
int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
|
||||
int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
|
||||
int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
|
||||
int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
|
||||
int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
|
||||
int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
|
||||
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
|
||||
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
|
||||
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
|
||||
int, i999 int, i1000 int, b blob) row_format=dynamic;
|
||||
|
||||
connection master;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
|
||||
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
|
||||
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
|
||||
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
|
||||
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
|
||||
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
|
||||
int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int,
|
||||
i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68
|
||||
int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int,
|
||||
i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85
|
||||
int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int,
|
||||
i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102
|
||||
int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110
|
||||
int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118
|
||||
int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126
|
||||
int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134
|
||||
int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142
|
||||
int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150
|
||||
int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158
|
||||
int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166
|
||||
int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174
|
||||
int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182
|
||||
int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190
|
||||
int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198
|
||||
int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206
|
||||
int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214
|
||||
int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222
|
||||
int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230
|
||||
int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238
|
||||
int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246
|
||||
int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254
|
||||
int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262
|
||||
int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270
|
||||
int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278
|
||||
int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286
|
||||
int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294
|
||||
int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302
|
||||
int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310
|
||||
int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318
|
||||
int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326
|
||||
int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334
|
||||
int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342
|
||||
int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350
|
||||
int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358
|
||||
int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366
|
||||
int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374
|
||||
int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382
|
||||
int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390
|
||||
int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398
|
||||
int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406
|
||||
int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414
|
||||
int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422
|
||||
int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430
|
||||
int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438
|
||||
int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446
|
||||
int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454
|
||||
int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462
|
||||
int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470
|
||||
int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478
|
||||
int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486
|
||||
int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494
|
||||
int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502
|
||||
int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510
|
||||
int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518
|
||||
int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526
|
||||
int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534
|
||||
int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542
|
||||
int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550
|
||||
int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558
|
||||
int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566
|
||||
int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574
|
||||
int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582
|
||||
int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590
|
||||
int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598
|
||||
int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606
|
||||
int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614
|
||||
int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622
|
||||
int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630
|
||||
int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638
|
||||
int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646
|
||||
int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654
|
||||
int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662
|
||||
int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670
|
||||
int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678
|
||||
int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686
|
||||
int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694
|
||||
int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702
|
||||
int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710
|
||||
int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718
|
||||
int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726
|
||||
int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734
|
||||
int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742
|
||||
int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750
|
||||
int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758
|
||||
int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766
|
||||
int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774
|
||||
int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782
|
||||
int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790
|
||||
int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798
|
||||
int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806
|
||||
int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814
|
||||
int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822
|
||||
int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830
|
||||
int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838
|
||||
int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846
|
||||
int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854
|
||||
int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862
|
||||
int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870
|
||||
int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878
|
||||
int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886
|
||||
int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894
|
||||
int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902
|
||||
int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910
|
||||
int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918
|
||||
int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926
|
||||
int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934
|
||||
int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942
|
||||
int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950
|
||||
int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958
|
||||
int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966
|
||||
int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
|
||||
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
|
||||
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
|
||||
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
|
||||
int, i999 int, i1000 int, b blob) row_format=dynamic ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG");
|
||||
update federated.t1 set b=repeat('a',256);
|
||||
update federated.t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0;
|
||||
select * from federated.t1 where i9=0 and i10=0;
|
||||
update federated.t1 set i50=20;
|
||||
select * from federated.t1;
|
||||
delete from federated.t1 where i51=20;
|
||||
select * from federated.t1;
|
||||
delete from federated.t1 where i50=20;
|
||||
select * from federated.t1;
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code)) DEFAULT CHARSET=latin1;
|
||||
|
||||
connection master;
|
||||
drop table if exists federated.t1;
|
||||
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1';
|
||||
insert into federated.t1 (code, fileguts, creation_date) values ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
|
||||
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
|
||||
select * from federated.t1;
|
||||
drop table if exists federated.t1;
|
||||
|
||||
# TODO
|
||||
#
|
||||
# create table federated.t1 (a char(20)) charset=cp1251 ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:9308/federated/t1";
|
||||
#
|
||||
# connection slave;
|
||||
# drop table if exists federated.t1;
|
||||
# create table federated.t1 (a char(20)) charset=cp1251;
|
||||
#
|
||||
# connection master;
|
||||
# insert into federated.t1 values (_cp1251'À-ÁÂÃ-1');
|
||||
# insert into federated.t1 values (_cp1251'Á-ÂÃÄ-2');
|
||||
# set names cp1251;
|
||||
# insert into federated.t1 values ('Â-ÃÄÅ-3');
|
||||
# insert into federated.t1 values ('Ã-ŨÆ-4');
|
||||
# select * from federated.t1;
|
||||
# select hex(a) from federated.t1;
|
||||
# select hex(a) from federated.t1 order by a desc;
|
||||
# update federated.t1 set a='À-ÁÂÃ-1íîâûé' where a='À-ÁÂÃ-1';
|
||||
# select * from federated.t1;
|
||||
# delete from federated.t1 where a='Ã-ŨÆ-4';
|
||||
# select * from federated.t1;
|
||||
# delete from federated.t1 where a>'Â-';
|
||||
# select * from federated.t1;
|
||||
# set names default;
|
||||
#
|
||||
# drop table if exists federated.t1;
|
||||
#
|
||||
|
||||
connection slave;
|
||||
drop table if exists federated.t1;
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
drop database if exists federated;
|
||||
--enable_warnings
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
drop table if exists federated.t1;
|
||||
drop database if exists federated;
|
||||
--enable_warnings
|
|
@ -293,6 +293,13 @@ show tables;
|
|||
use information_schema;
|
||||
show tables like "T%";
|
||||
|
||||
#
|
||||
# Bug#7210: information_schema: can't access when table-name = reserved word
|
||||
#
|
||||
select table_name from tables where table_name='user';
|
||||
select column_name, privileges from columns
|
||||
where table_name='user' and column_name like '%o%';
|
||||
|
||||
#
|
||||
# Bug#7212: information_schema: "Can't find file" errors if storage engine gone
|
||||
# Bug#7211: information_schema: crash if bad view
|
||||
|
@ -318,3 +325,9 @@ where table_schema='test';
|
|||
drop view t2;
|
||||
drop view t3;
|
||||
drop table t4;
|
||||
|
||||
#
|
||||
# Bug#7213: information_schema: redundant non-standard TABLE_NAMES table
|
||||
#
|
||||
--error 1109
|
||||
select * from information_schema.table_names;
|
||||
|
|
|
@ -32,7 +32,7 @@ eval create table t9
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 varchar(100), c24 varchar(100),
|
||||
c25 varchar(100), c26 varchar(100), c27 varchar(100), c28 varchar(100),
|
||||
c29 varchar(100), c30 varchar(100), c31 enum('one', 'two', 'three'),
|
||||
|
|
|
@ -32,7 +32,7 @@ create table t9
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
@ -63,7 +63,7 @@ create table t9
|
|||
c5 integer, c6 bigint, c7 float, c8 double,
|
||||
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
|
||||
c13 date, c14 datetime, c15 timestamp(14), c16 time,
|
||||
c17 year, c18 bit, c19 bool, c20 char,
|
||||
c17 year, c18 tinyint, c19 bool, c20 char,
|
||||
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
|
||||
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
|
||||
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
|
||||
|
|
106
mysql-test/t/type_bit.test
Normal file
106
mysql-test/t/type_bit.test
Normal file
|
@ -0,0 +1,106 @@
|
|||
#
|
||||
# testing of the BIT column type
|
||||
#
|
||||
|
||||
select 0 + b'1';
|
||||
select 0 + b'0';
|
||||
select 0 + b'000001';
|
||||
select 0 + b'000011';
|
||||
select 0 + b'000101';
|
||||
select 0 + b'000000';
|
||||
select 0 + b'10000000';
|
||||
select 0 + b'11111111';
|
||||
select 0 + b'10000001';
|
||||
select 0 + b'1000000000000000';
|
||||
select 0 + b'1111111111111111';
|
||||
select 0 + b'1000000000000001';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
--error 1074
|
||||
create table t1 (a bit(65));
|
||||
|
||||
create table t1 (a bit(0));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--error 1178
|
||||
create table t1 (a bit, key(a)) engine=innodb;
|
||||
|
||||
create table t1 (a bit(64));
|
||||
insert into t1 values
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
(b'0000000000000000000000000000000000000000000000000000000000000001'),
|
||||
(b'1010101010101010101010101010101010101010101010101010101010101010'),
|
||||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
select hex(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bit);
|
||||
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
|
||||
select hex(a) from t1;
|
||||
--error 1062
|
||||
alter table t1 add unique (a);
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bit(2));
|
||||
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
|
||||
select a+0 from t1;
|
||||
alter table t1 add key (a);
|
||||
explain select a+0 from t1;
|
||||
select a+0 from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bit(7), b bit(9), key(a, b));
|
||||
insert into t1 values
|
||||
(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),
|
||||
(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),
|
||||
(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),
|
||||
(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),
|
||||
(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),
|
||||
(44, 307), (68, 454), (57, 135);
|
||||
explain select a+0 from t1;
|
||||
select a+0 from t1;
|
||||
explain select b+0 from t1;
|
||||
select b+0 from t1;
|
||||
explain select a+0, b+0 from t1;
|
||||
select a+0, b+0 from t1;
|
||||
explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
|
||||
select a+0, b+0 from t1 where a > 40 and b > 200 order by 1;
|
||||
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
set @@max_length_for_sort_data=0;
|
||||
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
|
||||
select hex(min(a)) from t1;
|
||||
select hex(min(b)) from t1;
|
||||
select hex(min(a)), hex(max(a)), hex(min(b)), hex(max(b)) from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int not null, b bit, c bit(9), key(a, b, c));
|
||||
insert into t1 values
|
||||
(4, NULL, 1), (4, 0, 3), (2, 1, 4), (1, 1, 100), (4, 0, 23), (4, 0, 54),
|
||||
(56, 0, 22), (4, 1, 100), (23, 0, 1), (4, 0, 34);
|
||||
select a+0, b+0, c+0 from t1;
|
||||
select hex(min(b)) from t1 where a = 4;
|
||||
select hex(min(c)) from t1 where a = 4 and b = 0;
|
||||
select hex(max(b)) from t1;
|
||||
select a+0, b+0, c+0 from t1 where a = 4 and b = 0 limit 2;
|
||||
select a+0, b+0, c+0 from t1 order by b desc;
|
||||
select a+0, b+0, c+0 from t1 order by c;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a bit(2), b bit(2));
|
||||
insert into t1 (a) values (0x01), (0x03), (0x02);
|
||||
update t1 set b= concat(a);
|
||||
select a+0, b+0 from t1;
|
||||
drop table t1;
|
||||
|
||||
# Some magic numbers
|
||||
|
||||
create table t1 (a bit(7), key(a));
|
||||
insert into t1 values (44), (57);
|
||||
select a+0 from t1;
|
||||
drop table t1;
|
|
@ -53,7 +53,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
|
|||
my_net.c my_semaphore.c my_port.c my_sleep.c \
|
||||
charset.c charset-def.c my_bitmap.c my_bit.c md5.c \
|
||||
my_gethostbyname.c rijndael.c my_aes.c sha1.c \
|
||||
my_handler.c my_netware.c
|
||||
my_handler.c my_netware.c my_largepage.c
|
||||
EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \
|
||||
thr_mutex.c thr_rwlock.c
|
||||
libmysys_a_LIBADD = @THREAD_LOBJECTS@
|
||||
|
|
|
@ -341,8 +341,8 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
|||
blocks--;
|
||||
/* Allocate memory for cache page buffers */
|
||||
if ((keycache->block_mem=
|
||||
my_malloc_lock((ulong) blocks * keycache->key_cache_block_size,
|
||||
MYF(0))))
|
||||
my_large_malloc((ulong) blocks * keycache->key_cache_block_size,
|
||||
MYF(MY_WME))))
|
||||
{
|
||||
/*
|
||||
Allocate memory for blocks, hash_links and hash entries;
|
||||
|
@ -351,7 +351,7 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
|||
if ((keycache->block_root= (BLOCK_LINK*) my_malloc((uint) length,
|
||||
MYF(0))))
|
||||
break;
|
||||
my_free_lock(keycache->block_mem, MYF(0));
|
||||
my_large_free(keycache->block_mem, MYF(0));
|
||||
}
|
||||
if (blocks < 8)
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ err:
|
|||
keycache->blocks= 0;
|
||||
if (keycache->block_mem)
|
||||
{
|
||||
my_free_lock((gptr) keycache->block_mem, MYF(0));
|
||||
my_large_free((gptr) keycache->block_mem, MYF(0));
|
||||
keycache->block_mem= NULL;
|
||||
}
|
||||
if (keycache->block_root)
|
||||
|
@ -605,7 +605,7 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
|
|||
{
|
||||
if (keycache->block_mem)
|
||||
{
|
||||
my_free_lock((gptr) keycache->block_mem, MYF(0));
|
||||
my_large_free((gptr) keycache->block_mem, MYF(0));
|
||||
keycache->block_mem= NULL;
|
||||
my_free((gptr) keycache->block_root, MYF(0));
|
||||
keycache->block_root= NULL;
|
||||
|
|
|
@ -178,6 +178,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
|||
}
|
||||
break;
|
||||
case HA_KEYTYPE_BINARY:
|
||||
case HA_KEYTYPE_BIT:
|
||||
if (keyseg->flag & HA_SPACE_PACK)
|
||||
{
|
||||
int a_length,b_length,pack_length;
|
||||
|
|
167
mysys/my_largepage.c
Normal file
167
mysys/my_largepage.c
Normal file
|
@ -0,0 +1,167 @@
|
|||
/* Copyright (C) 2004 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 "mysys_priv.h"
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
|
||||
#ifdef HAVE_SYS_IPC_H
|
||||
#include <sys/ipc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SHM_H
|
||||
#include <sys/shm.h>
|
||||
#endif
|
||||
|
||||
static uint my_get_large_page_size_int(void);
|
||||
static gptr my_large_malloc_int(uint size, myf my_flags);
|
||||
static my_bool my_large_free_int(gptr ptr, myf my_flags);
|
||||
|
||||
/* Gets the size of large pages from the OS */
|
||||
|
||||
uint my_get_large_page_size(void)
|
||||
{
|
||||
uint size;
|
||||
DBUG_ENTER("my_get_large_page_size");
|
||||
|
||||
if (!(size = my_get_large_page_size_int()))
|
||||
fprintf(stderr, "Warning: Failed to determine large page size\n");
|
||||
|
||||
DBUG_RETURN(size);
|
||||
}
|
||||
|
||||
/*
|
||||
General large pages allocator.
|
||||
Tries to allocate memory from large pages pool and falls back to
|
||||
my_malloc_lock() in case of failure
|
||||
*/
|
||||
|
||||
gptr my_large_malloc(uint size, myf my_flags)
|
||||
{
|
||||
gptr ptr;
|
||||
DBUG_ENTER("my_large_malloc");
|
||||
|
||||
if (my_use_large_pages && my_large_page_size)
|
||||
{
|
||||
if ((ptr = my_large_malloc_int(size, my_flags)) != NULL)
|
||||
DBUG_RETURN(ptr);
|
||||
if (my_flags & MY_WME)
|
||||
fprintf(stderr, "Warning: Using conventional memory pool\n");
|
||||
}
|
||||
|
||||
DBUG_RETURN(my_malloc_lock(size, my_flags));
|
||||
}
|
||||
|
||||
/*
|
||||
General large pages deallocator.
|
||||
Tries to deallocate memory as if it was from large pages pool and falls back
|
||||
to my_free_lock() in case of failure
|
||||
*/
|
||||
|
||||
void my_large_free(gptr ptr, myf my_flags __attribute__((unused)))
|
||||
{
|
||||
DBUG_ENTER("my_large_free");
|
||||
|
||||
/*
|
||||
my_large_free_int() can only fail if ptr was not allocated with
|
||||
my_large_malloc_int(), i.e. my_malloc_lock() was used so we should free it
|
||||
with my_free_lock()
|
||||
*/
|
||||
if (!my_use_large_pages || !my_large_page_size ||
|
||||
!my_large_free_int(ptr, my_flags))
|
||||
my_free_lock(ptr, my_flags);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
#ifdef HUGETLB_USE_PROC_MEMINFO
|
||||
/* Linux-specific function to determine the size of large pages */
|
||||
|
||||
uint my_get_large_page_size_int(void)
|
||||
{
|
||||
FILE *f;
|
||||
uint size = 0;
|
||||
char buf[256];
|
||||
DBUG_ENTER("my_get_large_page_size_int");
|
||||
|
||||
if (!(f = my_fopen("/proc/meminfo", O_RDONLY, MYF(MY_WME))))
|
||||
goto finish;
|
||||
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
if (sscanf(buf, "Hugepagesize: %u kB", &size))
|
||||
break;
|
||||
|
||||
my_fclose(f, MYF(MY_WME));
|
||||
|
||||
finish:
|
||||
DBUG_RETURN(size * 1024);
|
||||
}
|
||||
#endif /* HUGETLB_USE_PROC_MEMINFO */
|
||||
|
||||
#if HAVE_DECL_SHM_HUGETLB
|
||||
/* Linux-specific large pages allocator */
|
||||
|
||||
gptr my_large_malloc_int(uint size, myf my_flags)
|
||||
{
|
||||
int shmid;
|
||||
gptr ptr;
|
||||
struct shmid_ds buf;
|
||||
DBUG_ENTER("my_large_malloc_int");
|
||||
|
||||
/* Align block size to my_large_page_size */
|
||||
size = ((size - 1) & ~(my_large_page_size - 1)) + my_large_page_size;
|
||||
|
||||
shmid = shmget(IPC_PRIVATE, (size_t)size, SHM_HUGETLB | SHM_R | SHM_W);
|
||||
if (shmid < 0)
|
||||
{
|
||||
if (my_flags & MY_WME)
|
||||
fprintf(stderr,
|
||||
"Warning: Failed to allocate %d bytes from HugeTLB memory."
|
||||
" errno %d\n", size, errno);
|
||||
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
|
||||
ptr = shmat(shmid, NULL, 0);
|
||||
if (ptr == (void *)-1)
|
||||
{
|
||||
if (my_flags& MY_WME)
|
||||
fprintf(stderr, "Warning: Failed to attach shared memory segment,"
|
||||
" errno %d\n", errno);
|
||||
shmctl(shmid, IPC_RMID, &buf);
|
||||
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the shared memory segment so that it will be automatically freed
|
||||
after memory is detached or process exits
|
||||
*/
|
||||
shmctl(shmid, IPC_RMID, &buf);
|
||||
|
||||
DBUG_RETURN(ptr);
|
||||
}
|
||||
|
||||
/* Linux-specific large pages deallocator */
|
||||
|
||||
my_bool my_large_free_int(byte *ptr, myf my_flags __attribute__((unused)))
|
||||
{
|
||||
DBUG_ENTER("my_large_free_int");
|
||||
DBUG_RETURN(shmdt(ptr) == 0);
|
||||
}
|
||||
#endif /* HAVE_DECL_SHM_HUGETLB */
|
||||
|
||||
#endif /* HAVE_LARGE_PAGES */
|
|
@ -61,6 +61,12 @@ const char *soundex_map= "01230120022455012623010202";
|
|||
USED_MEM* my_once_root_block=0; /* pointer to first block */
|
||||
uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */
|
||||
|
||||
/* from my_largepage.c */
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
my_bool my_use_large_pages= 0;
|
||||
uint my_large_page_size= 0;
|
||||
#endif
|
||||
|
||||
/* from my_tempnam */
|
||||
#if !defined(HAVE_TEMPNAM) || defined(HPUX11)
|
||||
int _my_tempnam_used=0;
|
||||
|
|
|
@ -38,6 +38,18 @@
|
|||
|
||||
Command *parse_command(Command_factory * factory, const char *text);
|
||||
|
||||
Mysql_connection_thread_args::Mysql_connection_thread_args(
|
||||
struct st_vio *vio_arg,
|
||||
Thread_registry &thread_registry_arg,
|
||||
const User_map &user_map_arg,
|
||||
ulong connection_id_arg,
|
||||
Instance_map &instance_map_arg) :
|
||||
vio(vio_arg)
|
||||
,thread_registry(thread_registry_arg)
|
||||
,user_map(user_map_arg)
|
||||
,connection_id(connection_id_arg)
|
||||
,instance_map(instance_map_arg)
|
||||
{}
|
||||
|
||||
/*
|
||||
MySQL connection - handle one connection with mysql command line client
|
||||
|
|
|
@ -48,13 +48,7 @@ struct Mysql_connection_thread_args
|
|||
Thread_registry &thread_registry_arg,
|
||||
const User_map &user_map_arg,
|
||||
ulong connection_id_arg,
|
||||
Instance_map &instance_map_arg) :
|
||||
vio(vio_arg)
|
||||
,thread_registry(thread_registry_arg)
|
||||
,user_map(user_map_arg)
|
||||
,connection_id(connection_id_arg)
|
||||
,instance_map(instance_map_arg)
|
||||
{}
|
||||
Instance_map &instance_map_arg);
|
||||
};
|
||||
|
||||
#endif // INCLUDES_MYSQL_INSTANCE_MANAGER_MYSQL_CONNECTION_H
|
||||
|
|
|
@ -98,9 +98,6 @@ my_bool net_flush(NET *net);
|
|||
# include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE -1
|
||||
#endif
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#define perror(A)
|
||||
#else
|
||||
|
@ -874,6 +871,7 @@ static const char *default_options[]=
|
|||
"replication-probe", "enable-reads-from-master", "repl-parse-query",
|
||||
"ssl-cipher", "max-allowed-packet", "protocol", "shared-memory-base-name",
|
||||
"multi-results", "multi-queries", "secure-auth",
|
||||
"report-data-truncation",
|
||||
NullS
|
||||
};
|
||||
|
||||
|
@ -1084,6 +1082,9 @@ void mysql_read_default_options(struct st_mysql_options *options,
|
|||
case 32: /* secure-auth */
|
||||
options->secure_auth= TRUE;
|
||||
break;
|
||||
case 33: /* report-data-truncation */
|
||||
options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1;
|
||||
break;
|
||||
default:
|
||||
DBUG_PRINT("warning",("unknown option: %s",option[0]));
|
||||
}
|
||||
|
@ -1427,6 +1428,7 @@ mysql_init(MYSQL *mysql)
|
|||
#endif
|
||||
|
||||
mysql->options.methods_to_use= MYSQL_OPT_GUESS_CONNECTION;
|
||||
mysql->options.report_data_truncation= TRUE; /* default */
|
||||
return mysql;
|
||||
}
|
||||
|
||||
|
@ -2666,6 +2668,9 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
|
|||
case MYSQL_SECURE_AUTH:
|
||||
mysql->options.secure_auth= *(my_bool *) arg;
|
||||
break;
|
||||
case MYSQL_REPORT_DATA_TRUNCATION:
|
||||
mysql->options.report_data_truncation= test(*(my_bool *) arg);
|
||||
break;
|
||||
default:
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,8 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
|||
sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
|
||||
parse_file.h sql_view.h sql_trigger.h \
|
||||
examples/ha_example.h examples/ha_archive.h \
|
||||
examples/ha_tina.h
|
||||
examples/ha_tina.h \
|
||||
ha_federated.h
|
||||
|
||||
mysqld_SOURCES = sql_lex.cc sql_handler.cc \
|
||||
item.cc item_sum.cc item_buff.cc item_func.cc \
|
||||
|
@ -98,7 +99,9 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc \
|
|||
sp_head.cc sp_pcontext.cc sp_rcontext.cc sp.cc \
|
||||
sp_cache.cc parse_file.cc sql_trigger.cc \
|
||||
examples/ha_example.cc examples/ha_archive.cc \
|
||||
examples/ha_tina.cc
|
||||
examples/ha_tina.cc \
|
||||
ha_federated.cc
|
||||
|
||||
gen_lex_hash_SOURCES = gen_lex_hash.cc
|
||||
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
|
||||
mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql.cc
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#ifdef HAVE_ARCHIVE_DB
|
||||
#include "ha_archive.h"
|
||||
#include <my_dir.h>
|
||||
|
||||
/*
|
||||
First, if you want to understand storage engines you should look at
|
||||
|
@ -227,8 +228,7 @@ int ha_archive::read_meta_file(File meta_file, ulonglong *rows)
|
|||
/*
|
||||
This method writes out the header of a meta file and returns whether or not it was successful.
|
||||
By setting dirty you say whether or not the file represents the actual state of the data file.
|
||||
Upon ::open() we set to dirty, and upon ::close() we set to clean. If we determine during
|
||||
a read that the file was dirty we will force a rebuild of this file.
|
||||
Upon ::open() we set to dirty, and upon ::close() we set to clean.
|
||||
*/
|
||||
int ha_archive::write_meta_file(File meta_file, ulonglong rows, bool dirty)
|
||||
{
|
||||
|
@ -305,6 +305,7 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
|
|||
share->use_count= 0;
|
||||
share->table_name_length= length;
|
||||
share->table_name= tmp_name;
|
||||
share->crashed= FALSE;
|
||||
fn_format(share->data_file_name,table_name,"",ARZ,MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
fn_format(meta_file_name,table_name,"",ARM,MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
strmov(share->table_name,table_name);
|
||||
|
@ -315,24 +316,15 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
|
|||
if ((share->meta_file= my_open(meta_file_name, O_RDWR, MYF(0))) == -1)
|
||||
goto error;
|
||||
|
||||
if (read_meta_file(share->meta_file, &share->rows_recorded))
|
||||
{
|
||||
/*
|
||||
The problem here is that for some reason, probably a crash, the meta
|
||||
file has been corrupted. So what do we do? Well we try to rebuild it
|
||||
ourself. Once that happens, we reread it, but if that fails we just
|
||||
call it quits and return an error.
|
||||
*/
|
||||
if (rebuild_meta_file(share->table_name, share->meta_file))
|
||||
goto error;
|
||||
if (read_meta_file(share->meta_file, &share->rows_recorded))
|
||||
goto error;
|
||||
}
|
||||
/*
|
||||
After we read, we set the file to dirty. When we close, we will do the
|
||||
opposite.
|
||||
opposite. If the meta file will not open we assume it is crashed and
|
||||
leave it up to the user to fix.
|
||||
*/
|
||||
(void)write_meta_file(share->meta_file, share->rows_recorded, TRUE);
|
||||
if (read_meta_file(share->meta_file, &share->rows_recorded))
|
||||
share->crashed= TRUE;
|
||||
else
|
||||
(void)write_meta_file(share->meta_file, share->rows_recorded, TRUE);
|
||||
/*
|
||||
It is expensive to open and close the data files and since you can't have
|
||||
a gzip file that can be both read and written we keep a writer open
|
||||
|
@ -408,7 +400,7 @@ int ha_archive::open(const char *name, int mode, uint test_if_locked)
|
|||
DBUG_ENTER("ha_archive::open");
|
||||
|
||||
if (!(share= get_share(name, table)))
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(-1);
|
||||
thr_lock_data_init(&share->lock,&lock,NULL);
|
||||
|
||||
if ((archive= gzopen(share->data_file_name, "rb")) == NULL)
|
||||
|
@ -530,6 +522,9 @@ int ha_archive::write_row(byte * buf)
|
|||
z_off_t written;
|
||||
DBUG_ENTER("ha_archive::write_row");
|
||||
|
||||
if (share->crashed)
|
||||
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
||||
|
||||
statistic_increment(table->in_use->status_var.ha_write_count, &LOCK_status);
|
||||
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
|
||||
table->timestamp_field->set_time();
|
||||
|
@ -578,6 +573,9 @@ int ha_archive::rnd_init(bool scan)
|
|||
{
|
||||
DBUG_ENTER("ha_archive::rnd_init");
|
||||
int read; // gzread() returns int, and we use this to check the header
|
||||
|
||||
if (share->crashed)
|
||||
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
||||
|
||||
/* We rewind the file so that we can read from the beginning if scan */
|
||||
if (scan)
|
||||
|
@ -672,6 +670,9 @@ int ha_archive::rnd_next(byte *buf)
|
|||
int rc;
|
||||
DBUG_ENTER("ha_archive::rnd_next");
|
||||
|
||||
if (share->crashed)
|
||||
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
||||
|
||||
if (!scan_rows)
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
scan_rows--;
|
||||
|
@ -722,22 +723,23 @@ int ha_archive::rnd_pos(byte * buf, byte *pos)
|
|||
}
|
||||
|
||||
/*
|
||||
This method rebuilds the meta file. It does this by walking the datafile and
|
||||
This method repairs the meta file. It does this by walking the datafile and
|
||||
rewriting the meta file.
|
||||
*/
|
||||
int ha_archive::rebuild_meta_file(char *table_name, File meta_file)
|
||||
int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{
|
||||
int rc;
|
||||
byte *buf;
|
||||
ulonglong rows_recorded= 0;
|
||||
gzFile rebuild_file; /* Archive file we are working with */
|
||||
gzFile rebuild_file; // Archive file we are working with
|
||||
File meta_file; // Meta file we use
|
||||
char data_file_name[FN_REFLEN];
|
||||
DBUG_ENTER("ha_archive::rebuild_meta_file");
|
||||
DBUG_ENTER("ha_archive::repair");
|
||||
|
||||
/*
|
||||
Open up the meta file to recreate it.
|
||||
*/
|
||||
fn_format(data_file_name, table_name, "", ARZ,
|
||||
fn_format(data_file_name, share->table_name, "", ARZ,
|
||||
MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
if ((rebuild_file= gzopen(data_file_name, "rb")) == NULL)
|
||||
DBUG_RETURN(errno ? errno : -1);
|
||||
|
@ -767,11 +769,18 @@ int ha_archive::rebuild_meta_file(char *table_name, File meta_file)
|
|||
*/
|
||||
if (rc == HA_ERR_END_OF_FILE)
|
||||
{
|
||||
(void)write_meta_file(meta_file, rows_recorded, FALSE);
|
||||
fn_format(data_file_name,share->table_name,"",ARM,MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
if ((meta_file= my_open(data_file_name, O_RDWR, MYF(0))) == -1)
|
||||
{
|
||||
rc= HA_ERR_CRASHED_ON_USAGE;
|
||||
goto error;
|
||||
}
|
||||
(void)write_meta_file(meta_file, rows_recorded, TRUE);
|
||||
rc= 0;
|
||||
}
|
||||
|
||||
my_free((gptr) buf, MYF(0));
|
||||
share->crashed= FALSE;
|
||||
error:
|
||||
gzclose(rebuild_file);
|
||||
|
||||
|
@ -790,13 +799,14 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
char block[IO_SIZE];
|
||||
char writer_filename[FN_REFLEN];
|
||||
|
||||
/* Closing will cause all data waiting to be flushed */
|
||||
gzclose(share->archive_write);
|
||||
share->archive_write= NULL;
|
||||
|
||||
/* Lets create a file to contain the new data */
|
||||
fn_format(writer_filename, share->table_name, "", ARN,
|
||||
MY_REPLACE_EXT|MY_UNPACK_FILENAME);
|
||||
|
||||
/* Closing will cause all data waiting to be flushed, to be flushed */
|
||||
gzclose(share->archive_write);
|
||||
|
||||
if ((reader= gzopen(share->data_file_name, "rb")) == NULL)
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
|
@ -814,16 +824,6 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
|
||||
my_rename(writer_filename,share->data_file_name,MYF(0));
|
||||
|
||||
/*
|
||||
We reopen the file in case some IO is waiting to go through.
|
||||
In theory the table is closed right after this operation,
|
||||
but it is possible for IO to still happen.
|
||||
I may be being a bit too paranoid right here.
|
||||
*/
|
||||
if ((share->archive_write= gzopen(share->data_file_name, "ab")) == NULL)
|
||||
DBUG_RETURN(errno ? errno : -1);
|
||||
share->dirty= FALSE;
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -880,13 +880,27 @@ THR_LOCK_DATA **ha_archive::store_lock(THD *thd,
|
|||
void ha_archive::info(uint flag)
|
||||
{
|
||||
DBUG_ENTER("ha_archive::info");
|
||||
|
||||
/*
|
||||
This should be an accurate number now, though bulk and delayed inserts can
|
||||
cause the number to be inaccurate.
|
||||
*/
|
||||
records= share->rows_recorded;
|
||||
deleted= 0;
|
||||
/* Costs quite a bit more to get all information */
|
||||
if (flag & HA_STATUS_TIME)
|
||||
{
|
||||
MY_STAT file_stat; // Stat information for the data file
|
||||
|
||||
VOID(my_stat(share->data_file_name, &file_stat, MYF(MY_WME)));
|
||||
|
||||
mean_rec_length= table->reclength + buffer.alloced_length();
|
||||
data_file_length= file_stat.st_size;
|
||||
create_time= file_stat.st_ctime;
|
||||
update_time= file_stat.st_mtime;
|
||||
max_data_file_length= share->rows_recorded * mean_rec_length;
|
||||
}
|
||||
delete_length= 0;
|
||||
index_file_length=0;
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -900,7 +914,7 @@ void ha_archive::info(uint flag)
|
|||
*/
|
||||
void ha_archive::start_bulk_insert(ha_rows rows)
|
||||
{
|
||||
DBUG_ENTER("ha_archive::info");
|
||||
DBUG_ENTER("ha_archive::start_bulk_insert");
|
||||
bulk_insert= TRUE;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -912,6 +926,7 @@ void ha_archive::start_bulk_insert(ha_rows rows)
|
|||
*/
|
||||
int ha_archive::end_bulk_insert()
|
||||
{
|
||||
DBUG_ENTER("ha_archive::end_bulk_insert");
|
||||
bulk_insert= FALSE;
|
||||
share->dirty= TRUE;
|
||||
DBUG_RETURN(0);
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef struct st_archive_share {
|
|||
File meta_file; /* Meta file we use */
|
||||
gzFile archive_write; /* Archive file we are working with */
|
||||
bool dirty; /* Flag for if a flush should occur */
|
||||
bool crashed; /* Meta file is crashed */
|
||||
ulonglong rows_recorded; /* Number of rows in tables */
|
||||
} ARCHIVE_SHARE;
|
||||
|
||||
|
@ -91,13 +92,14 @@ public:
|
|||
int write_meta_file(File meta_file, ulonglong rows, bool dirty);
|
||||
ARCHIVE_SHARE *get_share(const char *table_name, TABLE *table);
|
||||
int free_share(ARCHIVE_SHARE *share);
|
||||
int rebuild_meta_file(char *table_name, File meta_file);
|
||||
bool auto_repair() const { return 1; } // For the moment we just do this
|
||||
int read_data_header(gzFile file_to_read);
|
||||
int write_data_header(gzFile file_to_write);
|
||||
void position(const byte *record);
|
||||
void info(uint);
|
||||
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
|
||||
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
void start_bulk_insert(ha_rows rows);
|
||||
int end_bulk_insert();
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
|
|
247
sql/field.cc
247
sql/field.cc
|
@ -6048,6 +6048,227 @@ bool Field_num::eq_def(Field *field)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Bit field.
|
||||
|
||||
We store the first 0 - 6 uneven bits among the null bits
|
||||
at the start of the record. The rest bytes are stored in
|
||||
the record itself.
|
||||
|
||||
For example:
|
||||
|
||||
CREATE TABLE t1 (a int, b bit(17), c bit(21) not null, d bit(8));
|
||||
We would store data as follows in the record:
|
||||
|
||||
Byte Bit
|
||||
1 7 - reserve for delete
|
||||
6 - null bit for 'a'
|
||||
5 - null bit for 'b'
|
||||
4 - first (high) bit of 'b'
|
||||
3 - first (high) bit of 'c'
|
||||
2 - second bit of 'c'
|
||||
1 - third bit of 'c'
|
||||
0 - forth bit of 'c'
|
||||
2 7 - firth bit of 'c'
|
||||
6 - null bit for 'd'
|
||||
3 - 6 four bytes for 'a'
|
||||
7 - 8 two bytes for 'b'
|
||||
9 - 10 two bytes for 'c'
|
||||
11 one byte for 'd'
|
||||
*/
|
||||
|
||||
void Field_bit::make_field(Send_field *field)
|
||||
{
|
||||
/* table_cache_key is not set for temp tables */
|
||||
field->db_name= (orig_table->table_cache_key ? orig_table->table_cache_key :
|
||||
"");
|
||||
field->org_table_name= orig_table->real_name;
|
||||
field->table_name= orig_table->table_name;
|
||||
field->col_name= field->org_col_name= field_name;
|
||||
field->charsetnr= charset()->number;
|
||||
field->length= field_length;
|
||||
field->type= type();
|
||||
field->flags= table->maybe_null ? (flags & ~NOT_NULL_FLAG) : flags;
|
||||
field->decimals= 0;
|
||||
}
|
||||
|
||||
|
||||
int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
|
||||
{
|
||||
int delta;
|
||||
|
||||
for (; !*from && length; from++, length--); // skip left 0's
|
||||
delta= field_length - length;
|
||||
|
||||
if (delta < -1 ||
|
||||
(delta == -1 && (uchar) *from > ((1 << bit_len) - 1)) ||
|
||||
(!bit_len && delta < 0))
|
||||
{
|
||||
set_rec_bits(0xff, bit_ptr, bit_ofs, bit_len);
|
||||
memset(ptr, 0xff, field_length);
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
|
||||
return 1;
|
||||
}
|
||||
/* delta is >= -1 here */
|
||||
if (delta > 0)
|
||||
{
|
||||
if (bit_len)
|
||||
clr_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
bzero(ptr, delta);
|
||||
memcpy(ptr + delta, from, length);
|
||||
}
|
||||
else if (delta == 0)
|
||||
{
|
||||
if (bit_len)
|
||||
clr_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
memcpy(ptr, from, length);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bit_len)
|
||||
{
|
||||
set_rec_bits((uchar) *from, bit_ptr, bit_ofs, bit_len);
|
||||
from++;
|
||||
}
|
||||
memcpy(ptr, from, field_length);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int Field_bit::store(double nr)
|
||||
{
|
||||
return (Field_bit::store((longlong) nr));
|
||||
}
|
||||
|
||||
|
||||
int Field_bit::store(longlong nr)
|
||||
{
|
||||
char buf[8];
|
||||
|
||||
mi_int8store(buf, nr);
|
||||
return store(buf, 8, NULL);
|
||||
}
|
||||
|
||||
|
||||
double Field_bit::val_real(void)
|
||||
{
|
||||
return (double) Field_bit::val_int();
|
||||
}
|
||||
|
||||
|
||||
longlong Field_bit::val_int(void)
|
||||
{
|
||||
ulonglong bits= 0;
|
||||
if (bit_len)
|
||||
bits= get_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
bits<<= (field_length * 8);
|
||||
|
||||
switch (field_length) {
|
||||
case 0: return bits;
|
||||
case 1: return bits | (ulonglong) (uchar) ptr[0];
|
||||
case 2: return bits | mi_uint2korr(ptr);
|
||||
case 3: return bits | mi_uint3korr(ptr);
|
||||
case 4: return bits | mi_uint4korr(ptr);
|
||||
case 5: return bits | mi_uint5korr(ptr);
|
||||
case 6: return bits | mi_uint6korr(ptr);
|
||||
case 7: return bits | mi_uint7korr(ptr);
|
||||
default: return mi_uint8korr(ptr + field_length - sizeof(longlong));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String *Field_bit::val_str(String *val_buffer,
|
||||
String *val_ptr __attribute__((unused)))
|
||||
{
|
||||
uint length= min(pack_length(), sizeof(longlong));
|
||||
ulonglong bits= val_int();
|
||||
|
||||
val_buffer->alloc(length);
|
||||
memcpy_fixed((char*) val_buffer->ptr(), (char*) &bits, length);
|
||||
val_buffer->length(length);
|
||||
val_buffer->set_charset(&my_charset_bin);
|
||||
return val_buffer;
|
||||
}
|
||||
|
||||
|
||||
int Field_bit::key_cmp(const byte *str, uint length)
|
||||
{
|
||||
if (bit_len)
|
||||
{
|
||||
int flag;
|
||||
uchar bits= get_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
if ((flag= (int) (bits - *str)))
|
||||
return flag;
|
||||
str++;
|
||||
length--;
|
||||
}
|
||||
return bcmp(ptr, str, length);
|
||||
}
|
||||
|
||||
|
||||
int Field_bit::cmp_offset(uint row_offset)
|
||||
{
|
||||
if (bit_len)
|
||||
{
|
||||
int flag;
|
||||
uchar bits_a= get_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
uchar bits_b= get_rec_bits(bit_ptr + row_offset, bit_ofs, bit_len);
|
||||
if ((flag= (int) (bits_a - bits_b)))
|
||||
return flag;
|
||||
}
|
||||
return bcmp(ptr, ptr + row_offset, field_length);
|
||||
}
|
||||
|
||||
|
||||
void Field_bit::get_key_image(char *buff, uint length, imagetype type)
|
||||
{
|
||||
if (bit_len)
|
||||
{
|
||||
uchar bits= get_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
*buff++= bits;
|
||||
length--;
|
||||
}
|
||||
memcpy(buff, ptr, min(length, field_length));
|
||||
}
|
||||
|
||||
|
||||
void Field_bit::sql_type(String &res) const
|
||||
{
|
||||
CHARSET_INFO *cs= res.charset();
|
||||
ulong length= cs->cset->snprintf(cs, (char*) res.ptr(), res.alloced_length(),
|
||||
"bit(%d)",
|
||||
(int) field_length * 8 + bit_len);
|
||||
res.length((uint) length);
|
||||
}
|
||||
|
||||
|
||||
char *Field_bit::pack(char *to, const char *from, uint max_length)
|
||||
{
|
||||
uint length= min(field_length + (bit_len > 0), max_length);
|
||||
if (bit_len)
|
||||
{
|
||||
uchar bits= get_rec_bits(bit_ptr, bit_ofs, bit_len);
|
||||
*to++= bits;
|
||||
length--;
|
||||
}
|
||||
memcpy(to, from, length);
|
||||
return to + length;
|
||||
}
|
||||
|
||||
|
||||
const char *Field_bit::unpack(char *to, const char *from)
|
||||
{
|
||||
if (bit_len)
|
||||
{
|
||||
set_rec_bits(*from, bit_ptr, bit_ofs, bit_len);
|
||||
from++;
|
||||
}
|
||||
memcpy(to, from, field_length);
|
||||
return from + field_length;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
Handling of field and create_field
|
||||
*****************************************************************************/
|
||||
|
@ -6124,6 +6345,7 @@ uint32 calc_pack_length(enum_field_types type,uint32 length)
|
|||
case FIELD_TYPE_GEOMETRY: return 4+portable_sizeof_char_ptr;
|
||||
case FIELD_TYPE_SET:
|
||||
case FIELD_TYPE_ENUM: abort(); return 0; // This shouldn't happen
|
||||
case FIELD_TYPE_BIT: return length / 8;
|
||||
default: return 0;
|
||||
}
|
||||
return 0; // Keep compiler happy
|
||||
|
@ -6154,11 +6376,30 @@ Field *make_field(char *ptr, uint32 field_length,
|
|||
const char *field_name,
|
||||
struct st_table *table)
|
||||
{
|
||||
uchar *bit_ptr;
|
||||
uchar bit_offset;
|
||||
LINT_INIT(bit_ptr);
|
||||
LINT_INIT(bit_offset);
|
||||
if (field_type == FIELD_TYPE_BIT)
|
||||
{
|
||||
bit_ptr= null_pos;
|
||||
bit_offset= null_bit;
|
||||
if (f_maybe_null(pack_flag)) // if null field
|
||||
{
|
||||
bit_ptr+= (null_bit == 7); // shift bit_ptr and bit_offset
|
||||
bit_offset= (bit_offset + 1) & 7;
|
||||
}
|
||||
}
|
||||
|
||||
if (!f_maybe_null(pack_flag))
|
||||
{
|
||||
null_pos=0;
|
||||
null_bit=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
null_bit= ((uchar) 1) << null_bit;
|
||||
}
|
||||
|
||||
switch (field_type)
|
||||
{
|
||||
|
@ -6280,6 +6521,9 @@ Field *make_field(char *ptr, uint32 field_length,
|
|||
unireg_check, field_name, table, field_charset);
|
||||
case FIELD_TYPE_NULL:
|
||||
return new Field_null(ptr,field_length,unireg_check,field_name,table, field_charset);
|
||||
case FIELD_TYPE_BIT:
|
||||
return new Field_bit(ptr, field_length, null_pos, null_bit, bit_ptr,
|
||||
bit_offset, unireg_check, field_name, table);
|
||||
default: // Impossible (Wrong version)
|
||||
break;
|
||||
}
|
||||
|
@ -6338,6 +6582,9 @@ create_field::create_field(Field *old_field,Field *orig_field)
|
|||
geom_type= ((Field_geom*)old_field)->geom_type;
|
||||
break;
|
||||
#endif
|
||||
case FIELD_TYPE_BIT:
|
||||
length= ((Field_bit *) old_field)->bit_len + length * 8;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
58
sql/field.h
58
sql/field.h
|
@ -80,7 +80,7 @@ public:
|
|||
FIELD_CAST_TIMESTAMP, FIELD_CAST_YEAR, FIELD_CAST_DATE, FIELD_CAST_NEWDATE,
|
||||
FIELD_CAST_TIME, FIELD_CAST_DATETIME,
|
||||
FIELD_CAST_STRING, FIELD_CAST_VARSTRING, FIELD_CAST_BLOB,
|
||||
FIELD_CAST_GEOM, FIELD_CAST_ENUM, FIELD_CAST_SET
|
||||
FIELD_CAST_GEOM, FIELD_CAST_ENUM, FIELD_CAST_SET, FIELD_CAST_BIT
|
||||
};
|
||||
|
||||
utype unireg_check;
|
||||
|
@ -211,6 +211,15 @@ public:
|
|||
ptr-=row_offset;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline String *val_str(String *str, char *new_ptr)
|
||||
{
|
||||
char *old_ptr= ptr;
|
||||
ptr= new_ptr;
|
||||
val_str(str);
|
||||
ptr= old_ptr;
|
||||
return str;
|
||||
}
|
||||
virtual bool send_binary(Protocol *protocol);
|
||||
virtual char *pack(char* to, const char *from, uint max_length=~(uint) 0)
|
||||
{
|
||||
|
@ -1173,6 +1182,53 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class Field_bit :public Field {
|
||||
public:
|
||||
uchar *bit_ptr; // position in record where 'uneven' bits store
|
||||
uchar bit_ofs; // offset to 'uneven' high bits
|
||||
uint bit_len; // number of 'uneven' high bits
|
||||
Field_bit(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
||||
uchar null_bit_arg, uchar *bit_ptr_arg, uchar bit_ofs_arg,
|
||||
enum utype unireg_check_arg, const char *field_name_arg,
|
||||
struct st_table *table_arg)
|
||||
: Field(ptr_arg, len_arg >> 3, null_ptr_arg, null_bit_arg,
|
||||
unireg_check_arg, field_name_arg, table_arg),
|
||||
bit_ptr(bit_ptr_arg), bit_ofs(bit_ofs_arg), bit_len(len_arg & 7)
|
||||
{ }
|
||||
enum_field_types type() const { return FIELD_TYPE_BIT; }
|
||||
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BIT; }
|
||||
uint32 key_length() const { return (uint32) field_length + (bit_len > 0); }
|
||||
uint32 max_length() { return (uint32) field_length + (bit_len > 0); }
|
||||
uint size_of() const { return sizeof(*this); }
|
||||
Item_result result_type () const { return INT_RESULT; }
|
||||
void make_field(Send_field *);
|
||||
void reset(void) { bzero(ptr, field_length); }
|
||||
int store(const char *to, uint length, CHARSET_INFO *charset);
|
||||
int store(double nr);
|
||||
int store(longlong nr);
|
||||
double val_real(void);
|
||||
longlong val_int(void);
|
||||
String *val_str(String*, String *);
|
||||
int cmp(const char *a, const char *b)
|
||||
{ return cmp_binary(a, b); }
|
||||
int key_cmp(const byte *a, const byte *b)
|
||||
{ return cmp_binary(a, b); }
|
||||
int key_cmp(const byte *str, uint length);
|
||||
int cmp_offset(uint row_offset);
|
||||
void get_key_image(char *buff, uint length, imagetype type);
|
||||
void set_key_image(char *buff, uint length)
|
||||
{ Field_bit::store(buff, length, &my_charset_bin); }
|
||||
void sort_string(char *buff, uint length)
|
||||
{ get_key_image(buff, length, itRAW); }
|
||||
uint32 pack_length() const
|
||||
{ return (uint32) field_length + (bit_len > 0); }
|
||||
void sql_type(String &str) const;
|
||||
field_cast_enum field_cast_type() { return FIELD_CAST_BIT; }
|
||||
char *pack(char *to, const char *from, uint max_length=~(uint) 0);
|
||||
const char *unpack(char* to, const char *from);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Create field class for CREATE TABLE
|
||||
*/
|
||||
|
|
|
@ -485,6 +485,9 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (to->real_type() == FIELD_TYPE_BIT ||
|
||||
from->real_type() == FIELD_TYPE_BIT)
|
||||
return do_field_int;
|
||||
// Check if identical fields
|
||||
if (from->result_type() == STRING_RESULT)
|
||||
{
|
||||
|
|
1722
sql/ha_federated.cc
Executable file
1722
sql/ha_federated.cc
Executable file
File diff suppressed because it is too large
Load diff
177
sql/ha_federated.h
Executable file
177
sql/ha_federated.h
Executable file
|
@ -0,0 +1,177 @@
|
|||
/* Copyright (C) 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 */
|
||||
|
||||
/*
|
||||
Please read ha_exmple.cc before reading this file.
|
||||
Please keep in mind that the federated storage engine implements all methods
|
||||
that are required to be implemented. handler.h has a full list of methods
|
||||
that you can implement.
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
//#include <client.h>
|
||||
|
||||
/*
|
||||
FEDERATED_SHARE is a structure that will be shared amoung all open handlers
|
||||
The example implements the minimum of what you will probably need.
|
||||
*/
|
||||
//FIX document
|
||||
typedef struct st_federated_share {
|
||||
char *table_name;
|
||||
char *table_base_name;
|
||||
// the primary select query to be used in rnd_init
|
||||
char *select_query;
|
||||
// remote host info, parse_url supplies
|
||||
char *scheme;
|
||||
char *hostname;
|
||||
char *username;
|
||||
char *password;
|
||||
char *database;
|
||||
char *table;
|
||||
char *socket;
|
||||
char *sport;
|
||||
int port;
|
||||
uint table_name_length,table_base_name_length,use_count;
|
||||
pthread_mutex_t mutex;
|
||||
THR_LOCK lock;
|
||||
} FEDERATED_SHARE;
|
||||
|
||||
/*
|
||||
Class definition for the storage engine
|
||||
*/
|
||||
class ha_federated: public handler
|
||||
{
|
||||
THR_LOCK_DATA lock; /* MySQL lock */
|
||||
FEDERATED_SHARE *share; /* Shared lock info */
|
||||
MYSQL *mysql;
|
||||
MYSQL_RES *result;
|
||||
uint ref_length;
|
||||
uint fetch_num; // stores the fetch num
|
||||
MYSQL_ROW_OFFSET current_position; // Current position used by ::position()
|
||||
|
||||
private:
|
||||
/*
|
||||
return 0 on success
|
||||
return errorcode otherwise
|
||||
*/
|
||||
//FIX
|
||||
uint convert_row_to_internal_format(byte *buf, MYSQL_ROW row);
|
||||
uint type_quote(int type);
|
||||
void quote_data(String *string1, Field *field);
|
||||
|
||||
public:
|
||||
ha_federated(TABLE *table): handler(table),
|
||||
mysql(0),
|
||||
ref_length(sizeof(MYSQL_ROW_OFFSET)), current_position(0)
|
||||
{
|
||||
}
|
||||
~ha_federated()
|
||||
{
|
||||
}
|
||||
/* The name that will be used for display purposes */
|
||||
const char *table_type() const { return "FEDERATED"; }
|
||||
/*
|
||||
The name of the index type that will be used for display
|
||||
don't implement this method unless you really have indexes
|
||||
*/
|
||||
const char *index_type(uint inx) { return "REMOTE"; }
|
||||
const char **bas_ext() const;
|
||||
/*
|
||||
This is a list of flags that says what the storage engine
|
||||
implements. The current table flags are documented in
|
||||
handler.h
|
||||
Serg: Double check these (Brian)
|
||||
// FIX add blob support
|
||||
*/
|
||||
ulong table_flags() const
|
||||
{
|
||||
return (HA_TABLE_SCAN_ON_INDEX | HA_NOT_EXACT_COUNT |
|
||||
HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED | HA_AUTO_PART_KEY |
|
||||
HA_TABLE_SCAN_ON_INDEX);
|
||||
}
|
||||
/*
|
||||
This is a bitmap of flags that says how the storage engine
|
||||
implements indexes. The current index flags are documented in
|
||||
handler.h. If you do not implement indexes, just return zero
|
||||
here.
|
||||
|
||||
part is the key part to check. First key part is 0
|
||||
If all_parts it's set, MySQL want to know the flags for the combined
|
||||
index up to and including 'part'.
|
||||
*/
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const
|
||||
{
|
||||
return (HA_READ_NEXT);
|
||||
// return (HA_READ_NEXT | HA_ONLY_WHOLE_INDEX);
|
||||
}
|
||||
uint max_supported_record_length() const { return HA_MAX_REC_LENGTH; }
|
||||
uint max_supported_keys() const { return MAX_KEY; }
|
||||
uint max_supported_key_parts() const { return 1024; }
|
||||
uint max_supported_key_length() const { return 1024; }
|
||||
/*
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
virtual double scan_time() { DBUG_PRINT("ha_federated::scan_time", ("rows %d", records)); return (double)(records*2); }
|
||||
/*
|
||||
The next method will never be called if you do not implement indexes.
|
||||
*/
|
||||
virtual double read_time(ha_rows rows) { return (double) rows / 20.0+1; }
|
||||
|
||||
/*
|
||||
Everything below are methods that we implment in ha_federated.cc.
|
||||
|
||||
Most of these methods are not obligatory, skip them and
|
||||
MySQL will treat them as not implemented
|
||||
*/
|
||||
int open(const char *name, int mode, uint test_if_locked); // required
|
||||
int close(void); // required
|
||||
|
||||
int write_row(byte * buf);
|
||||
int update_row(const byte * old_data, byte * new_data);
|
||||
int delete_row(const byte * buf);
|
||||
int index_init(uint keynr);
|
||||
int index_read(byte * buf, const byte * key,
|
||||
uint key_len, enum ha_rkey_function find_flag);
|
||||
int index_read_idx(byte * buf, uint idx, const byte * key,
|
||||
uint key_len, enum ha_rkey_function find_flag);
|
||||
int index_next(byte * buf);
|
||||
int index_end();
|
||||
/*
|
||||
unlike index_init(), rnd_init() can be called two times
|
||||
without rnd_end() in between (it only makes sense if scan=1).
|
||||
then the second call should prepare for the new table scan
|
||||
(e.g if rnd_init allocates the cursor, second call should
|
||||
position it to the start of the table, no need to deallocate
|
||||
and allocate it again
|
||||
*/
|
||||
int rnd_init(bool scan); //required
|
||||
int rnd_end();
|
||||
int rnd_next(byte *buf); //required
|
||||
int rnd_pos(byte * buf, byte *pos); //required
|
||||
void position(const byte *record); //required
|
||||
void info(uint); //required
|
||||
|
||||
int delete_all_rows(void);
|
||||
int create(const char *name, TABLE *form,
|
||||
HA_CREATE_INFO *create_info); //required
|
||||
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
enum thr_lock_type lock_type); //required
|
||||
};
|
|
@ -88,6 +88,7 @@ extern "C" {
|
|||
|
||||
uint innobase_init_flags = 0;
|
||||
ulong innobase_cache_size = 0;
|
||||
ulong innobase_large_page_size = 0;
|
||||
|
||||
/* The default values for the following, type long, start-up parameters
|
||||
are declared in mysqld.cc: */
|
||||
|
@ -116,6 +117,9 @@ values */
|
|||
|
||||
uint innobase_flush_log_at_trx_commit = 1;
|
||||
my_bool innobase_log_archive = FALSE;/* unused */
|
||||
my_bool innobase_use_doublewrite = TRUE;
|
||||
my_bool innobase_use_checksums = TRUE;
|
||||
my_bool innobase_use_large_pages = FALSE;
|
||||
my_bool innobase_use_native_aio = FALSE;
|
||||
my_bool innobase_fast_shutdown = TRUE;
|
||||
my_bool innobase_very_fast_shutdown = FALSE; /* this can be set to
|
||||
|
@ -1123,6 +1127,12 @@ innobase_init(void)
|
|||
|
||||
srv_fast_shutdown = (ibool) innobase_fast_shutdown;
|
||||
|
||||
srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
|
||||
srv_use_checksums = (ibool) innobase_use_checksums;
|
||||
|
||||
os_use_large_pages = (ibool) innobase_use_large_pages;
|
||||
os_large_page_size = (ulint) innobase_large_page_size;
|
||||
|
||||
srv_file_per_table = (ibool) innobase_file_per_table;
|
||||
srv_locks_unsafe_for_binlog = (ibool) innobase_locks_unsafe_for_binlog;
|
||||
|
||||
|
|
|
@ -181,6 +181,7 @@ extern struct show_var_st innodb_status_variables[];
|
|||
extern uint innobase_init_flags, innobase_lock_type;
|
||||
extern uint innobase_flush_log_at_trx_commit;
|
||||
extern ulong innobase_cache_size;
|
||||
extern ulong innobase_large_page_size;
|
||||
extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
|
||||
extern long innobase_lock_scan_time;
|
||||
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
|
||||
|
@ -195,6 +196,9 @@ extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
|
|||
extern char *innobase_unix_file_flush_method;
|
||||
/* The following variables have to be my_bool for SHOW VARIABLES to work */
|
||||
extern my_bool innobase_log_archive,
|
||||
innobase_use_doublewrite,
|
||||
innobase_use_checksums,
|
||||
innobase_use_large_pages,
|
||||
innobase_use_native_aio, innobase_fast_shutdown,
|
||||
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
|
||||
innobase_create_status_file;
|
||||
|
|
|
@ -1428,6 +1428,13 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
|
|||
keydef[i].seg[j].bit_start= (uint) (field->pack_length() -
|
||||
table_arg->blob_ptr_size);
|
||||
}
|
||||
else if (field->type() == FIELD_TYPE_BIT)
|
||||
{
|
||||
keydef[i].seg[j].bit_length= ((Field_bit *) field)->bit_len;
|
||||
keydef[i].seg[j].bit_start= ((Field_bit *) field)->bit_ofs;
|
||||
keydef[i].seg[j].bit_pos= (uint) (((Field_bit *) field)->bit_ptr -
|
||||
(uchar*) table_arg->record[0]);
|
||||
}
|
||||
}
|
||||
keyseg+=pos->key_parts;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class ha_myisam: public handler
|
|||
int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
|
||||
HA_DUPP_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
|
||||
HA_FILE_BASED | HA_CAN_GEOMETRY | HA_READ_RND_SAME |
|
||||
HA_CAN_INSERT_DELAYED),
|
||||
HA_CAN_INSERT_DELAYED | HA_CAN_BIT_FIELD),
|
||||
can_enable_indexes(1)
|
||||
{}
|
||||
~ha_myisam() {}
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
#ifdef HAVE_NDBCLUSTER_DB
|
||||
#include "ha_ndbcluster.h"
|
||||
#endif
|
||||
#ifdef HAVE_FEDERATED_DB
|
||||
#include "ha_federated.h"
|
||||
#endif
|
||||
#include <myisampack.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -92,6 +95,8 @@ struct show_table_type_st sys_table_types[]=
|
|||
"Archive storage engine", DB_TYPE_ARCHIVE_DB},
|
||||
{"CSV",&have_csv_db,
|
||||
"CSV storage engine", DB_TYPE_CSV_DB},
|
||||
{"FEDERATED",&have_federated_db,
|
||||
"Federated MySQL storage engine", DB_TYPE_FEDERATED_DB},
|
||||
{NullS, NULL, NullS, DB_TYPE_UNKNOWN}
|
||||
};
|
||||
|
||||
|
@ -200,6 +205,10 @@ handler *get_new_handler(TABLE *table, enum db_type db_type)
|
|||
case DB_TYPE_ARCHIVE_DB:
|
||||
return new ha_archive(table);
|
||||
#endif
|
||||
#ifdef HAVE_FEDERATED_DB
|
||||
case DB_TYPE_FEDERATED_DB:
|
||||
return new ha_federated(table);
|
||||
#endif
|
||||
#ifdef HAVE_CSV_DB
|
||||
case DB_TYPE_CSV_DB:
|
||||
return new ha_tina(table);
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
/* Table data are stored in separate files (for lower_case_table_names) */
|
||||
#define HA_FILE_BASED (1 << 26)
|
||||
#define HA_NO_VARCHAR (1 << 27)
|
||||
#define HA_CAN_BIT_FIELD (1 << 28) /* supports bit fields */
|
||||
|
||||
|
||||
/* bits in index_flags(index_number) for what you can do with index */
|
||||
|
@ -152,6 +153,7 @@ enum db_type
|
|||
DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
|
||||
DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
|
||||
DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
|
||||
DB_TYPE_FEDERATED_DB,
|
||||
|
||||
DB_TYPE_DEFAULT // Must be last
|
||||
};
|
||||
|
|
55
sql/item.cc
55
sql/item.cc
|
@ -2573,11 +2573,11 @@ void Item_real::print(String *str)
|
|||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** varbinary item
|
||||
** In string context this is a binary string
|
||||
** In number context this is a longlong value.
|
||||
****************************************************************************/
|
||||
/*
|
||||
hex item
|
||||
In string context this is a binary string.
|
||||
In number context this is a longlong value.
|
||||
*/
|
||||
|
||||
inline uint char_val(char X)
|
||||
{
|
||||
|
@ -2587,7 +2587,7 @@ inline uint char_val(char X)
|
|||
}
|
||||
|
||||
|
||||
Item_varbinary::Item_varbinary(const char *str, uint str_length)
|
||||
Item_hex_string::Item_hex_string(const char *str, uint str_length)
|
||||
{
|
||||
name=(char*) str-2; // Lex makes this start with 0x
|
||||
max_length=(str_length+1)/2;
|
||||
|
@ -2608,7 +2608,7 @@ Item_varbinary::Item_varbinary(const char *str, uint str_length)
|
|||
fixed= 1;
|
||||
}
|
||||
|
||||
longlong Item_varbinary::val_int()
|
||||
longlong Item_hex_string::val_int()
|
||||
{
|
||||
// following assert is redundant, because fixed=1 assigned in constructor
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
|
@ -2622,7 +2622,7 @@ longlong Item_varbinary::val_int()
|
|||
}
|
||||
|
||||
|
||||
int Item_varbinary::save_in_field(Field *field, bool no_conversions)
|
||||
int Item_hex_string::save_in_field(Field *field, bool no_conversions)
|
||||
{
|
||||
int error;
|
||||
field->set_notnull();
|
||||
|
@ -2639,6 +2639,44 @@ int Item_varbinary::save_in_field(Field *field, bool no_conversions)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
bin item.
|
||||
In string context this is a binary string.
|
||||
In number context this is a longlong value.
|
||||
*/
|
||||
|
||||
Item_bin_string::Item_bin_string(const char *str, uint str_length)
|
||||
{
|
||||
const char *end= str + str_length - 1;
|
||||
uchar bits= 0;
|
||||
uint power= 1;
|
||||
|
||||
name= (char*) str - 2;
|
||||
max_length= (str_length + 7) >> 3;
|
||||
char *ptr= (char*) sql_alloc(max_length + 1);
|
||||
if (!ptr)
|
||||
return;
|
||||
str_value.set(ptr, max_length, &my_charset_bin);
|
||||
ptr+= max_length - 1;
|
||||
ptr[1]= 0; // Set end null for string
|
||||
for (; end >= str; end--)
|
||||
{
|
||||
if (power == 256)
|
||||
{
|
||||
power= 1;
|
||||
*ptr--= bits;
|
||||
bits= 0;
|
||||
}
|
||||
if (*end == '1')
|
||||
bits|= power;
|
||||
power<<= 1;
|
||||
}
|
||||
*ptr= (char) bits;
|
||||
collation.set(&my_charset_bin, DERIVATION_COERCIBLE);
|
||||
fixed= 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Pack data in buffer for sending
|
||||
*/
|
||||
|
@ -2672,6 +2710,7 @@ bool Item::send(Protocol *protocol, String *buffer)
|
|||
case MYSQL_TYPE_STRING:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_BIT:
|
||||
{
|
||||
String *res;
|
||||
if ((res=val_str(buffer)))
|
||||
|
|
13
sql/item.h
13
sql/item.h
|
@ -959,13 +959,14 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class Item_varbinary :public Item
|
||||
class Item_hex_string: public Item
|
||||
{
|
||||
public:
|
||||
Item_varbinary(const char *str,uint str_length);
|
||||
Item_hex_string(): Item() {}
|
||||
Item_hex_string(const char *str,uint str_length);
|
||||
enum Type type() const { return VARBIN_ITEM; }
|
||||
double val_real()
|
||||
{ DBUG_ASSERT(fixed == 1); return (double) Item_varbinary::val_int(); }
|
||||
{ DBUG_ASSERT(fixed == 1); return (double) Item_hex_string::val_int(); }
|
||||
longlong val_int();
|
||||
bool basic_const_item() const { return 1; }
|
||||
String *val_str(String*) { DBUG_ASSERT(fixed == 1); return &str_value; }
|
||||
|
@ -977,6 +978,12 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class Item_bin_string: public Item_hex_string
|
||||
{
|
||||
public:
|
||||
Item_bin_string(const char *str,uint str_length);
|
||||
};
|
||||
|
||||
class Item_result_field :public Item /* Item with result field */
|
||||
{
|
||||
public:
|
||||
|
|
30
sql/key.cc
30
sql/key.cc
|
@ -102,6 +102,19 @@ void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length)
|
|||
key_part->null_bit);
|
||||
key_length--;
|
||||
}
|
||||
if (key_part->type == HA_KEYTYPE_BIT)
|
||||
{
|
||||
Field_bit *field= (Field_bit *) (key_part->field);
|
||||
if (field->bit_len)
|
||||
{
|
||||
uchar bits= get_rec_bits((uchar*) from_record +
|
||||
key_part->null_offset +
|
||||
(key_part->null_bit == 128),
|
||||
field->bit_ofs, field->bit_len);
|
||||
*to_key++= bits;
|
||||
key_length--;
|
||||
}
|
||||
}
|
||||
if (key_part->key_part_flag & HA_BLOB_PART)
|
||||
{
|
||||
char *pos;
|
||||
|
@ -170,6 +183,23 @@ void key_restore(byte *to_record, byte *from_key, KEY *key_info,
|
|||
to_record[key_part->null_offset]&= ~key_part->null_bit;
|
||||
key_length--;
|
||||
}
|
||||
if (key_part->type == HA_KEYTYPE_BIT)
|
||||
{
|
||||
Field_bit *field= (Field_bit *) (key_part->field);
|
||||
if (field->bit_len)
|
||||
{
|
||||
uchar bits= *(from_key + key_part->length - field->field_length -1);
|
||||
set_rec_bits(bits, to_record + key_part->null_offset +
|
||||
(key_part->null_bit == 128),
|
||||
field->bit_ofs, field->bit_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
clr_rec_bits(to_record + key_part->null_offset +
|
||||
(key_part->null_bit == 128),
|
||||
field->bit_ofs, field->bit_len);
|
||||
}
|
||||
}
|
||||
if (key_part->key_part_flag & HA_BLOB_PART)
|
||||
{
|
||||
uint blob_length= uint2korr(from_key);
|
||||
|
|
|
@ -1027,6 +1027,8 @@ extern uint opt_crash_binlog_innodb;
|
|||
extern char *shared_memory_base_name, *mysqld_unix_port;
|
||||
extern bool opt_enable_shared_memory;
|
||||
extern char *default_tz_name;
|
||||
extern my_bool opt_large_pages;
|
||||
extern uint opt_large_page_size;
|
||||
|
||||
extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
|
||||
extern FILE *bootstrap_file;
|
||||
|
@ -1070,6 +1072,7 @@ extern struct my_option my_long_options[];
|
|||
|
||||
extern SHOW_COMP_OPTION have_isam, have_innodb, have_berkeley_db;
|
||||
extern SHOW_COMP_OPTION have_example_db, have_archive_db, have_csv_db;
|
||||
extern SHOW_COMP_OPTION have_federated_db;
|
||||
extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink;
|
||||
extern SHOW_COMP_OPTION have_query_cache, have_berkeley_db, have_innodb;
|
||||
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
|
||||
|
|
|
@ -78,10 +78,6 @@
|
|||
#define IF_PURIFY(A,B) (B)
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE -1 // Error value from inet_addr
|
||||
#endif
|
||||
|
||||
/* stack traces are only supported on linux intel */
|
||||
#if defined(__linux__) && defined(__i386__) && defined(USE_PSTACK)
|
||||
#define HAVE_STACK_TRACE_ON_SEGV
|
||||
|
@ -111,6 +107,7 @@ extern "C" { // Because of SCO 3.2V4.2
|
|||
#ifdef HAVE_GRP_H
|
||||
#include <grp.h>
|
||||
#endif
|
||||
#include <my_net.h>
|
||||
|
||||
#if defined(OS2)
|
||||
# include <sys/un.h>
|
||||
|
@ -299,6 +296,8 @@ my_bool opt_short_log_format= 0;
|
|||
my_bool opt_log_queries_not_using_indexes= 0;
|
||||
my_bool lower_case_file_system= 0;
|
||||
my_bool opt_innodb_safe_binlog= 0;
|
||||
my_bool opt_large_pages= 0;
|
||||
uint opt_large_page_size= 0;
|
||||
volatile bool mqh_used = 0;
|
||||
|
||||
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
|
||||
|
@ -392,6 +391,7 @@ CHARSET_INFO *national_charset_info, *table_alias_charset;
|
|||
|
||||
SHOW_COMP_OPTION have_berkeley_db, have_innodb, have_isam, have_ndbcluster,
|
||||
have_example_db, have_archive_db, have_csv_db;
|
||||
SHOW_COMP_OPTION have_federated_db;
|
||||
SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_query_cache;
|
||||
SHOW_COMP_OPTION have_geometry, have_rtree_keys;
|
||||
SHOW_COMP_OPTION have_crypt, have_compress;
|
||||
|
@ -2423,6 +2423,19 @@ static int init_common_variables(const char *conf_file_name, int argc,
|
|||
DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname,
|
||||
server_version, SYSTEM_TYPE,MACHINE_TYPE));
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
/* Initialize large page size */
|
||||
if (opt_large_pages && (opt_large_page_size= my_get_large_page_size()))
|
||||
{
|
||||
my_use_large_pages= 1;
|
||||
my_large_page_size= opt_large_page_size;
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
innobase_use_large_pages= 1;
|
||||
innobase_large_page_size= opt_large_page_size;
|
||||
#endif
|
||||
}
|
||||
#endif /* HAVE_LARGE_PAGES */
|
||||
|
||||
/* connections and databases needs lots of files */
|
||||
{
|
||||
uint files, wanted_files;
|
||||
|
@ -4086,6 +4099,8 @@ enum options_mysqld
|
|||
OPT_INNODB_LOG_ARCHIVE,
|
||||
OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT,
|
||||
OPT_INNODB_FLUSH_METHOD,
|
||||
OPT_INNODB_DOUBLEWRITE,
|
||||
OPT_INNODB_CHECKSUMS,
|
||||
OPT_INNODB_FAST_SHUTDOWN,
|
||||
OPT_INNODB_FILE_PER_TABLE, OPT_CRASH_BINLOG_INNODB,
|
||||
OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG,
|
||||
|
@ -4184,7 +4199,8 @@ enum options_mysqld
|
|||
OPT_OPTIMIZER_SEARCH_DEPTH,
|
||||
OPT_OPTIMIZER_PRUNE_LEVEL,
|
||||
OPT_UPDATABLE_VIEWS_WITH_LIMIT,
|
||||
OPT_AUTO_INCREMENT, OPT_AUTO_INCREMENT_OFFSET
|
||||
OPT_AUTO_INCREMENT, OPT_AUTO_INCREMENT_OFFSET,
|
||||
OPT_ENABLE_LARGE_PAGES
|
||||
};
|
||||
|
||||
|
||||
|
@ -4343,6 +4359,12 @@ Disable with --skip-bdb (will save memory).",
|
|||
"Set up signals usable for debugging",
|
||||
(gptr*) &opt_debugging, (gptr*) &opt_debugging,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
{"large-pages", OPT_ENABLE_LARGE_PAGES, "Enable support for large pages. \
|
||||
Disable with --skip-large-pages.",
|
||||
(gptr*) &opt_large_pages, (gptr*) &opt_large_pages, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
#endif
|
||||
{"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new connection",
|
||||
(gptr*) &opt_init_connect, (gptr*) &opt_init_connect, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -4366,6 +4388,12 @@ Disable with --skip-innodb (will save memory).",
|
|||
"The common part for InnoDB table spaces.", (gptr*) &innobase_data_home_dir,
|
||||
(gptr*) &innobase_data_home_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"innodb_doublewrite", OPT_INNODB_DOUBLEWRITE, "Enable InnoDB doublewrite buffer (enabled by default). \
|
||||
Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
|
||||
(gptr*) &innobase_use_doublewrite, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"innodb_checksums", OPT_INNODB_CHECKSUMS, "Enable InnoDB checksums validation (enabled by default). \
|
||||
Disable with --skip-innodb-checksums.", (gptr*) &innobase_use_checksums,
|
||||
(gptr*) &innobase_use_checksums, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN,
|
||||
"Speeds up server shutdown process.", (gptr*) &innobase_fast_shutdown,
|
||||
(gptr*) &innobase_fast_shutdown, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
|
||||
|
@ -5687,7 +5715,8 @@ static void mysql_init_variables(void)
|
|||
mysqld_unix_port= opt_mysql_tmpdir= my_bind_addr_str= NullS;
|
||||
bzero((gptr) &mysql_tmpdir_list, sizeof(mysql_tmpdir_list));
|
||||
bzero((char *) &global_status_var, sizeof(global_status_var));
|
||||
|
||||
opt_large_pages= 0;
|
||||
|
||||
/* Character sets */
|
||||
system_charset_info= &my_charset_utf8_general_ci;
|
||||
files_charset_info= &my_charset_utf8_general_ci;
|
||||
|
@ -5793,6 +5822,11 @@ static void mysql_init_variables(void)
|
|||
#else
|
||||
have_archive_db= SHOW_OPTION_NO;
|
||||
#endif
|
||||
#ifdef HAVE_FEDERATED_DB
|
||||
have_federated_db= SHOW_OPTION_YES;
|
||||
#else
|
||||
have_federated_db= SHOW_OPTION_NO;
|
||||
#endif
|
||||
#ifdef HAVE_CSV_DB
|
||||
have_csv_db= SHOW_OPTION_YES;
|
||||
#else
|
||||
|
|
|
@ -726,6 +726,7 @@ bool Protocol_simple::store(const char *from, uint length,
|
|||
#ifndef DEBUG_OFF
|
||||
DBUG_ASSERT(field_types == 0 ||
|
||||
field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
|
||||
field_types[field_pos] == MYSQL_TYPE_BIT ||
|
||||
(field_types[field_pos] >= MYSQL_TYPE_ENUM &&
|
||||
field_types[field_pos] <= MYSQL_TYPE_GEOMETRY));
|
||||
field_pos++;
|
||||
|
@ -741,6 +742,7 @@ bool Protocol_simple::store(const char *from, uint length,
|
|||
#ifndef DEBUG_OFF
|
||||
DBUG_ASSERT(field_types == 0 ||
|
||||
field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
|
||||
field_types[field_pos] == MYSQL_TYPE_BIT ||
|
||||
(field_types[field_pos] >= MYSQL_TYPE_ENUM &&
|
||||
field_types[field_pos] <= MYSQL_TYPE_GEOMETRY));
|
||||
field_pos++;
|
||||
|
|
|
@ -715,7 +715,8 @@ struct show_var_st init_vars[]= {
|
|||
{"have_compress", (char*) &have_compress, SHOW_HAVE},
|
||||
{"have_crypt", (char*) &have_crypt, SHOW_HAVE},
|
||||
{"have_csv", (char*) &have_csv_db, SHOW_HAVE},
|
||||
{"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
|
||||
{"have_example_engine", (char*) &have_example_db, SHOW_HAVE},
|
||||
{"have_federated_db", (char*) &have_federated_db, SHOW_HAVE},
|
||||
{"have_geometry", (char*) &have_geometry, SHOW_HAVE},
|
||||
{"have_innodb", (char*) &have_innodb, SHOW_HAVE},
|
||||
{"have_isam", (char*) &have_isam, SHOW_HAVE},
|
||||
|
@ -735,6 +736,8 @@ struct show_var_st init_vars[]= {
|
|||
{"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONG },
|
||||
{"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR},
|
||||
{"innodb_data_home_dir", (char*) &innobase_data_home_dir, SHOW_CHAR_PTR},
|
||||
{"innodb_doublewrite", (char*) &innobase_use_doublewrite, SHOW_MY_BOOL},
|
||||
{"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL},
|
||||
{"innodb_fast_shutdown", (char*) &innobase_fast_shutdown, SHOW_MY_BOOL},
|
||||
{"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG },
|
||||
{"innodb_file_per_table", (char*) &innobase_file_per_table, SHOW_MY_BOOL},
|
||||
|
@ -768,6 +771,8 @@ struct show_var_st init_vars[]= {
|
|||
SHOW_SYS},
|
||||
{"language", language, SHOW_CHAR},
|
||||
{"large_files_support", (char*) &opt_large_files, SHOW_BOOL},
|
||||
{"large_pages", (char*) &opt_large_pages, SHOW_MY_BOOL},
|
||||
{"large_page_size", (char*) &opt_large_page_size, SHOW_INT},
|
||||
{sys_license.name, (char*) &sys_license, SHOW_SYS},
|
||||
{sys_local_infile.name, (char*) &sys_local_infile, SHOW_SYS},
|
||||
#ifdef HAVE_MLOCKALL
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
## Process this file with automake to create Makefile.in
|
||||
|
||||
EXTRA_DIST= errmsg.txt
|
||||
|
||||
dist-hook:
|
||||
for dir in charsets @AVAILABLE_LANGUAGES@; do \
|
||||
test -d $(distdir)/$$dir || mkdir $(distdir)/$$dir; \
|
||||
|
|
|
@ -567,8 +567,12 @@ int yylex(void *arg, void *yythd)
|
|||
state= MY_LEX_HEX_NUMBER;
|
||||
break;
|
||||
}
|
||||
/* Fall through */
|
||||
case MY_LEX_IDENT_OR_BIN: // TODO: Add binary string handling
|
||||
case MY_LEX_IDENT_OR_BIN:
|
||||
if (yyPeek() == '\'')
|
||||
{ // Found b'bin-number'
|
||||
state= MY_LEX_BIN_NUMBER;
|
||||
break;
|
||||
}
|
||||
case MY_LEX_IDENT:
|
||||
uchar *start;
|
||||
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
||||
|
@ -689,6 +693,20 @@ int yylex(void *arg, void *yythd)
|
|||
}
|
||||
yyUnget();
|
||||
}
|
||||
else if (c == 'b' && (lex->ptr - lex->tok_start) == 2 &&
|
||||
lex->tok_start[0] == '0' )
|
||||
{ // b'bin-number'
|
||||
while (my_isxdigit(cs,(c = yyGet()))) ;
|
||||
if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c])
|
||||
{
|
||||
yylval->lex_str= get_token(lex, yyLength());
|
||||
yylval->lex_str.str+= 2; // Skip 0x
|
||||
yylval->lex_str.length-= 2;
|
||||
lex->yytoklen-= 2;
|
||||
return (BIN_NUM);
|
||||
}
|
||||
yyUnget();
|
||||
}
|
||||
// fall through
|
||||
case MY_LEX_IDENT_START: // We come here after '.'
|
||||
result_state= IDENT;
|
||||
|
@ -801,6 +819,19 @@ int yylex(void *arg, void *yythd)
|
|||
lex->yytoklen-=3;
|
||||
return (HEX_NUM);
|
||||
|
||||
case MY_LEX_BIN_NUMBER: // Found b'bin-string'
|
||||
yyGet(); // Skip '
|
||||
while ((c= yyGet()) == '0' || c == '1');
|
||||
length= (lex->ptr - lex->tok_start); // Length of bin-num + 3
|
||||
if (c != '\'')
|
||||
return(ABORT_SYM); // Illegal hex constant
|
||||
yyGet(); // get_token makes an unget
|
||||
yylval->lex_str= get_token(lex, length);
|
||||
yylval->lex_str.str+= 2; // Skip b'
|
||||
yylval->lex_str.length-= 3; // Don't count b' and last '
|
||||
lex->yytoklen-= 3;
|
||||
return (BIN_NUM);
|
||||
|
||||
case MY_LEX_CMP_OP: // Incomplete comparison operator
|
||||
if (state_map[yyPeek()] == MY_LEX_CMP_OP ||
|
||||
state_map[yyPeek()] == MY_LEX_LONG_CMP_OP)
|
||||
|
|
|
@ -1583,6 +1583,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
packet, (uint) (pend-packet), thd->charset());
|
||||
table_list.alias= table_list.real_name= conv_name.str;
|
||||
packet= pend+1;
|
||||
|
||||
if (!my_strcasecmp(system_charset_info, table_list.db,
|
||||
information_schema_name.str))
|
||||
{
|
||||
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, table_list.alias);
|
||||
if (schema_table)
|
||||
table_list.schema_table= schema_table;
|
||||
}
|
||||
|
||||
/* command not cachable => no gap for data base name */
|
||||
if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
|
||||
break;
|
||||
|
@ -5063,6 +5072,19 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
|
|||
case MYSQL_TYPE_VAR_STRING:
|
||||
DBUG_ASSERT(0); // Impossible
|
||||
break;
|
||||
case MYSQL_TYPE_BIT:
|
||||
{
|
||||
if (!length)
|
||||
new_field->length= 1;
|
||||
if (new_field->length > MAX_BIT_FIELD_LENGTH)
|
||||
{
|
||||
my_error(ER_TOO_BIG_FIELDLENGTH, MYF(0), field_name,
|
||||
MAX_BIT_FIELD_LENGTH);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
new_field->pack_length= (new_field->length + 7) / 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(new_field->flags & BLOB_FLAG) &&
|
||||
|
@ -5258,7 +5280,9 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
|||
information_schema_name.str))
|
||||
{
|
||||
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->real_name);
|
||||
if (!schema_table)
|
||||
if (!schema_table ||
|
||||
(schema_table->hidden &&
|
||||
lex->orig_sql_command == SQLCOM_END)) // not a 'show' command
|
||||
{
|
||||
my_error(ER_UNKNOWN_TABLE, MYF(0),
|
||||
ptr->real_name, information_schema_name.str);
|
||||
|
|
|
@ -7777,6 +7777,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
|||
KEY_PART_INFO *key_part_info;
|
||||
Item **copy_func;
|
||||
MI_COLUMNDEF *recinfo;
|
||||
uint total_uneven_bit_length= 0;
|
||||
DBUG_ENTER("create_tmp_table");
|
||||
DBUG_PRINT("enter",("distinct: %d save_sum_fields: %d rows_limit: %lu group: %d",
|
||||
(int) distinct, (int) save_sum_fields,
|
||||
|
@ -7966,6 +7967,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
|||
reclength+=new_field->pack_length();
|
||||
if (!(new_field->flags & NOT_NULL_FLAG))
|
||||
null_count++;
|
||||
if (new_field->type() == FIELD_TYPE_BIT)
|
||||
total_uneven_bit_length+= new_field->field_length & 7;
|
||||
if (new_field->flags & BLOB_FLAG)
|
||||
{
|
||||
*blob_field++= new_field;
|
||||
|
@ -8014,7 +8017,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
|||
null_count++;
|
||||
}
|
||||
hidden_null_pack_length=(hidden_null_count+7)/8;
|
||||
null_pack_length=hidden_null_count+(null_count+7)/8;
|
||||
null_pack_length= hidden_null_count +
|
||||
(null_count + total_uneven_bit_length + 7) / 8;
|
||||
reclength+=null_pack_length;
|
||||
if (!reclength)
|
||||
reclength=1; // Dummy select
|
||||
|
|
|
@ -1976,6 +1976,8 @@ int schema_tables_add(THD *thd, List<char> *files, const char *wild)
|
|||
ST_SCHEMA_TABLE *tmp_schema_table= schema_tables;
|
||||
for ( ; tmp_schema_table->table_name; tmp_schema_table++)
|
||||
{
|
||||
if (tmp_schema_table->hidden)
|
||||
continue;
|
||||
if (wild)
|
||||
{
|
||||
if (lower_case_table_names)
|
||||
|
@ -3688,38 +3690,38 @@ ST_FIELD_INFO table_names_fields_info[]=
|
|||
ST_SCHEMA_TABLE schema_tables[]=
|
||||
{
|
||||
{"SCHEMATA", schema_fields_info, create_schema_table,
|
||||
fill_schema_shemata, make_schemata_old_format, 0, 1, -1},
|
||||
fill_schema_shemata, make_schemata_old_format, 0, 1, -1, 0},
|
||||
{"TABLES", tables_fields_info, create_schema_table,
|
||||
get_all_tables, make_old_format, get_schema_tables_record, 1, 2},
|
||||
get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0},
|
||||
{"COLUMNS", columns_fields_info, create_schema_table,
|
||||
get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2},
|
||||
get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
|
||||
{"CHARACTER_SETS", charsets_fields_info, create_schema_table,
|
||||
fill_schema_charsets, make_character_sets_old_format, 0, -1, -1},
|
||||
fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0},
|
||||
{"COLLATIONS", collation_fields_info, create_schema_table,
|
||||
fill_schema_collation, make_old_format, 0, -1, -1},
|
||||
fill_schema_collation, make_old_format, 0, -1, -1, 0},
|
||||
{"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
|
||||
create_schema_table, fill_schema_coll_charset_app, 0, 0, -1, -1},
|
||||
create_schema_table, fill_schema_coll_charset_app, 0, 0, -1, -1, 0},
|
||||
{"ROUTINES", proc_fields_info, create_schema_table,
|
||||
fill_schema_proc, make_proc_old_format, 0, -1, -1},
|
||||
fill_schema_proc, make_proc_old_format, 0, -1, -1, 0},
|
||||
{"STATISTICS", stat_fields_info, create_schema_table,
|
||||
get_all_tables, make_old_format, get_schema_stat_record, 1, 2},
|
||||
get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0},
|
||||
{"VIEWS", view_fields_info, create_schema_table,
|
||||
get_all_tables, 0, get_schema_views_record, 1, 2},
|
||||
get_all_tables, 0, get_schema_views_record, 1, 2, 0},
|
||||
{"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table,
|
||||
fill_schema_user_privileges, 0, 0, -1, -1},
|
||||
fill_schema_user_privileges, 0, 0, -1, -1, 0},
|
||||
{"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
|
||||
fill_schema_schema_privileges, 0, 0, -1, -1},
|
||||
fill_schema_schema_privileges, 0, 0, -1, -1, 0},
|
||||
{"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
|
||||
fill_schema_table_privileges, 0, 0, -1, -1},
|
||||
fill_schema_table_privileges, 0, 0, -1, -1, 0},
|
||||
{"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
|
||||
fill_schema_column_privileges, 0, 0, -1, -1},
|
||||
fill_schema_column_privileges, 0, 0, -1, -1, 0},
|
||||
{"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
|
||||
get_all_tables, 0, get_schema_constraints_record, 3, 4},
|
||||
get_all_tables, 0, get_schema_constraints_record, 3, 4, 0},
|
||||
{"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
|
||||
get_all_tables, 0, get_schema_key_column_usage_record, 4, 5},
|
||||
get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0},
|
||||
{"TABLE_NAMES", table_names_fields_info, create_schema_table,
|
||||
get_all_tables, make_table_names_old_format, 0, 1, 2},
|
||||
{0, 0, 0, 0, 0, 0, 0, 0}
|
||||
get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -458,6 +458,7 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||
int field_no,dup_no;
|
||||
int select_field_pos,auto_increment=0;
|
||||
List_iterator<create_field> it(fields),it2(fields);
|
||||
uint total_uneven_bit_length= 0;
|
||||
DBUG_ENTER("mysql_prepare_table");
|
||||
|
||||
select_field_pos=fields.elements - select_field_count;
|
||||
|
@ -614,6 +615,9 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||
if (!(sql_field->flags & NOT_NULL_FLAG))
|
||||
null_fields++;
|
||||
|
||||
if (sql_field->sql_type == FIELD_TYPE_BIT)
|
||||
total_uneven_bit_length+= sql_field->length & 7;
|
||||
|
||||
if (check_column_name(sql_field->field_name))
|
||||
{
|
||||
my_error(ER_WRONG_COLUMN_NAME, MYF(0), sql_field->field_name);
|
||||
|
@ -666,7 +670,7 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||
/* If fixed row records, we need one bit to check for deleted rows */
|
||||
if (!(db_options & HA_OPTION_PACK_RECORD))
|
||||
null_fields++;
|
||||
pos=(null_fields+7)/8;
|
||||
pos= (null_fields + total_uneven_bit_length + 7) / 8;
|
||||
|
||||
it.rewind();
|
||||
while ((sql_field=it++))
|
||||
|
@ -762,6 +766,14 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||
case FIELD_TYPE_NULL:
|
||||
sql_field->pack_flag=f_settype((uint) sql_field->sql_type);
|
||||
break;
|
||||
case FIELD_TYPE_BIT:
|
||||
if (!(file->table_flags() & HA_CAN_BIT_FIELD))
|
||||
{
|
||||
my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "BIT FIELD");
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
sql_field->pack_flag= FIELDFLAG_NUMBER;
|
||||
break;
|
||||
case FIELD_TYPE_TIMESTAMP:
|
||||
/* We should replace old TIMESTAMP fields with their newer analogs */
|
||||
if (sql_field->unireg_check == Field::TIMESTAMP_OLD_FIELD)
|
||||
|
|
|
@ -208,6 +208,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||
%token BACKUP_SYM
|
||||
%token BERKELEY_DB_SYM
|
||||
%token BINARY
|
||||
%token BIN_NUM
|
||||
%token BIT_SYM
|
||||
%token BOOL_SYM
|
||||
%token BOOLEAN_SYM
|
||||
|
@ -664,7 +665,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||
LEX_HOSTNAME ULONGLONG_NUM field_ident select_alias ident ident_or_text
|
||||
UNDERSCORE_CHARSET IDENT_sys TEXT_STRING_sys TEXT_STRING_literal
|
||||
NCHAR_STRING opt_component key_cache_name
|
||||
sp_opt_label
|
||||
sp_opt_label BIN_NUM
|
||||
|
||||
%type <lex_str_ptr>
|
||||
opt_table_alias
|
||||
|
@ -2750,8 +2751,10 @@ type:
|
|||
int_type opt_len field_options { $$=$1; }
|
||||
| real_type opt_precision field_options { $$=$1; }
|
||||
| FLOAT_SYM float_options field_options { $$=FIELD_TYPE_FLOAT; }
|
||||
| BIT_SYM opt_len { Lex->length=(char*) "1";
|
||||
$$=FIELD_TYPE_TINY; }
|
||||
| BIT_SYM { Lex->length= (char*) "1";
|
||||
$$=FIELD_TYPE_BIT; }
|
||||
| BIT_SYM '(' NUM ')' { Lex->length= $3.str;
|
||||
$$=FIELD_TYPE_BIT; }
|
||||
| BOOL_SYM { Lex->length=(char*) "1";
|
||||
$$=FIELD_TYPE_TINY; }
|
||||
| BOOLEAN_SYM { Lex->length=(char*) "1";
|
||||
|
@ -6458,15 +6461,25 @@ text_string:
|
|||
{ $$= new (YYTHD->mem_root) String($1.str,$1.length,YYTHD->variables.collation_connection); }
|
||||
| HEX_NUM
|
||||
{
|
||||
Item *tmp = new Item_varbinary($1.str,$1.length);
|
||||
Item *tmp= new Item_hex_string($1.str, $1.length);
|
||||
/*
|
||||
it is OK only emulate fix_fieds, because we need only
|
||||
it is OK only emulate fix_fields, because we need only
|
||||
value of constant
|
||||
*/
|
||||
$$= tmp ?
|
||||
tmp->quick_fix_field(), tmp->val_str((String*) 0) :
|
||||
(String*) 0;
|
||||
}
|
||||
| BIN_NUM
|
||||
{
|
||||
Item *tmp= new Item_bin_string($1.str, $1.length);
|
||||
/*
|
||||
it is OK only emulate fix_fields, because we need only
|
||||
value of constant
|
||||
*/
|
||||
$$= tmp ? tmp->quick_fix_field(), tmp->val_str((String*) 0) :
|
||||
(String*) 0;
|
||||
}
|
||||
;
|
||||
|
||||
param_marker:
|
||||
|
@ -6508,10 +6521,11 @@ literal:
|
|||
| NUM_literal { $$ = $1; }
|
||||
| NULL_SYM { $$ = new Item_null();
|
||||
Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;}
|
||||
| HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);}
|
||||
| HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);}
|
||||
| BIN_NUM { $$= new Item_bin_string($1.str, $1.length); }
|
||||
| UNDERSCORE_CHARSET HEX_NUM
|
||||
{
|
||||
Item *tmp= new Item_varbinary($2.str,$2.length);
|
||||
Item *tmp= new Item_hex_string($2.str, $2.length);
|
||||
/*
|
||||
it is OK only emulate fix_fieds, because we need only
|
||||
value of constant
|
||||
|
@ -6523,6 +6537,20 @@ literal:
|
|||
str ? str->length() : 0,
|
||||
Lex->charset);
|
||||
}
|
||||
| UNDERSCORE_CHARSET BIN_NUM
|
||||
{
|
||||
Item *tmp= new Item_bin_string($2.str, $2.length);
|
||||
/*
|
||||
it is OK only emulate fix_fieds, because we need only
|
||||
value of constant
|
||||
*/
|
||||
String *str= tmp ?
|
||||
tmp->quick_fix_field(), tmp->val_str((String*) 0) :
|
||||
(String*) 0;
|
||||
$$= new Item_string(str ? str->ptr() : "",
|
||||
str ? str->length() : 0,
|
||||
Lex->charset);
|
||||
}
|
||||
| DATE_SYM text_literal { $$ = $2; }
|
||||
| TIME_SYM text_literal { $$ = $2; }
|
||||
| TIMESTAMP text_literal { $$ = $2; };
|
||||
|
@ -6857,6 +6885,7 @@ keyword:
|
|||
| CLIENT_SYM {}
|
||||
| CLOSE_SYM {}
|
||||
| COLLATION_SYM {}
|
||||
| COLUMNS {}
|
||||
| COMMENT_SYM {}
|
||||
| COMMITTED_SYM {}
|
||||
| COMMIT_SYM {}
|
||||
|
@ -6978,6 +7007,7 @@ keyword:
|
|||
| POLYGON {}
|
||||
| PREPARE_SYM {}
|
||||
| PREV_SYM {}
|
||||
| PRIVILEGES {}
|
||||
| PROCESS {}
|
||||
| PROCESSLIST_SYM {}
|
||||
| QUARTER_SYM {}
|
||||
|
@ -7029,6 +7059,7 @@ keyword:
|
|||
| SUBDATE_SYM {}
|
||||
| SUBJECT_SYM {}
|
||||
| SUPER_SYM {}
|
||||
| TABLES {}
|
||||
| TABLESPACE {}
|
||||
| TEMPORARY {}
|
||||
| TEMPTABLE_SYM {}
|
||||
|
|
25
sql/table.cc
25
sql/table.cc
|
@ -81,7 +81,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
|||
KEY *keyinfo;
|
||||
KEY_PART_INFO *key_part;
|
||||
uchar *null_pos;
|
||||
uint null_bit, new_frm_ver, field_pack_length;
|
||||
uint null_bit_pos, new_frm_ver, field_pack_length;
|
||||
SQL_CRYPT *crypted=0;
|
||||
MEM_ROOT **root_ptr, *old_root;
|
||||
DBUG_ENTER("openfrm");
|
||||
|
@ -409,15 +409,15 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
|||
if (null_field_first)
|
||||
{
|
||||
outparam->null_flags=null_pos=(uchar*) record+1;
|
||||
null_bit= (db_create_options & HA_OPTION_PACK_RECORD) ? 1 : 2;
|
||||
outparam->null_bytes=(outparam->null_fields+null_bit+6)/8;
|
||||
null_bit_pos= (db_create_options & HA_OPTION_PACK_RECORD) ? 0 : 1;
|
||||
outparam->null_bytes= (outparam->null_fields + null_bit_pos + 7) / 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
outparam->null_bytes=(outparam->null_fields+7)/8;
|
||||
outparam->null_flags=null_pos=
|
||||
(uchar*) (record+1+outparam->reclength-outparam->null_bytes);
|
||||
null_bit=1;
|
||||
null_bit_pos= 0;
|
||||
}
|
||||
|
||||
use_hash= outparam->fields >= MAX_FIELDS_BEFORE_HASH;
|
||||
|
@ -512,7 +512,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
|||
*field_ptr=reg_field=
|
||||
make_field(record+recpos,
|
||||
(uint32) field_length,
|
||||
null_pos,null_bit,
|
||||
null_pos, null_bit_pos,
|
||||
pack_flag,
|
||||
field_type,
|
||||
charset,
|
||||
|
@ -529,13 +529,18 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
|||
goto err_not_open; /* purecov: inspected */
|
||||
}
|
||||
reg_field->comment=comment;
|
||||
if (field_type == FIELD_TYPE_BIT)
|
||||
{
|
||||
if ((null_bit_pos+= field_length & 7) > 7)
|
||||
{
|
||||
null_pos++;
|
||||
null_bit_pos-= 8;
|
||||
}
|
||||
}
|
||||
if (!(reg_field->flags & NOT_NULL_FLAG))
|
||||
{
|
||||
if ((null_bit<<=1) == 256)
|
||||
{
|
||||
null_pos++;
|
||||
null_bit=1;
|
||||
}
|
||||
if (!(null_bit_pos= (null_bit_pos + 1) & 7))
|
||||
null_pos++;
|
||||
}
|
||||
if (f_no_default(pack_flag))
|
||||
reg_field->flags|= NO_DEFAULT_VALUE_FLAG;
|
||||
|
|
|
@ -254,6 +254,7 @@ typedef struct st_schema_table
|
|||
TABLE *table, bool res, const char *base_name,
|
||||
const char *file_name);
|
||||
int idx_field1, idx_field2;
|
||||
bool hidden;
|
||||
} ST_SCHEMA_TABLE;
|
||||
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ static bool make_empty_rec(File file,enum db_type table_type,
|
|||
Field *regfield=make_field((char*) buff+field->offset,field->length,
|
||||
field->flags & NOT_NULL_FLAG ? 0:
|
||||
null_pos+null_count/8,
|
||||
1 << (null_count & 7),
|
||||
null_count & 7,
|
||||
field->pack_flag,
|
||||
field->sql_type,
|
||||
field->charset,
|
||||
|
|
|
@ -66,6 +66,8 @@
|
|||
/* Max column width +1 */
|
||||
#define MAX_FIELD_WIDTH (MAX_FIELD_CHARLENGTH*MAX_MBWIDTH+1)
|
||||
|
||||
#define MAX_BIT_FIELD_LENGTH 64 /* Max length in bits for bit fields */
|
||||
|
||||
#define MAX_DATE_WIDTH 10 /* YYYY-MM-DD */
|
||||
#define MAX_TIME_WIDTH 23 /* -DDDDDD HH:MM:SS.###### */
|
||||
#define MAX_DATETIME_FULL_WIDTH 29 /* YYYY-MM-DD HH:MM:SS.###### AM */
|
||||
|
|
|
@ -46,7 +46,7 @@ static unsigned long lfactor[9]=
|
|||
from string nptr and converts it to an signed or unsigned
|
||||
long long integer value.
|
||||
Space characters and tab are ignored.
|
||||
A sign character might precede the the digit characters. The number
|
||||
A sign character might precede the digit characters. The number
|
||||
may have any number of pre-zero digits.
|
||||
|
||||
The function stops reading the string nptr at the first character
|
||||
|
|
|
@ -11936,7 +11936,7 @@ static void test_bug4172()
|
|||
MYSQL_ROW row;
|
||||
int rc;
|
||||
char f[100], d[100], e[100];
|
||||
long f_len, d_len, e_len;
|
||||
ulong f_len, d_len, e_len;
|
||||
|
||||
myheader("test_bug4172");
|
||||
|
||||
|
@ -12027,8 +12027,8 @@ static void test_conversion()
|
|||
|
||||
mysql_stmt_bind_param(stmt, bind);
|
||||
|
||||
buff[0]= 0xC3;
|
||||
buff[1]= 0xA0;
|
||||
buff[0]= (uchar) 0xC3;
|
||||
buff[1]= (uchar) 0xA0;
|
||||
length= 2;
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
|
@ -12240,7 +12240,7 @@ static void test_truncation()
|
|||
|
||||
/* int -> float: truncation, not enough bits in float */
|
||||
DIE_UNLESS(++bind < bind_array + bind_count);
|
||||
/* do nothing: due to a gcc bug result here is not predictable */
|
||||
DIE_UNLESS(*bind->error);
|
||||
|
||||
/* int -> double: no truncation */
|
||||
DIE_UNLESS(++bind < bind_array + bind_count);
|
||||
|
@ -12302,6 +12302,56 @@ static void test_truncation()
|
|||
myquery(rc);
|
||||
}
|
||||
|
||||
static void test_truncation_option()
|
||||
{
|
||||
MYSQL_STMT *stmt;
|
||||
const char *stmt_text;
|
||||
int rc;
|
||||
uint8 buf;
|
||||
my_bool option= 0;
|
||||
my_bool error;
|
||||
MYSQL_BIND bind;
|
||||
|
||||
myheader("test_truncation_option");
|
||||
|
||||
/* Prepare the test table */
|
||||
stmt_text= "select -1";
|
||||
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
|
||||
check_execute(stmt, rc);
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
bzero(&bind, sizeof(MYSQL_BIND));
|
||||
|
||||
bind.buffer= (void*) &buf;
|
||||
bind.buffer_type= MYSQL_TYPE_TINY;
|
||||
bind.is_unsigned= TRUE;
|
||||
bind.error= &error;
|
||||
|
||||
rc= mysql_stmt_bind_result(stmt, &bind);
|
||||
check_execute(stmt, rc);
|
||||
rc= mysql_stmt_fetch(stmt);
|
||||
DIE_UNLESS(rc == MYSQL_DATA_TRUNCATED);
|
||||
DIE_UNLESS(error);
|
||||
rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option);
|
||||
myquery(rc);
|
||||
/* need to rebind for the new setting to take effect */
|
||||
rc= mysql_stmt_bind_result(stmt, &bind);
|
||||
check_execute(stmt, rc);
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
rc= mysql_stmt_fetch(stmt);
|
||||
check_execute(stmt, rc);
|
||||
/* The only change is rc - error pointers are still filled in */
|
||||
DIE_UNLESS(error == 1);
|
||||
/* restore back the defaults */
|
||||
option= 1;
|
||||
mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option);
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
}
|
||||
|
||||
/*
|
||||
Read and parse arguments and MySQL options from my.cnf
|
||||
|
@ -12517,6 +12567,7 @@ static struct my_tests_st my_tests[]= {
|
|||
{ "test_basic_cursors", test_basic_cursors },
|
||||
{ "test_cursors_with_union", test_cursors_with_union },
|
||||
{ "test_truncation", test_truncation },
|
||||
{ "test_truncation_option", test_truncation_option },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue