From f8f7e4591918dbada386d4f6b2afc527d5df29ac Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Oct 2004 15:00:39 +0300 Subject: [PATCH 1/8] srv0srv.c: If innodb_thread_concurrency would be exceeded, let a thread sleep 10 ms before entering the FIFO queue; previously, the value was 50 ms, which Peter Z considered too long innobase/srv/srv0srv.c: If innodb_thread_concurrency would be exceeded, let a thread sleep 10 ms before entering the FIFO queue; previously, the value was 50 ms, which Peter Z considered too long --- innobase/srv/srv0srv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index d913d77fdfc..b34ae9f36f4 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -951,7 +951,13 @@ retry: trx->op_info = "sleeping before joining InnoDB queue"; - os_thread_sleep(50000); + /* Peter Zaitsev suggested that we take the sleep away + altogether. But the sleep may be good in pathological + situations of lots of thread switches. Simply put some + threads aside for a while to reduce the number of thread + switches. */ + + os_thread_sleep(10000); trx->op_info = ""; From 1412365a3f277d562d016e353ad0240eba4697e5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Oct 2004 17:56:25 +0500 Subject: [PATCH 2/8] Bug #6139 UNION doesn't understand collate in the column of second select --- mysql-test/r/union.result | 78 +++++++++++++++++++++++++++++++++++++++ mysql-test/t/union.test | 55 +++++++++++++++++++++++++++ sql/item.cc | 4 +- sql/sql_union.cc | 17 +++++++++ 4 files changed, 152 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index fbd4f8e11dc..7820cd1d6ff 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1033,3 +1033,81 @@ a No aaa,bbb drop table t1,t2,t3,t4; +create table t1 as +(select _latin1'test') union +(select _latin1'TEST') union +(select _latin1'TeST'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `test` char(4) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +1 +drop table t1; +create table t1 as +(select _latin1'test' collate latin1_bin) union +(select _latin1'TEST') union +(select _latin1'TeST'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `_latin1'test' collate latin1_bin` char(4) character set latin1 collate latin1_bin NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +3 +drop table t1; +create table t1 as +(select _latin1'test') union +(select _latin1'TEST' collate latin1_bin) union +(select _latin1'TeST'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `test` char(4) character set latin1 collate latin1_bin NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +3 +drop table t1; +create table t1 as +(select _latin1'test') union +(select _latin1'TEST') union +(select _latin1'TeST' collate latin1_bin); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `test` char(4) character set latin1 collate latin1_bin NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +3 +drop table t1; +create table t2 ( +a char character set latin1 collate latin1_swedish_ci, +b char character set latin1 collate latin1_bin); +create table t1 as +(select a from t2) union +(select b from t2); +ERROR HY000: Illegal mix of collations for operation 'UNION' +create table t1 as +(select a collate latin1_german1_ci from t2) union +(select b from t2); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a collate latin1_german1_ci` char(1) character set latin1 collate latin1_german1_ci default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 as +(select a from t2) union +(select b collate latin1_german1_ci from t2); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(1) character set latin1 collate latin1_german1_ci default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +drop table t2; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index c5e72e85835..6e16a2b02aa 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -595,3 +595,58 @@ select a as a from t3 union select "1"; select a as a from t4 union select a from t3; select a as a from t1 union select a from t4; drop table t1,t2,t3,t4; + +# +# Bug #6139 UNION doesn't understand collate in the column of second select +# +create table t1 as +(select _latin1'test') union +(select _latin1'TEST') union +(select _latin1'TeST'); +show create table t1; +select count(*) from t1; +drop table t1; + +create table t1 as +(select _latin1'test' collate latin1_bin) union +(select _latin1'TEST') union +(select _latin1'TeST'); +show create table t1; +select count(*) from t1; +drop table t1; + +create table t1 as +(select _latin1'test') union +(select _latin1'TEST' collate latin1_bin) union +(select _latin1'TeST'); +show create table t1; +select count(*) from t1; +drop table t1; + +create table t1 as +(select _latin1'test') union +(select _latin1'TEST') union +(select _latin1'TeST' collate latin1_bin); +show create table t1; +select count(*) from t1; +drop table t1; + +create table t2 ( +a char character set latin1 collate latin1_swedish_ci, +b char character set latin1 collate latin1_bin); +--error 1271 +create table t1 as +(select a from t2) union +(select b from t2); +create table t1 as +(select a collate latin1_german1_ci from t2) union +(select b from t2); +show create table t1; +drop table t1; +create table t1 as +(select a from t2) union +(select b collate latin1_german1_ci from t2); +show create table t1; +drop table t1; +drop table t2; + diff --git a/sql/item.cc b/sql/item.cc index 0366ea29485..304579d65a2 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2558,8 +2558,8 @@ bool Item_type_holder::join_types(THD *thd, Item *item) if (use_new_field || use_expression_type || (new_result_type != item_type) || (new_length > max_length) || (!maybe_null && item->maybe_null) || - (item_type == STRING_RESULT && - !my_charset_same(collation.collation, item->collation.collation))) + (item_type == STRING_RESULT && + collation.collation != item->collation.collation)) { if (use_expression_type || item->type() != Item::FIELD_ITEM) field_example= 0; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index b46cfc05538..6b5d27270c9 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -264,6 +264,23 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } } + { + /* + Check that it was possible to aggregate all collations together. + */ + List_iterator_fast tp(types); + Item *type; + while ((type= tp++)) + { + if (type->result_type() == STRING_RESULT && + type->collation.derivation == DERIVATION_NONE) + { + my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), "UNION"); + goto err; + } + } + } + // it is not single select if (first_select->next_select()) { From e49389334ccdaf23a56a52064741d606f0c2db27 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Oct 2004 16:00:57 +0300 Subject: [PATCH 3/8] InnoDB: Treat UTF-8 strings properly in case insensitive operations innobase/dict/dict0dict.c: Use innobase_strcasecmp() and innobase_casedn_str() instead of ut_cmp_in_lower_case() and ut_cpy_in_lower_case() innobase/include/ut0byte.h: Remove ut_cpy_in_lower_case() and ut_cmp_in_lower_case() innobase/ut/ut0byte.c: Remove ut_cpy_in_lower_case() and ut_cmp_in_lower_case() sql/ha_innodb.cc: Add innobase_strcasecmp() and innobase_casedn_str() Replace tolower() loop with innobase_casedn_str() Replace my_casedn_str() with innobase_casedn_str() Replace ut_cmp_in_lower_case() with innobase_strcasecmp() --- innobase/dict/dict0dict.c | 59 +++++++++++++++++++++++--------------- innobase/include/ut0byte.h | 19 ------------ innobase/ut/ut0byte.c | 48 ------------------------------- sql/ha_innodb.cc | 47 ++++++++++++++++++++++-------- 4 files changed, 71 insertions(+), 102 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index f670c0dc16d..c3d0d8d9ac1 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -53,6 +53,30 @@ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve /* Identifies generated InnoDB foreign key names */ static char dict_ibfk[] = "_ibfk_"; +/********************************************************************** +Compares NUL-terminated UTF-8 strings case insensitively. + +NOTE: the prototype of this function is copied from ha_innodb.cc! If you change +this function, you MUST change also the prototype here! */ +extern +int +innobase_strcasecmp( +/*================*/ + /* out: 0 if a=b, <0 if a1 if a>b */ + const char* a, /* in: first string to compare */ + const char* b); /* in: second string to compare */ + +/********************************************************************** +Makes all characters in a NUL-terminated UTF-8 string lower case. + +NOTE: the prototype of this function is copied from ha_innodb.cc! If you change +this function, you MUST change also the prototype here! */ +extern +void +innobase_casedn_str( +/*================*/ + char* a); /* in/out: string to put in lower case */ + /************************************************************************** Adds a column to the data dictionary hash table. */ static @@ -2066,7 +2090,7 @@ dict_foreign_find_index( break; } - if (0 != ut_cmp_in_lower_case(columns[i], + if (0 != innobase_strcasecmp(columns[i], col_name)) { break; } @@ -2436,7 +2460,7 @@ dict_scan_col( col = dict_table_get_nth_col(table, i); - if (0 == ut_cmp_in_lower_case(col->name, *name)) { + if (0 == innobase_strcasecmp(col->name, *name)) { /* Found */ *success = TRUE; @@ -2528,30 +2552,19 @@ dict_scan_table_name( table_name_len = strlen(table_name); + /* Copy database_name, '/', table_name, '\0' */ ref = mem_heap_alloc(heap, database_name_len + table_name_len + 2); - -#ifdef __WIN__ - ut_cpy_in_lower_case(ref, database_name, database_name_len); -#else + memcpy(ref, database_name, database_name_len); + ref[database_name_len] = '/'; + memcpy(ref + database_name_len + 1, table_name, table_name_len + 1); +#ifndef __WIN__ if (srv_lower_case_table_names) { - ut_cpy_in_lower_case(ref, database_name, database_name_len); - } else { - memcpy(ref, database_name, database_name_len); +#endif /* !__WIN__ */ + /* The table name is always put to lower case on Windows. */ + innobase_casedn_str(ref); +#ifndef __WIN__ } -#endif - (ref)[database_name_len] = '/'; - -#ifdef __WIN__ - ut_cpy_in_lower_case(ref + database_name_len + 1, - table_name, table_name_len + 1); -#else - if (srv_lower_case_table_names) { - ut_cpy_in_lower_case(ref + database_name_len + 1, - table_name, table_name_len + 1); - } else { - strcpy(ref + database_name_len + 1, table_name); - } -#endif +#endif /* !__WIN__ */ *success = TRUE; *ref_name = ref; diff --git a/innobase/include/ut0byte.h b/innobase/include/ut0byte.h index fed6a23d144..a62c2e2e318 100644 --- a/innobase/include/ut0byte.h +++ b/innobase/include/ut0byte.h @@ -229,25 +229,6 @@ ut_bit_set_nth( ulint a, /* in: ulint */ ulint n, /* in: nth bit requested */ ibool val); /* in: value for the bit to set */ -/**************************************************************** -Copies a string to a memory location, setting characters to lower case. */ - -void -ut_cpy_in_lower_case( -/*=================*/ - char* dest, /* in: destination */ - const char* source, /* in: source */ - ulint len); /* in: string length */ -/**************************************************************** -Compares two strings when converted to lower case. */ - -int -ut_cmp_in_lower_case( -/*=================*/ - /* out: -1, 0, 1 if str1 < str2, str1 == str2, - str1 > str2, respectively */ - const char* str1, /* in: string1 */ - const char* str2); /* in: string2 */ #ifndef UNIV_NONINL #include "ut0byte.ic" diff --git a/innobase/ut/ut0byte.c b/innobase/ut/ut0byte.c index 8764103dc36..cc83aacc90b 100644 --- a/innobase/ut/ut0byte.c +++ b/innobase/ut/ut0byte.c @@ -29,51 +29,3 @@ ut_dulint_sort(dulint* arr, dulint* aux_arr, ulint low, ulint high) UT_SORT_FUNCTION_BODY(ut_dulint_sort, arr, aux_arr, low, high, ut_dulint_cmp); } - -/**************************************************************** -Copies a string to a memory location, setting characters to lower case. */ - -void -ut_cpy_in_lower_case( -/*=================*/ - char* dest, /* in: destination */ - const char* source, /* in: source */ - ulint len) /* in: string length */ -{ - ulint i; - - for (i = 0; i < len; i++) { - dest[i] = tolower(source[i]); - } -} - -/**************************************************************** -Compares two strings when converted to lower case. */ - -int -ut_cmp_in_lower_case( -/*=================*/ - /* out: -1, 0, 1 if str1 < str2, str1 == str2, - str1 > str2, respectively */ - const char* str1, /* in: string1 */ - const char* str2) /* in: string2 */ -{ - for (;;) { - int c1, c2; - if (!*str1) { - return(*str2 ? -1 : 0); - } else if (!*str2) { - return 1; - } - c1 = tolower(*str1++); - c2 = tolower(*str2++); - if (c1 < c2) { - return(-1); - } - if (c1 > c2) { - return(1); - } - } - - return(0); -} diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 28f95611ae7..14c16890e65 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -429,6 +429,36 @@ innobase_mysql_print_thd( putc('\n', f); } +/********************************************************************** +Compares NUL-terminated UTF-8 strings case insensitively. + +NOTE that the exact prototype of this function has to be in +/innobase/dict/dict0dict.c! */ +extern "C" +int +innobase_strcasecmp( +/*================*/ + /* out: 0 if a=b, <0 if a1 if a>b */ + const char* a, /* in: first string to compare */ + const char* b) /* in: second string to compare */ +{ + return(my_strcasecmp(system_charset_info, a, b)); +} + +/********************************************************************** +Makes all characters in a NUL-terminated UTF-8 string lower case. + +NOTE that the exact prototype of this function has to be in +/innobase/dict/dict0dict.c! */ +extern "C" +void +innobase_casedn_str( +/*================*/ + char* a) /* in/out: string to put in lower case */ +{ + my_casedn_str(system_charset_info, a); +} + /************************************************************************* Creates a temporary file. */ extern "C" @@ -687,14 +717,7 @@ innobase_query_caching_of_table_permitted( separator between db and table */ norm_name[full_name_len] = '\0'; #ifdef __WIN__ - /* Put to lower case */ - - char* ptr = norm_name; - - while (*ptr != '\0') { - *ptr = tolower(*ptr); - ptr++; - } + innobase_casedn_str(norm_name); #endif /* The call of row_search_.. will start a new transaction if it is not yet started */ @@ -3559,9 +3582,9 @@ create_index( field = form->field[j]; - if (0 == ut_cmp_in_lower_case( - (char*)field->field_name, - (char*)key_part->field->field_name)) { + if (0 == innobase_strcasecmp( + field->field_name, + key_part->field->field_name)) { /* Found the corresponding column */ break; @@ -4003,7 +4026,7 @@ innobase_drop_database( namebuf[len] = '/'; namebuf[len + 1] = '\0'; #ifdef __WIN__ - my_casedn_str(system_charset_info, namebuf); + innobase_casedn_str(namebuf); #endif trx = trx_allocate_for_mysql(); trx->mysql_thd = current_thd; From 0cef3945a447be357d478e105175e7be971bb575 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Oct 2004 16:59:15 +0300 Subject: [PATCH 4/8] ha_innodb.cc: Replace a tolower() loop with innobase_casedn_str() sql/ha_innodb.cc: Replace a tolower() loop with innobase_casedn_str() --- sql/ha_innodb.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 14c16890e65..35a51837449 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1562,14 +1562,7 @@ normalize_table_name( norm_name[name_ptr - db_ptr - 1] = '/'; #ifdef __WIN__ - /* Put to lower case */ - - ptr = norm_name; - - while (*ptr != '\0') { - *ptr = tolower(*ptr); - ptr++; - } + innobase_casedn_str(norm_name); #endif } From 234a8ec06113e3b7533c9302a8a1fcbbb18e2fa4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Oct 2004 10:40:59 +0500 Subject: [PATCH 5/8] Dumping BLOBs in HEX notation. The patch was orinigally contributed by Takeshi. I also added HEX support for "extended-inserts". --- client/client_priv.h | 2 +- client/mysqldump.c | 61 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 328c051905c..f16ec0e802b 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -45,5 +45,5 @@ enum options_client OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, - OPT_SIGINT_IGNORE + OPT_SIGINT_IGNORE, OPT_HEXBLOB }; diff --git a/client/mysqldump.c b/client/mysqldump.c index 56505afd235..1686278096b 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -81,7 +81,8 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick= 1, extended_insert= 1, opt_alldbs=0,opt_create_db=0,opt_first_slave=0,opt_set_charset, opt_autocommit=0,opt_master_data,opt_disable_keys=1,opt_xml=0, opt_delete_master_logs=0, tty_password=0, - opt_single_transaction=0, opt_comments= 0, opt_compact= 0; + opt_single_transaction=0, opt_comments= 0, opt_compact= 0, + opt_hex_blob=0; static ulong opt_max_allowed_packet, opt_net_buffer_length; static MYSQL mysql_connection,*sock=0; static char insert_pat[12 * 1024],*opt_password=0,*current_user=0, @@ -316,6 +317,8 @@ static struct my_option my_long_options[] = {"comments", 'i', "Write additional information.", (gptr*) &opt_comments, (gptr*) &opt_comments, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, + {"hex-blob", OPT_HEXBLOB, "Dump BLOBs in HEX. this mode does not work with extended-insert", + (gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -1507,6 +1510,7 @@ static void dumpTable(uint numFields, char *table) for (i = 0; i < mysql_num_fields(res); i++) { + int is_blob; if (!(field = mysql_fetch_field(res))) { sprintf(query,"%s: Not enough fields from table %s! Aborting.\n", @@ -1515,6 +1519,17 @@ static void dumpTable(uint numFields, char *table) error= EX_CONSCHECK; goto err; } + + /* + 63 is my_charset_bin. If charsetnr is not 63, + we have not a BLOB but a TEXT column. + we'll dump it in hex only BLOB columns. + */ + is_blob= (opt_hex_blob && field->charsetnr == 63 && + (field->type == FIELD_TYPE_BLOB || + field->type == FIELD_TYPE_LONG_BLOB || + field->type == FIELD_TYPE_MEDIUM_BLOB || + field->type == FIELD_TYPE_TINY_BLOB)) ? 1 : 0; if (extended_insert) { ulong length = lengths[i]; @@ -1535,12 +1550,28 @@ static void dumpTable(uint numFields, char *table) error= EX_EOM; goto err; } - dynstr_append(&extended_row,"'"); - extended_row.length += - mysql_real_escape_string(&mysql_connection, - &extended_row.str[extended_row.length],row[i],length); - extended_row.str[extended_row.length]='\0'; - dynstr_append(&extended_row,"'"); + if (opt_hex_blob && is_blob) + { + ulong counter; + unsigned char *ptr= row[i]; + dynstr_append(&extended_row, "0x"); + for (counter = 0; counter < lengths[i]; counter++) + { + char xx[3]; + sprintf(xx, "%02X", ptr[counter]); + dynstr_append(&extended_row, xx); + } + } + else + { + dynstr_append(&extended_row,"'"); + extended_row.length += + mysql_real_escape_string(&mysql_connection, + &extended_row.str[extended_row.length], + row[i],length); + extended_row.str[extended_row.length]='\0'; + dynstr_append(&extended_row,"'"); + } } else { @@ -1591,8 +1622,20 @@ static void dumpTable(uint numFields, char *table) print_quoted_xml(md_result_file, row[i], lengths[i]); fputs("\n", md_result_file); } - else - unescape(md_result_file, row[i], lengths[i]); + else if (opt_hex_blob && is_blob) + { /* sakaik got this idea. */ + ulong counter; + char xx[4]; + unsigned char *ptr= row[i]; + fputs("0x", md_result_file); + for (counter = 0; counter < lengths[i]; counter++) + { + sprintf(xx, "%02X", ptr[counter]); + fputs(xx, md_result_file); + } + } + else + unescape(md_result_file, row[i], lengths[i]); } else { From ad8865cbd7dd4eda775a7abbb7ecaec0b230cfc1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Oct 2004 11:45:33 +0500 Subject: [PATCH 6/8] sql_union.cc: Check DERIVATION_NONE only for UNIONS. sql/sql_union.cc: Check DERIVATION_NONE only for UNIONS. --- sql/sql_union.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 6b5d27270c9..fc2d2a3a5e4 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -264,9 +264,14 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, } } + if (first_select->next_select()) { + + // it is not single select + /* - Check that it was possible to aggregate all collations together. + Check that it was possible to aggregate + all collations together for UNION. */ List_iterator_fast tp(types); Item *type; @@ -279,11 +284,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, goto err; } } - } - // it is not single select - if (first_select->next_select()) - { union_result->tmp_table_param.field_count= types.elements; if (!(table= create_tmp_table(thd_arg, &union_result->tmp_table_param, types, From 5d14a6eef401d3b214c041224c335b61169c4436 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Oct 2004 13:00:01 +0500 Subject: [PATCH 7/8] CHARSET_INFO.txt: minor fixes strings/CHARSET_INFO.txt: minor fixes --- strings/CHARSET_INFO.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/strings/CHARSET_INFO.txt b/strings/CHARSET_INFO.txt index e8c13996707..883000e7ade 100644 --- a/strings/CHARSET_INFO.txt +++ b/strings/CHARSET_INFO.txt @@ -58,8 +58,7 @@ using its non-default counterpart for the given character set. binary_numner - ID of a charset+collation pair, which consists of the same character set and the binary collation of this -character set. Not really used now. Intended to optimize -"SELECT BINARY x" in the future. +character set. Not really used now. Names ----- @@ -121,7 +120,7 @@ Misc fields e.g. Letter 'A' with two dots above is substituted with 'AE'. mbminlen - mininum multibyte sequence length. - Now always 1 accept ucs2. For ucs2 + Now always 1 except ucs2. For ucs2 it is 2. mbmaxlen - maximum multibyte sequence length. 1 for 8bit charsets. Can be also 2 or 3. From 193628565bc2ed093030b5bf9c33ab27d0cabdd8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Oct 2004 14:44:14 +0300 Subject: [PATCH 8/8] os0file.c: InnoDB: print info about how many bytes we were able to read if a file read is not able to read as many bytes as we requested innobase/os/os0file.c: InnoDB: print info about how many bytes we were able to read if a file read is not able to read as many bytes as we requested --- innobase/os/os0file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 1040283f85e..6b734bba965 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -2010,6 +2010,11 @@ try_again: return(TRUE); } + + fprintf(stderr, +"InnoDB: Error: tried to read %lu bytes at offset %lu %lu.\n" +"InnoDB: Was only able to read %ld.\n", (ulong)n, (ulong)offset_high, + (ulong)offset, (long)ret); #endif #ifdef __WIN__ error_handling: