Commit c95e33fa authored by rburnett@bk-internal.mysql.com's avatar rburnett@bk-internal.mysql.com

Merge bk-internal.mysql.com:/data0/bk/mysql-4.1

into bk-internal.mysql.com:/users/rburnett/bug9721
parents e4523c23 a37c95d4
...@@ -86,6 +86,7 @@ jani@dsl-jkl1657.dial.inet.fi ...@@ -86,6 +86,7 @@ jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi jani@dsl-kpogw4gb5.dial.inet.fi
jani@hynda.(none) jani@hynda.(none)
jani@hynda.mysql.fi jani@hynda.mysql.fi
jani@ibmlab.site
jani@janikt.pp.saunalahti.fi jani@janikt.pp.saunalahti.fi
jani@rhols221.adsl.netsonic.fi jani@rhols221.adsl.netsonic.fi
jani@rhols221.arenanet.fi jani@rhols221.arenanet.fi
...@@ -215,6 +216,7 @@ serg@serg.mysql.com ...@@ -215,6 +216,7 @@ serg@serg.mysql.com
serg@sergbook.mylan serg@sergbook.mylan
serg@sergbook.mysql.com serg@sergbook.mysql.com
sergefp@mysql.com sergefp@mysql.com
shuichi@mysql.com
sinisa@rhols221.adsl.netsonic.fi sinisa@rhols221.adsl.netsonic.fi
stewart@mysql.com stewart@mysql.com
svoj@mysql.com svoj@mysql.com
......
...@@ -2500,14 +2500,14 @@ AC_DIVERT_PUSH(0) ...@@ -2500,14 +2500,14 @@ AC_DIVERT_PUSH(0)
define(CHARSETS_AVAILABLE0,binary) define(CHARSETS_AVAILABLE0,binary)
define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257) define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 dec8 euckr gb2312 gbk geostd8) define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 euckr gb2312 gbk geostd8)
define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u) define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman) define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8) define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8)
DEFAULT_CHARSET=latin1 DEFAULT_CHARSET=latin1
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5" CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
CHARSETS_COMPLEX="big5 cp1250 euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8" CHARSETS_COMPLEX="big5 cp1250 cp932 euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8"
AC_DIVERT_POP AC_DIVERT_POP
...@@ -2596,6 +2596,11 @@ do ...@@ -2596,6 +2596,11 @@ do
cp866) cp866)
AC_DEFINE(HAVE_CHARSET_cp866, 1, [Define to enable charset cp866]) AC_DEFINE(HAVE_CHARSET_cp866, 1, [Define to enable charset cp866])
;; ;;
cp932)
AC_DEFINE(HAVE_CHARSET_cp932, 1, [Define to enable charset cp932])
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
AC_DEFINE(USE_MB_IDENT, 1)
;;
dec8) dec8)
AC_DEFINE(HAVE_CHARSET_dec8, 1, [Define to enable charset dec8]) AC_DEFINE(HAVE_CHARSET_dec8, 1, [Define to enable charset dec8])
;; ;;
...@@ -2734,6 +2739,10 @@ case $default_charset in ...@@ -2734,6 +2739,10 @@ case $default_charset in
default_charset_default_collation="cp866_general_ci" default_charset_default_collation="cp866_general_ci"
default_charset_collations="cp866_general_ci cp866_bin" default_charset_collations="cp866_general_ci cp866_bin"
;; ;;
cp932)
default_charset_default_collation="cp932_japanese_ci"
default_charset_collations="cp932_japanese_ci cp932_bin"
;;
dec8) dec8)
default_charset_default_collation="dec8_swedish_ci" default_charset_default_collation="dec8_swedish_ci"
default_charset_collations="dec8_swedish_ci dec8_bin" default_charset_collations="dec8_swedish_ci dec8_bin"
......
...@@ -230,6 +230,8 @@ typedef struct charset_info_st ...@@ -230,6 +230,8 @@ typedef struct charset_info_st
extern CHARSET_INFO my_charset_bin; extern CHARSET_INFO my_charset_bin;
extern CHARSET_INFO my_charset_big5_chinese_ci; extern CHARSET_INFO my_charset_big5_chinese_ci;
extern CHARSET_INFO my_charset_big5_bin; extern CHARSET_INFO my_charset_big5_bin;
extern CHARSET_INFO my_charset_cp932_japanese_ci;
extern CHARSET_INFO my_charset_cp932_bin;
extern CHARSET_INFO my_charset_euckr_korean_ci; extern CHARSET_INFO my_charset_euckr_korean_ci;
extern CHARSET_INFO my_charset_euckr_bin; extern CHARSET_INFO my_charset_euckr_bin;
extern CHARSET_INFO my_charset_gb2312_chinese_ci; extern CHARSET_INFO my_charset_gb2312_chinese_ci;
......
...@@ -530,8 +530,15 @@ lock_rec_print( ...@@ -530,8 +530,15 @@ lock_rec_print(
Prints info of locks for all transactions. */ Prints info of locks for all transactions. */
void void
lock_print_info( lock_print_info_summary(
/*============*/ /*====================*/
FILE* file); /* in: file where to print */
/*************************************************************************
Prints info of locks for each transaction. */
void
lock_print_info_all_transactions(
/*=============================*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/************************************************************************* /*************************************************************************
Validates the lock queue on a table. */ Validates the lock queue on a table. */
......
...@@ -398,7 +398,11 @@ Outputs to a file the output of the InnoDB Monitor. */ ...@@ -398,7 +398,11 @@ Outputs to a file the output of the InnoDB Monitor. */
void void
srv_printf_innodb_monitor( srv_printf_innodb_monitor(
/*======================*/ /*======================*/
FILE* file); /* in: output stream */ FILE* file, /* in: output stream */
ulint* trx_start, /* out: file position of the start of
the list of active transactions */
ulint* trx_end); /* out: file position of the end of
the list of active transactions */
/* Types for the threads existing in the system. Threads of types 4 - 9 /* Types for the threads existing in the system. Threads of types 4 - 9
......
...@@ -4126,21 +4126,10 @@ lock_get_n_rec_locks(void) ...@@ -4126,21 +4126,10 @@ lock_get_n_rec_locks(void)
Prints info of locks for all transactions. */ Prints info of locks for all transactions. */
void void
lock_print_info( lock_print_info_summary(
/*============*/ /*====================*/
FILE* file) /* in: file where to print */ FILE* file) /* in: file where to print */
{ {
lock_t* lock;
trx_t* trx;
ulint space;
ulint page_no;
page_t* page;
ibool load_page_first = TRUE;
ulint nth_trx = 0;
ulint nth_lock = 0;
ulint i;
mtr_t mtr;
/* We must protect the MySQL thd->query field with a MySQL mutex, and /* We must protect the MySQL thd->query field with a MySQL mutex, and
because the MySQL mutex must be reserved before the kernel_mutex of because the MySQL mutex must be reserved before the kernel_mutex of
InnoDB, we call innobase_mysql_prepare_print_arbitrary_thd() here. */ InnoDB, we call innobase_mysql_prepare_print_arbitrary_thd() here. */
...@@ -4179,6 +4168,26 @@ lock_print_info( ...@@ -4179,6 +4168,26 @@ lock_print_info(
fprintf(file, fprintf(file,
"Total number of lock structs in row lock hash table %lu\n", "Total number of lock structs in row lock hash table %lu\n",
(ulong) lock_get_n_rec_locks()); (ulong) lock_get_n_rec_locks());
}
/*************************************************************************
Prints info of locks for each transaction. */
void
lock_print_info_all_transactions(
/*=============================*/
FILE* file) /* in: file where to print */
{
lock_t* lock;
ulint space;
ulint page_no;
page_t* page;
ibool load_page_first = TRUE;
ulint nth_trx = 0;
ulint nth_lock = 0;
ulint i;
mtr_t mtr;
trx_t* trx;
fprintf(file, "LIST OF TRANSACTIONS FOR EACH SESSION:\n"); fprintf(file, "LIST OF TRANSACTIONS FOR EACH SESSION:\n");
......
...@@ -1470,7 +1470,11 @@ Outputs to a file the output of the InnoDB Monitor. */ ...@@ -1470,7 +1470,11 @@ Outputs to a file the output of the InnoDB Monitor. */
void void
srv_printf_innodb_monitor( srv_printf_innodb_monitor(
/*======================*/ /*======================*/
FILE* file) /* in: output stream */ FILE* file, /* in: output stream */
ulint* trx_start, /* out: file position of the start of
the list of active transactions */
ulint* trx_end) /* out: file position of the end of
the list of active transactions */
{ {
double time_elapsed; double time_elapsed;
time_t current_time; time_t current_time;
...@@ -1519,7 +1523,24 @@ srv_printf_innodb_monitor( ...@@ -1519,7 +1523,24 @@ srv_printf_innodb_monitor(
mutex_exit(&dict_foreign_err_mutex); mutex_exit(&dict_foreign_err_mutex);
lock_print_info(file); lock_print_info_summary(file);
if (trx_start) {
long t = ftell(file);
if (t < 0) {
*trx_start = ULINT_UNDEFINED;
} else {
*trx_start = (ulint) t;
}
}
lock_print_info_all_transactions(file);
if (trx_end) {
long t = ftell(file);
if (t < 0) {
*trx_end = ULINT_UNDEFINED;
} else {
*trx_end = (ulint) t;
}
}
fputs("--------\n" fputs("--------\n"
"FILE I/O\n" "FILE I/O\n"
"--------\n", file); "--------\n", file);
...@@ -1672,13 +1693,13 @@ loop: ...@@ -1672,13 +1693,13 @@ loop:
last_monitor_time = time(NULL); last_monitor_time = time(NULL);
if (srv_print_innodb_monitor) { if (srv_print_innodb_monitor) {
srv_printf_innodb_monitor(stderr); srv_printf_innodb_monitor(stderr, NULL, NULL);
} }
if (srv_innodb_status) { if (srv_innodb_status) {
mutex_enter(&srv_monitor_file_mutex); mutex_enter(&srv_monitor_file_mutex);
rewind(srv_monitor_file); rewind(srv_monitor_file);
srv_printf_innodb_monitor(srv_monitor_file); srv_printf_innodb_monitor(srv_monitor_file, NULL, NULL);
os_file_set_eof(srv_monitor_file); os_file_set_eof(srv_monitor_file);
mutex_exit(&srv_monitor_file_mutex); mutex_exit(&srv_monitor_file_mutex);
} }
......
...@@ -42,7 +42,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \ ...@@ -42,7 +42,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \ bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \ strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \ ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \
ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo \ ctype-big5.lo ctype-cp932.lo ctype-czech.lo ctype-euc_kr.lo \
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \ ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \ ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \ ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
......
-- require r/have_cp932.require
disable_query_log;
show collation like "cp932_japanese_ci";
enable_query_log;
This diff is collapsed.
Collation Charset Id Default Compiled Sortlen
cp932_japanese_ci cp932 95 Yes Yes 1
This diff is collapsed.
# Tests with the latin1 character set
#
--disable_warnings
drop table if exists t1;
--enable_warnings
SET NAMES latin2;
CREATE TABLE t1 (a char(1) character set latin2);
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
#
# Bug#6504 upper/lower conversion bug
#
SELECT hex(a) ha, hex(lower(a)) hl, hex(upper(a)) hu,
a, lower(a) l, upper(a) u from t1 order by ha;
...@@ -88,6 +88,11 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -88,6 +88,11 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_cp1250_czech_ci); add_compiled_collation(&my_charset_cp1250_czech_ci);
#endif #endif
#ifdef HAVE_CHARSET_cp932
add_compiled_collation(&my_charset_cp932_japanese_ci);
add_compiled_collation(&my_charset_cp932_bin);
#endif
#ifdef HAVE_CHARSET_latin2 #ifdef HAVE_CHARSET_latin2
add_compiled_collation(&my_charset_latin2_czech_ci); add_compiled_collation(&my_charset_latin2_czech_ci);
#endif #endif
......
...@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID, ...@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
// Create a new file, and skip the first 69 bytes, // Create a new file, and skip the first 69 bytes,
// which are info about the current offset // which are info about the current offset
stream = fopen(theErrorFileName, "w"); stream = fopen(theErrorFileName, "w");
if(stream == NULL)
{
fprintf(stderr,"Unable to open error log file: %s\n", theErrorFileName);
return -1;
}
fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69, fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69,
" \n\n\n"); " \n\n\n");
......
...@@ -5183,8 +5183,12 @@ innodb_show_status( ...@@ -5183,8 +5183,12 @@ innodb_show_status(
/*===============*/ /*===============*/
THD* thd) /* in: the MySQL query thread of the caller */ THD* thd) /* in: the MySQL query thread of the caller */
{ {
Protocol *protocol= thd->protocol; Protocol* protocol = thd->protocol;
trx_t* trx; trx_t* trx;
static const char truncated_msg[] = "... truncated...\n";
const long MAX_STATUS_SIZE = 64000;
ulint trx_list_start = ULINT_UNDEFINED;
ulint trx_list_end = ULINT_UNDEFINED;
DBUG_ENTER("innodb_show_status"); DBUG_ENTER("innodb_show_status");
...@@ -5199,33 +5203,57 @@ innodb_show_status( ...@@ -5199,33 +5203,57 @@ innodb_show_status(
innobase_release_stat_resources(trx); innobase_release_stat_resources(trx);
/* We let the InnoDB Monitor to output at most 64000 bytes of text. */ /* We let the InnoDB Monitor to output at most MAX_STATUS_SIZE
bytes of text. */
long flen; long flen, usable_len;
char* str; char* str;
mutex_enter_noninline(&srv_monitor_file_mutex); mutex_enter_noninline(&srv_monitor_file_mutex);
rewind(srv_monitor_file); rewind(srv_monitor_file);
srv_printf_innodb_monitor(srv_monitor_file); srv_printf_innodb_monitor(srv_monitor_file,
&trx_list_start, &trx_list_end);
flen = ftell(srv_monitor_file); flen = ftell(srv_monitor_file);
os_file_set_eof(srv_monitor_file); os_file_set_eof(srv_monitor_file);
if (flen < 0) { if (flen < 0) {
flen = 0; flen = 0;
} else if (flen > 64000 - 1) { }
flen = 64000 - 1;
if (flen > MAX_STATUS_SIZE) {
usable_len = MAX_STATUS_SIZE;
} else {
usable_len = flen;
} }
/* allocate buffer for the string, and /* allocate buffer for the string, and
read the contents of the temporary file */ read the contents of the temporary file */
if (!(str = my_malloc(flen + 1, MYF(0)))) if (!(str = my_malloc(usable_len + 1, MYF(0))))
{ {
mutex_exit_noninline(&srv_monitor_file_mutex); mutex_exit_noninline(&srv_monitor_file_mutex);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
rewind(srv_monitor_file); rewind(srv_monitor_file);
if (flen < MAX_STATUS_SIZE) {
/* Display the entire output. */
flen = fread(str, 1, flen, srv_monitor_file); flen = fread(str, 1, flen, srv_monitor_file);
} else if (trx_list_end < (ulint) flen
&& trx_list_start < trx_list_end
&& trx_list_start + (flen - trx_list_end)
< MAX_STATUS_SIZE - sizeof truncated_msg - 1) {
/* Omit the beginning of the list of active transactions. */
long len = fread(str, 1, trx_list_start, srv_monitor_file);
memcpy(str + len, truncated_msg, sizeof truncated_msg - 1);
len += sizeof truncated_msg - 1;
usable_len = (MAX_STATUS_SIZE - 1) - len;
fseek(srv_monitor_file, flen - usable_len, SEEK_SET);
len += fread(str + len, 1, usable_len, srv_monitor_file);
flen = len;
} else {
/* Omit the end of the output. */
flen = fread(str, 1, MAX_STATUS_SIZE - 1, srv_monitor_file);
}
mutex_exit_noninline(&srv_monitor_file_mutex); mutex_exit_noninline(&srv_monitor_file_mutex);
......
...@@ -183,7 +183,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors) ...@@ -183,7 +183,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
that attempted to connect during the outage) unable to connect that attempted to connect during the outage) unable to connect
indefinitely. indefinitely.
*/ */
if (tmp_errno == HOST_NOT_FOUND || tmp_error == NO_DATA) if (tmp_errno == HOST_NOT_FOUND || tmp_errno == NO_DATA)
add_wrong_ip(in); add_wrong_ip(in);
my_gethostbyname_r_free(); my_gethostbyname_r_free();
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -207,13 +207,17 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors) ...@@ -207,13 +207,17 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
{ {
VOID(pthread_mutex_unlock(&LOCK_hostname)); VOID(pthread_mutex_unlock(&LOCK_hostname));
DBUG_PRINT("error",("gethostbyaddr returned %d",errno)); DBUG_PRINT("error",("gethostbyaddr returned %d",errno));
goto err;
if (errno == HOST_NOT_FOUND || errno == NO_DATA)
add_wrong_ip(in); /* only cache negative responses, not failures */
DBUG_RETURN(0);
} }
if (!hp->h_name[0]) // Don't allow empty hostnames if (!hp->h_name[0]) // Don't allow empty hostnames
{ {
VOID(pthread_mutex_unlock(&LOCK_hostname)); VOID(pthread_mutex_unlock(&LOCK_hostname));
DBUG_PRINT("error",("Got an empty hostname")); DBUG_PRINT("error",("Got an empty hostname"));
goto err; goto add_wrong_ip_and_return;
} }
if (!(name=my_strdup(hp->h_name,MYF(0)))) if (!(name=my_strdup(hp->h_name,MYF(0))))
{ {
...@@ -240,7 +244,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors) ...@@ -240,7 +244,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
{ {
DBUG_PRINT("error",("mysqld doesn't accept hostnames that starts with a number followed by a '.'")); DBUG_PRINT("error",("mysqld doesn't accept hostnames that starts with a number followed by a '.'"));
my_free(name,MYF(0)); my_free(name,MYF(0));
goto err; goto add_wrong_ip_and_return;
} }
} }
...@@ -256,7 +260,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors) ...@@ -256,7 +260,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
DBUG_PRINT("error",("Couldn't verify hostname with gethostbyname")); DBUG_PRINT("error",("Couldn't verify hostname with gethostbyname"));
my_free(name,MYF(0)); my_free(name,MYF(0));
err: add_wrong_ip_and_return:
add_wrong_ip(in); add_wrong_ip(in);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
<?xml version='1.0' encoding="utf-8"?> <?xml version='1.0' encoding="utf-8"?>
<charsets max-id="94"> <charsets max-id="96">
<copyright> <copyright>
Copyright (C) 2003 MySQL AB Copyright (C) 2003 MySQL AB
...@@ -553,5 +553,25 @@ To make maintaining easier please: ...@@ -553,5 +553,25 @@ To make maintaining easier please:
</collation> </collation>
</charset> </charset>
<charset name="cp932">
<family>Japanese</family>
<description>SJIS for Windows Japanese</description>
<alias>windows-31j</alias>
<alias>cswindows31j</alias>
<alias>sjisms</alias>
<alias>windows-95j</alias>
<alias>x-sjis-cp932</alias>
<alias>ms932</alias>
<alias>sjisms</alias>
<collation name="cp932_japanese_ci" id="95" order="Japanese">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
<collation name="cp932_bin" id="96" order="Binary">
<flag>binary</flag>
<flag>compiled</flag>
</collation>
</charset>
</charsets> </charsets>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
A0 B1 A2 B3 A4 B5 B6 A7 A8 B9 BA BB BC AD BE BF A0 B1 A2 B3 A4 B5 B6 A7 A8 B9 BA BB BC AD BE BF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
D0 F1 F2 F3 F4 F5 F6 D7 F8 F9 FA FB FC FD FE DF F0 F1 F2 F3 F4 F5 F6 D7 F8 F9 FA FB FC FD FE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map> </map>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
F0 D1 D2 D3 D4 D5 D6 F7 D8 D9 DA DB DC DD DE FF D0 D1 D2 D3 D4 D5 D6 F7 D8 D9 DA DB DC DD DE FF
</map> </map>
</upper> </upper>
......
...@@ -22,26 +22,26 @@ pkglib_LIBRARIES = libmystrings.a ...@@ -22,26 +22,26 @@ pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X # Exact one of ASSEMBLER_X
if ASSEMBLER_x86 if ASSEMBLER_x86
ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c
else else
if ASSEMBLER_sparc32 if ASSEMBLER_sparc32
# These file MUST all be on the same line!! Otherwise automake # These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile # generats a very broken makefile
ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c my_strtoll10.c CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c my_strtoll10.c
else else
#no assembler #no assembler
ASRCS = ASRCS =
# These file MUST all be on the same line!! Otherwise automake # These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile # generats a very broken makefile
CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c my_strtoll10.c CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c my_strtoll10.c
endif endif
endif endif
libmystrings_a_SOURCES = $(ASRCS) $(CSRCS) libmystrings_a_SOURCES = $(ASRCS) $(CSRCS)
noinst_PROGRAMS = conf_to_src noinst_PROGRAMS = conf_to_src
# Default charset definitions # Default charset definitions
EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-win1250ch.c \ EXTRA_DIST = ctype-big5.c ctype-cp932.c ctype-czech.c ctype-euc_kr.c ctype-win1250ch.c \
ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c \ ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c \
ctype-ucs2.c ctype-uca.c ctype-tis620.c ctype-ujis.c \ ctype-ucs2.c ctype-uca.c ctype-tis620.c ctype-ujis.c \
xml.c strto.c strings-x86.s \ xml.c strto.c strings-x86.s \
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment