From 2131786204edb6fd20d409981f4f76a55f600329 Mon Sep 17 00:00:00 2001 From: "mwagner@here.mwagner.org" <> Date: Thu, 6 Jan 2005 22:30:23 -0600 Subject: [PATCH 01/24] Bootstrap: Made the default --mail address to be . --- Build-tools/Bootstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap index 10211dbb59c..10ebc5c2dd1 100755 --- a/Build-tools/Bootstrap +++ b/Build-tools/Bootstrap @@ -38,7 +38,7 @@ $opt_dry_run= undef; $opt_export_only= undef; $opt_help= $opt_verbose= 0; $opt_log= undef; -$opt_mail= ""; +$opt_mail= "build\@mysql.com"; $opt_pull= undef; $opt_revision= undef; $opt_suffix= ""; @@ -431,6 +431,7 @@ Options: include a log file snippet, if logging is enabled) Note that the \@-Sign needs to be quoted! Example: --mail=user\\\@domain.com + Default: build\@mysql.com -q, --quiet Be quiet -p, --pull Update the source BK trees before building -r, --revision= Export the tree as of revision From 0d8bfc5f92f82a89d77296377b1ebf7f39d68a6a Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Sun, 9 Jan 2005 02:19:42 +0100 Subject: [PATCH 02/24] Replace all sprintf() calls with my_snprintf() in client.c. All of the format strings (in all languages) already included field limits on the specifiers, so this is just protection against future mistakes. (Bug #7556) --- sql-common/client.c | 60 ++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/sql-common/client.c b/sql-common/client.c index b6813ee4cfc..7264605b247 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -321,8 +321,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host, { net->last_errno=CR_NAMEDPIPEOPEN_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),host, unix_socket, - (ulong) GetLastError()); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno), host, unix_socket, + (ulong) GetLastError()); return INVALID_HANDLE_VALUE; } /* wait for for an other instance */ @@ -330,8 +331,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host, { net->last_errno=CR_NAMEDPIPEWAIT_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),host, unix_socket, - (ulong) GetLastError()); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno), host, unix_socket, + (ulong) GetLastError()); return INVALID_HANDLE_VALUE; } } @@ -339,8 +341,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host, { net->last_errno=CR_NAMEDPIPEOPEN_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),host, unix_socket, - (ulong) GetLastError()); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno), host, unix_socket, + (ulong) GetLastError()); return INVALID_HANDLE_VALUE; } dwMode = PIPE_READMODE_BYTE | PIPE_WAIT; @@ -349,8 +352,9 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host, CloseHandle( hPipe ); net->last_errno=CR_NAMEDPIPESETSTATE_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),host, unix_socket, - (ulong) GetLastError()); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno),host, unix_socket, + (ulong) GetLastError()); return INVALID_HANDLE_VALUE; } *arg_host=host ; *arg_unix_socket=unix_socket; /* connect arg */ @@ -563,9 +567,11 @@ err: net->last_errno=error_allow; strmov(net->sqlstate, unknown_sqlstate); if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR) - sprintf(net->last_error,ER(net->last_errno),suffix_pos,error_code); + my_snprintf(net->last_error,sizeof(net->last_error)-1, + ER(net->last_errno),suffix_pos,error_code); else - sprintf(net->last_error,ER(net->last_errno),error_code); + my_snprintf(net->last_error,sizeof(net->last_error)-1, + ER(net->last_errno),error_code); return(INVALID_HANDLE_VALUE); } return(handle_map); @@ -794,7 +800,8 @@ static int check_license(MYSQL *mysql) if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE) { net->last_errno= CR_WRONG_LICENSE; - sprintf(net->last_error, ER(net->last_errno), required_license); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno), required_license); } return 1; } @@ -811,7 +818,8 @@ static int check_license(MYSQL *mysql) strncmp(row[0], required_license, sizeof(required_license)))) { net->last_errno= CR_WRONG_LICENSE; - sprintf(net->last_error, ER(net->last_errno), required_license); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(net->last_errno), required_license); } mysql_free_result(res); return net->last_errno; @@ -1628,7 +1636,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, sock=0; unix_socket = 0; host=mysql->options.shared_memory_base_name; - sprintf(host_info=buff, ER(CR_SHARED_MEMORY_CONNECTION), host); + my_snprintf(host_info=buff, sizeof(buff)-1, + ER(CR_SHARED_MEMORY_CONNECTION), host); } } #endif /* HAVE_SMEM */ @@ -1648,7 +1657,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, { net->last_errno=CR_SOCKET_CREATE_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),socket_errno); + my_snprintf(net->last_error,sizeof(net->last_error)-1, + ER(net->last_errno),socket_errno); goto error; } net->vio = vio_new(sock, VIO_TYPE_SOCKET, TRUE); @@ -1662,7 +1672,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, socket_errno)); net->last_errno=CR_CONNECTION_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),unix_socket,socket_errno); + my_snprintf(net->last_error,sizeof(net->last_error)-1, + ER(net->last_errno),unix_socket,socket_errno); goto error; } mysql->options.protocol=MYSQL_PROTOCOL_SOCKET; @@ -1692,7 +1703,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, else { net->vio=vio_new_win32pipe(hPipe); - sprintf(host_info=buff, ER(CR_NAMEDPIPE_CONNECTION), unix_socket); + my_snprintf(host_info=buff, sizeof(buff)-1, + ER(CR_NAMEDPIPE_CONNECTION), unix_socket); } } #endif @@ -1705,7 +1717,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, port=mysql_port; if (!host) host=LOCAL_HOST; - sprintf(host_info=buff,ER(CR_TCP_CONNECTION),host); + my_snprintf(host_info=buff,sizeof(buff)-1,ER(CR_TCP_CONNECTION),host); DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host,port)); #ifdef MYSQL_SERVER thr_alarm_init(&alarmed); @@ -1720,7 +1732,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, { net->last_errno=CR_IPSOCK_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error,ER(net->last_errno),socket_errno); + my_snprintf(net->last_error,sizeof(net->last_error)-1, + ER(net->last_errno),socket_errno); goto error; } net->vio = vio_new(sock,VIO_TYPE_TCPIP,FALSE); @@ -1747,7 +1760,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, my_gethostbyname_r_free(); net->last_errno=CR_UNKNOWN_HOST; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, tmp_errno); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(CR_UNKNOWN_HOST), host, tmp_errno); goto error; } memcpy(&sock_addr.sin_addr, hp->h_addr, @@ -1762,7 +1776,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, host)); net->last_errno= CR_CONN_HOST_ERROR; strmov(net->sqlstate, unknown_sqlstate); - sprintf(net->last_error ,ER(CR_CONN_HOST_ERROR), host, socket_errno); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(CR_CONN_HOST_ERROR), host, socket_errno); goto error; } } @@ -1815,8 +1830,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, { strmov(net->sqlstate, unknown_sqlstate); net->last_errno= CR_VERSION_ERROR; - sprintf(net->last_error, ER(CR_VERSION_ERROR), mysql->protocol_version, - PROTOCOL_VERSION); + my_snprintf(net->last_error, sizeof(net->last_error)-1, + ER(CR_VERSION_ERROR), mysql->protocol_version, + PROTOCOL_VERSION); goto error; } end=strend((char*) net->read_pos+1); From c9f7f0ffcf5f117f0f65fc9e375e13f394b0f87b Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Mon, 10 Jan 2005 11:17:01 +0100 Subject: [PATCH 03/24] bug#7761 - ndb does not autocommit during alter table --- sql/sql_table.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 43f466282b1..52f178946c4 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3447,6 +3447,19 @@ copy_data_between_tables(TABLE *from,TABLE *to, if (!(copy= new Copy_field[to->fields])) DBUG_RETURN(-1); /* purecov: inspected */ + /* + Turn off recovery logging since rollback of an alter table is to + delete the new table so there is no need to log the changes to it. + + This needs to be done before external_lock + */ + error= ha_enable_transaction(thd,FALSE); + if (error) + { + DBUG_RETURN(-1); + } + + if (to->file->external_lock(thd, F_WRLCK)) DBUG_RETURN(-1); from->file->info(HA_STATUS_VARIABLE); @@ -3502,17 +3515,6 @@ copy_data_between_tables(TABLE *from,TABLE *to, goto err; }; - /* - Turn off recovery logging since rollback of an alter table is to - delete the new table so there is no need to log the changes to it. - */ - error= ha_enable_transaction(thd,FALSE); - if (error) - { - error= 1; - goto err; - } - /* Handler must be told explicitly to retrieve all columns, because this function does not set field->query_id in the columns to the current query id */ From 4ddd79fb69dd090240f0639b56551cf7e96370d8 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Mon, 10 Jan 2005 11:33:08 +0100 Subject: [PATCH 04/24] bug#7761 - ndb does not autcommit - postreview fixes --- sql/sql_table.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 52f178946c4..f9f635081cb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3444,21 +3444,18 @@ copy_data_between_tables(TABLE *from,TABLE *to, ulong save_sql_mode; DBUG_ENTER("copy_data_between_tables"); - if (!(copy= new Copy_field[to->fields])) - DBUG_RETURN(-1); /* purecov: inspected */ - /* Turn off recovery logging since rollback of an alter table is to delete the new table so there is no need to log the changes to it. This needs to be done before external_lock */ - error= ha_enable_transaction(thd,FALSE); + error= ha_enable_transaction(thd, FALSE); if (error) - { DBUG_RETURN(-1); - } - + + if (!(copy= new Copy_field[to->fields])) + DBUG_RETURN(-1); /* purecov: inspected */ if (to->file->external_lock(thd, F_WRLCK)) DBUG_RETURN(-1); From 3439ce4ee33b2b0e9069a03b2f1894c8986ad59b Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Mon, 10 Jan 2005 13:52:32 +0100 Subject: [PATCH 05/24] Fix for BUG#7658 "optimize crashes slave thread (1 in 1000)]": mysql_admin_table() attempted to write to a vio which was 0. I could have fixed mysql_admin_table() but fixing my_net_write() looked more future-proof. --- sql/net_serv.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index e5cb4d1e815..cad1f041005 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -227,6 +227,8 @@ int my_net_write(NET *net,const char *packet,ulong len) { uchar buff[NET_HEADER_SIZE]; + if (unlikely(!net->vio)) // nowhere to write + return 0; /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH length. The last packet is always a packet that is < MAX_PACKET_LENGTH. From 59b9a5289a715a95cbaedc6beea1dea91f4fa5d4 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Mon, 10 Jan 2005 15:26:33 +0200 Subject: [PATCH 06/24] os0file.c: Fix compiler error on those OS X platforms where Apple's special file flush trick with fcntl() is not defined --- innobase/os/os0file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index f02b81b8fd8..60760d1f8b8 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -1763,7 +1763,7 @@ os_file_flush( #else int ret; -#ifdef HAVE_DARWIN_THREADS +#if defined(HAVE_DARWIN_THREADS) && defined(F_FULLFSYNC) /* Apple has disabled fsync() for internal disk drives in OS X. That caused corruption for a user when he tested a power outage. Let us in OS X use a nonstandard flush method recommended by an Apple From b9926d71c09d216ae34a6a77ecc3e0b5fbbd4f11 Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Mon, 10 Jan 2005 15:13:33 +0100 Subject: [PATCH 07/24] A test for the BUG#7658 just fixed in 4.0 (could not put it into 4.0 as in 4.0 we don't replicate OPTIMIZE TABLE). --- mysql-test/r/rpl_many_optimize.result | 9 +++++++++ mysql-test/t/rpl_many_optimize.test | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 mysql-test/r/rpl_many_optimize.result create mode 100644 mysql-test/t/rpl_many_optimize.test diff --git a/mysql-test/r/rpl_many_optimize.result b/mysql-test/r/rpl_many_optimize.result new file mode 100644 index 00000000000..b2148892591 --- /dev/null +++ b/mysql-test/r/rpl_many_optimize.result @@ -0,0 +1,9 @@ +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; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +drop table t1; diff --git a/mysql-test/t/rpl_many_optimize.test b/mysql-test/t/rpl_many_optimize.test new file mode 100644 index 00000000000..525e23abe15 --- /dev/null +++ b/mysql-test/t/rpl_many_optimize.test @@ -0,0 +1,20 @@ +# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]" + +source include/master-slave.inc; + +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +# Now many OPTIMIZE to test if we crash (BUG#7658) +let $1=300; +disable_query_log; +disable_result_log; +while ($1) +{ + eval OPTIMIZE TABLE t1; + dec $1; +} +enable_result_log; +enable_query_log; +drop table t1; +# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE) +sync_slave_with_master; From af7dcec56d6f24f18d3ae023ad32bd36f4abe448 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Mon, 10 Jan 2005 16:19:01 +0100 Subject: [PATCH 08/24] - removed the mysql-test/suites/jp test suite and marked all files as gone --- BitKeeper/etc/gone | 235 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index ad2ffda4d6e..63a759cf131 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -841,6 +841,241 @@ serg@serg.mysql.com|mysql-test/t/sel000027.test|20001211130731|23677|ab44bb57a58 serg@serg.mysql.com|mysql-test/t/sel000028.test|20001211130731|28317|db9bfc0a808fb629 serg@serg.mysql.com|mysql-test/t/sel000029.test|20001211130731|32917|6aae34dbb3ee86d9 serg@serg.mysql.com|mysql-test/t/sel000030.test|20001211130732|03110|a29683eac3e7b706 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_sjis.result|20050107081527|04225|2ec1fd4929b5638e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_ucs2.result|20050107081527|11825|f3ac4ae77651d4f4 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_ujis.result|20050107081528|17309|2c37b350cc1614b7 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_utf8.result|20050107081528|57925|2916262ef0a8467c +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_sjis.result|20050107081528|32479|2d7cc0bab6a08fb7 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_ucs2.result|20050107081529|38657|a904397e286b018d +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_ujis.result|20050107081529|63265|a3e5fab4dda3f63 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_utf8.result|20050107081529|19050|8f33e213f34b75c4 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_sjis.result|20050107081530|05840|92bcb5996a61c9bc +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_ucs2.result|20050107081530|27322|9f3eb425f5a8a94e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_ujis.result|20050107081530|48971|ccce22a3ed33edb +shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_utf8.result|20050107081530|04766|6be23c27e03aaef +shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_sjis.result|20050107081530|26438|e16736c277401654 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_ucs2.result|20050107081531|13914|845b174a4e12fdf5 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_ujis.result|20050107081531|35726|ea4382cfe092a050 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_utf8.result|20050107081531|58104|b90186d893390496 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_sjis.result|20050107081531|14644|d35a81ed738ce5ba +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_ucs2.result|20050107081532|01516|94fe34e7cf948cf4 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_ujis.result|20050107081532|23036|4d5552d56ab27619 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_utf8.result|20050107081532|44748|374e13cc2ae5b0fa +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_sjis.result|20050107081532|00620|eee512b72025128e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_ucs2.result|20050107081532|22012|c0187e924a3b5cdc +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_ujis.result|20050107081533|09019|e8763bd889fa5d1 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_utf8.result|20050107081533|30411|b9afcd7fdbca71bf +shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_sjis.result|20050107081533|52491|68150e74f7d83182 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_ucs2.result|20050107081533|08926|50375a296eea1a4c +shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_ujis.result|20050107081533|30516|26c8e1122bdac1f1 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_utf8.result|20050107081534|17587|577e655491905344 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_sjis.result|20050107081534|39290|67147bffbcee5282 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_ucs2.result|20050107081534|61019|2a3faa20c3360cfb +shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_ujis.result|20050107081534|17136|5e7b2c0407b9eae +shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_utf8.result|20050107081535|04220|62fa831c2b8a02e9 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_sjis.result|20050107081535|25969|abfcff6cbdae1925 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_ucs2.result|20050107081535|47754|be297a9ec05c0e0a +shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_ujis.result|20050107081535|03623|f42e09a2a6736f23 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_utf8.result|20050107081535|24952|8fc889df4669cd6 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_sjis.result|20050107081536|12369|396a43a5ac83bda3 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_ucs2.result|20050107081536|34440|f112f6b3a020dcb5 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_ujis.result|20050107081536|56149|dab3a2b2f5e31eb5 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_utf8.result|20050107081536|12246|6661d21d7c485970 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_sjis.result|20050107081536|33732|c4d6b2814e85710f +shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_ucs2.result|20050107081537|20829|ebc1bcd92b01ba3 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_ujis.result|20050107081537|42728|c88e3ddf34290212 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_utf8.result|20050107081537|64357|702b2e408597f5ef +shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_sjis.result|20050107081537|20201|ab84fe078f8c50e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_ucs2.result|20050107081538|07211|f79c430972fe4242 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_ujis.result|20050107081538|28829|92e66a0d987080ab +shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_utf8.result|20050107081538|50725|f3e1ec3c827572ef +shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_sjis.result|20050107081538|07207|497ea317a9779e08 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_ucs2.result|20050107081538|29018|dff13e955936a635 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_ujis.result|20050107081539|16190|5aaf14c5cc0eb3d7 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_utf8.result|20050107081539|38032|e62cf43214334eaf +shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_sjis.result|20050107081539|59851|f5cd5bb0720f1388 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_ucs2.result|20050107081539|16013|397f3c3ecc929da +shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_ujis.result|20050107081540|05016|a0746377dc240841 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_utf8.result|20050107081540|26599|65816e1c9ea27fbc +shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_sjis.result|20050107081540|48453|be23445a258c2efb +shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_ucs2.result|20050107081540|04446|10797352d768da53 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_ujis.result|20050107081540|26224|75165c42c9da07e8 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_utf8.result|20050107081541|13606|36ad2d19941abede +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_sjis.result|20050107081541|35572|2b3b542ec89a8440 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_ucs2.result|20050107081541|57615|cab66782e2d918b7 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_ujis.result|20050107081541|13734|5e405409e03dca3 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_utf8.result|20050107081542|00849|5f64c2575080fb2e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ps_sjis.result|20050107081542|22464|194a85125571489c +shuichi@mysql.com|mysql-test/suite/jp/r/jp_ps_ujis.result|20050107081542|44552|1d31f04dc3869387 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_sjis.result|20050107081542|00673|76b3f6fab7cce305 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_ucs2.result|20050107081542|22178|40a5c69f7fb9ad70 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_ujis.result|20050107081543|09299|ab8af1803ff6de87 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_utf8.result|20050107081543|31103|34a42201cf18603f +shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_sjis.result|20050107081543|53242|2fd638c1bbea9de +shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_ucs2.result|20050107081543|09440|bcae1663ff14df06 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_ujis.result|20050107081543|31543|69792ccfb7d3b59b +shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_utf8.result|20050107081544|19023|30e4181e77154299 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_sjis.result|20050107081544|40814|84b8e7d33c6cc088 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_ucs2.result|20050107081544|62694|20e50c73803406e0 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_ujis.result|20050107081544|18674|2bd13ccf7478f32b +shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_utf8.result|20050107081545|06019|b26626fbc0c8fa25 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_sjis.result|20050107081545|47717|a6cb9a00a34d9280 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_ucs2.result|20050107081545|03933|6f310a21c6a3ad7f +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_ujis.result|20050107081545|25719|419271caa26c24cd +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_utf8.result|20050107081546|12990|e1cd2ebd6c0208ea +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_sjis.result|20050107081546|34719|d23e6090f98e8fbc +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_ucs2.result|20050107081546|56850|f2fe2a72c482aa49 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_ujis.result|20050107081546|13304|1e865c1ccf400e23 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_utf8.result|20050107081547|00440|8b2e0fffb1bc5cd4 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_sjis.result|20050107081547|22111|60535594c5605694 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_ucs2.result|20050107081547|44100|71c3558952cbc6ad +shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_ujis.result|20050107081547|00264|f0e2860f90982398 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_utf8.result|20050107081547|21895|eeef381fbf2d9c95 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_sjis.result|20050107081548|09502|b652bee325136852 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_ucs2.result|20050107081548|31516|8a8aa66dad072fed +shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_ujis.result|20050107081548|53490|8add4d2433058e8e +shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_utf8.result|20050107081548|09693|cdeb3a8f901a6efb +shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_sjis.result|20050107081549|05596|fee80f00e654153 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_ucs2.result|20050107081549|28016|238f41941bf1cde2 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_ujis.result|20050107081549|50377|1d6072226dc693ac +shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_utf8.result|20050107081549|06796|2dba8103bf4ad46d +shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_sjis.result|20050107081549|28652|8a103fbcece5bf25 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_ucs2.result|20050107081550|15970|ac4cba762dc14e28 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_ujis.result|20050107081550|37865|4df912345aac10f1 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_utf8.result|20050107081550|60045|79cba16887bf3b1f +shuichi@mysql.com|mysql-test/suite/jp/r/jp_union_ujis.result|20050107081550|16675|f0d464252c220c15 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_sjis.result|20050107081551|03970|13dc7639ad1ec6e5 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_ucs2.result|20050107081551|25688|8fc9b1f31d32a21f +shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_ujis.result|20050107081551|47775|93f6c8b3f5622aff +shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_utf8.result|20050107081551|04259|24a758ee1768afcc +shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_sjis.result|20050107081551|26138|cb97323da2f50869 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_ucs2.result|20050107081552|13450|b3dad356facc16be +shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_ujis.result|20050107081552|35250|4e3045c764bfa364 +shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_utf8.result|20050107081552|57088|143422da49ad0cdb +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_sjis.dat|20050107081552|13191|3b811e51d64f83c7 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_ucs2.dat|20050107083211|03894|85975a083dfb7a54 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_ujis.dat|20050107081605|05898|699c7c58964df90 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_utf8.dat|20050107081606|12116|74d43073bf069bc7 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis.dat|20050107081606|52743|9e8273f37d55fc4 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis2.dat|20050107083212|14086|38a382ad2316ccf0 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis3.dat|20050107081608|13836|8661d7801d6d35c +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_ucs2.dat|20050107081608|54705|269e953196baf762 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_ujis.dat|20050107081608|29492|e5d30a2aadd8062a +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_utf8.dat|20050107081609|35613|db4e6eadc27ec29e +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_ucs2.dat|20050107081609|10803|4fbb36024a7d47d0 +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_ujis.dat|20050107081610|17128|bedeb2aa4cf2103d +shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_utf8.dat|20050107081610|58355|6f46c105f00e6da7 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_sjis.test|20050107081610|33134|f7c41740399a114a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_ucs2.test|20050107081611|40070|8aded01010aa4027 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_ujis.test|20050107081611|04428|ddd8a1d2c2b10744 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_utf8.test|20050107081611|26011|749a0e3b6ba599d2 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_sjis.test|20050107081612|13318|38dc8c4a77af62a4 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_ucs2.test|20050107081612|35063|fe5674c6b12d2b1 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_ujis.test|20050107081612|57379|e901fbd29981385b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_utf8.test|20050107081612|13800|36ef1b7b55dc4a1b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_sjis.test|20050107081613|01245|daf9bbe53b34f1a8 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_ucs2.test|20050107081613|22978|ea01c4415d5ef4a4 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_ujis.test|20050107081613|45096|ca893d3a1c4a5fab +shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_utf8.test|20050107081613|01406|9d3ffec1489a799b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_sjis.test|20050107081613|23086|a7fbf85ce0fc9591 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_ucs2.test|20050107081614|10458|84828e6663159064 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_ujis.test|20050107081614|32393|a64465e0725243 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_utf8.test|20050107081614|54260|8f344fb86504b604 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_sjis.test|20050107081614|10489|40a1631cffd46fe +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_ucs2.test|20050107081614|32422|8f034f1fb0ae644b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_ujis.test|20050107081615|20478|bbdb04d1a483939b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_utf8.test|20050107081615|42908|1f4418fddb751c58 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_sjis.test|20050107081615|64880|448ff3eaff962456 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_ucs2.test|20050107081615|21081|b2bafda9e7a3f226 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_ujis.test|20050107081616|08589|1477760d458bb313 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_utf8.test|20050107081616|30689|a1d12ccab39f74f3 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_sjis.test|20050107081616|53230|9b863b7e4728f82a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_ucs2.test|20050107081617|23149|f05f1cbbe3740670 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_ujis.test|20050107081618|10643|ac136bedb31cf9a8 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_utf8.test|20050107081618|46561|43460e3947ac3d24 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_sjis.test|20050107081618|02948|b32f23f3f588ea9a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_ucs2.test|20050107081618|24774|783e8b896271e49e +shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_ujis.test|20050107081619|12298|3f9c8c41cd92faa3 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_utf8.test|20050107081619|37128|e4ab71ff1f780509 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_sjis.test|20050107081619|59453|25fc516136ca9159 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_ucs2.test|20050107081619|15956|673e221671a2770d +shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_ujis.test|20050107081620|03773|75c1239ff59d928a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_utf8.test|20050107081620|26260|ed912ad48a1893a8 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_sjis.test|20050107081620|49077|59a36a82ee570052 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_ucs2.test|20050107081620|05668|7d8665f03f26863d +shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_ujis.test|20050107081620|27737|ecdf5e86cbda74cb +shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_utf8.test|20050107081621|15489|b98f58e8a4a65e7b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_sjis.test|20050107081621|41478|91fcd07aaac68648 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_ucs2.test|20050107081621|63674|65929b80d0271c86 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_ujis.test|20050107081621|20110|2a5ce575491289f4 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_utf8.test|20050107081622|07679|932150eea8460d1 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_sjis.test|20050107081622|30138|22fc722d29faeb92 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_ucs2.test|20050107081622|52718|81dcde6618d6a22d +shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_ujis.test|20050107081622|09451|d5be7e1b3b4fb88b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_utf8.test|20050107081622|31964|cfd3ea368b652b5b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_sjis.test|20050107081623|19721|1db71ef08ca802d0 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_ucs2.test|20050107081623|42415|55eee7f0b2b984cd +shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_ujis.test|20050107081623|64766|4136ccd8cd83eee5 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_utf8.test|20050107081623|21529|556e575385ee58f +shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_sjis.test|20050107081624|09362|ac12c88e8477d736 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_ucs2.test|20050107081624|31699|e6e0cc4752262b9f +shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_ujis.test|20050107081624|54042|afa7eadd28fa536e +shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_utf8.test|20050107081624|10934|307d85c4cd318e62 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_sjis.test|20050107081624|33252|29972178e7d58d93 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_ucs2.test|20050107081625|21025|b722d1ed662e03c8 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_ujis.test|20050107081625|44023|c1feeadebdfc0ff9 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_utf8.test|20050107081625|01097|2f3347de2a42b9d6 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_sjis.test|20050107081625|23224|fb954f6d4b2a20ac +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_ucs2.test|20050107081626|11079|998157355fe96143 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_ujis.test|20050107081626|33500|aab63ba3302196a2 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_utf8.test|20050107081626|55883|8193f90a6ed58d36 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ps_sjis.test|20050107081626|12674|2f1450a52f147fec +shuichi@mysql.com|mysql-test/suite/jp/t/jp_ps_ujis.test|20050107081627|00495|7b0eb3ca59abb12 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_sjis.test|20050107081627|23008|a74ce2aca0e5ac66 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_ucs2.test|20050107081627|45674|71b7010127493fb +shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_ujis.test|20050107081627|02501|cfe2af6b3db381c0 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_utf8.test|20050107081627|24683|57e905b35703072 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_sjis.test|20050107081628|12962|f40219e9e488fc23 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_ucs2.test|20050107081628|35555|2c0e7ad52ec9ca65 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_ujis.test|20050107081628|57942|c353d85f4e92f5df +shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_utf8.test|20050107081628|14597|e2588c2a3dcf63a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_sjis.test|20050107081629|02304|14af84f068332d50 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_ucs2.test|20050107081629|24565|729a8377aa8100e4 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_ujis.test|20050107081629|47409|a839209fac19b930 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_utf8.test|20050107081629|04400|ada246cab13f1811 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_sjis.test|20050107081629|26583|9ae895ba98c4d31 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_ucs2.test|20050107081630|14467|cc7b3b62ee6dae28 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_ujis.test|20050107081630|37003|9c869c17899db4c7 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_utf8.test|20050107081630|59835|a8ed7c9ff559c38d +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_sjis.test|20050107081630|16798|82a8f174f2ac5988 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_ucs2.test|20050107081631|04558|1f90bdf68ed4d6d0 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_ujis.test|20050107081631|26878|1804ccc6518b5d9 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_utf8.test|20050107081631|49568|74375ee1105781bd +shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_sjis.test|20050107081631|06299|b1151637493de45 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_ucs2.test|20050107081632|27924|3364d51b3168f562 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_ujis.test|20050107081632|50639|721b5841964bf8e6 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_utf8.test|20050107081632|07426|37222d28b4cfe7c8 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_sjis.test|20050107081632|29631|c92ff81669eb652 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_ucs2.test|20050107084021|10337|4b920d28fc9dc5aa +shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_ujis.test|20050107083216|33062|3f51b47de1fb0c17 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_utf8.test|20050107081637|15503|fe599c9515084385 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_sjis.test|20050107081638|08555|305285c02185f498 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_ucs2.test|20050107081638|36441|ddc58f642ca61418 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_ujis.test|20050107081638|64337|2cc53c02a5cc4879 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_utf8.test|20050107081638|26081|55bb4e11bc747e5d +shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_sjis.test|20050107081639|19046|ec18bf7845064d09 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_ucs2.test|20050107081639|46660|583edc63a51fd799 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_ujis.test|20050107081639|06910|87aad3c53be879fd +shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_utf8.test|20050107081639|29347|b35fcc89b5fa47c3 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_union_ujis.test|20050107081640|17665|1eb842f74190b3c1 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_sjis.test|20050107081640|40239|d21d19721f975c74 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_ucs2.test|20050107081640|62869|3dad27b824548037 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_ujis.test|20050107081640|19575|5c3da888e148065b +shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_utf8.test|20050107081641|07967|bc3adabdd5ac865 +shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_sjis.test|20050107081641|30584|e2886fcc8b23152f +shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_ucs2.test|20050107081641|53233|b3c07768684ddfdb +shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_ujis.test|20050107081641|10027|9e123ef3c645b66a +shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_utf8.test|20050107081641|32217|59fb529f60d9d8bc tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.eps|20020228162345|64529|31ade79a89683616 tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.gif|20020228162348|36945|364ca7338682f71 tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.txt|20020228162350|33044|e155c53c10374ff From b67a1f697a32d51052763eb7cef5329228f8f977 Mon Sep 17 00:00:00 2001 From: "antony@ltantony.rdg.cyberkinetica.homeunix.net" <> Date: Mon, 10 Jan 2005 16:24:05 +0000 Subject: [PATCH 09/24] Initialize lex->mqh structure. Fixes valgrind warnings. --- sql/sql_acl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b607f8a7822..14a66d2b10f 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -5197,6 +5197,7 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name) DBUG_RETURN(TRUE); thd->lex->ssl_type= SSL_TYPE_NOT_SPECIFIED; + bzero((char*) &thd->lex->mqh, sizeof(thd->lex->mqh)); result= mysql_procedure_grant(thd, tables, user_list, DEFAULT_CREATE_PROC_ACLS, 0, 1); From 760b2a5f3bc287c3780b4150e70ce9326c522f2f Mon Sep 17 00:00:00 2001 From: "mskold@mysql.com" <> Date: Mon, 10 Jan 2005 20:55:05 +0100 Subject: [PATCH 10/24] Fix for failing INSERT IGNORE --- sql/sql_insert.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2b30b4e6981..ceb31f76953 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -292,7 +292,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, error=0; id=0; thd->proc_info="update"; - if (duplic != DUP_ERROR) + if (duplic != DUP_ERROR || ignore) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); /* let's *try* to start bulk inserts. It won't necessary @@ -471,7 +471,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, table->next_number_field=0; thd->count_cuted_fields= CHECK_FIELD_IGNORE; thd->next_insert_id=0; // Reset this if wrongly used - if (duplic != DUP_ERROR) + if (duplic != DUP_ERROR || ignore) table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); /* Reset value of LAST_INSERT_ID if no rows where inserted */ @@ -1606,7 +1606,7 @@ bool delayed_insert::handle_inserts(void) info.ignore= row->ignore; info.handle_duplicates= row->dup; if (info.ignore || - info.handle_duplicates == DUP_REPLACE) + info.handle_duplicates != DUP_ERROR) { table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); using_ignore=1; @@ -1806,7 +1806,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) restore_record(table,s->default_values); // Get empty record table->next_number_field=table->found_next_number_field; thd->cuted_fields=0; - if (info.ignore || info.handle_duplicates == DUP_REPLACE) + if (info.ignore || info.handle_duplicates != DUP_ERROR) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); table->file->start_bulk_insert((ha_rows) 0); thd->no_trans_update= 0; @@ -2008,7 +2008,7 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) restore_record(table,s->default_values); // Get empty record thd->cuted_fields=0; - if (info.ignore || info.handle_duplicates == DUP_REPLACE) + if (info.ignore || info.handle_duplicates != DUP_ERROR) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); table->file->start_bulk_insert((ha_rows) 0); thd->no_trans_update= 0; From fa2fd91a099b8c81c1ec988d7f35fc886af246dd Mon Sep 17 00:00:00 2001 From: "mskold@mysql.com" <> Date: Mon, 10 Jan 2005 21:45:35 +0100 Subject: [PATCH 11/24] Recorded new result file --- mysql-test/r/ps_7ndb.result | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 399b3b5017b..230da5df00d 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -70,7 +70,7 @@ 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 -def test t9 t9 c22 c22 254 30 30 Y 0 0 8 +def test t9 t9 c22 c22 253 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 @@ -1691,8 +1691,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1710,8 +1710,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1926,7 +1926,7 @@ 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 +def @arg32 253 8192 6 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 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, @@ -2023,7 +2023,7 @@ 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 +def @arg32 253 8192 6 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 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 ; @@ -2111,7 +2111,7 @@ 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 +def @arg32 253 8192 6 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 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, @@ -2201,7 +2201,7 @@ 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 +def @arg32 253 8192 6 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 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 ; From 2347e386d7aa6f0e39fb403cc5c6c071b815854d Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Mon, 10 Jan 2005 23:59:28 +0100 Subject: [PATCH 12/24] Fix double-initalization of mutex in archive storage engine. (Bug #7762) --- sql/examples/ha_archive.cc | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc index 771bf91d118..59024405bec 100644 --- a/sql/examples/ha_archive.cc +++ b/sql/examples/ha_archive.cc @@ -341,10 +341,8 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table) if ((share->archive_write= gzopen(share->data_file_name, "ab")) == NULL) goto error2; if (my_hash_insert(&archive_open_tables, (byte*) share)) - goto error2; - thr_lock_init(&share->lock); - if (pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST)) goto error3; + thr_lock_init(&share->lock); } share->use_count++; pthread_mutex_unlock(&archive_mutex); @@ -352,14 +350,13 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table) return share; error3: - VOID(pthread_mutex_destroy(&share->mutex)); - thr_lock_delete(&share->lock); /* We close, but ignore errors since we already have errors */ (void)gzclose(share->archive_write); error2: my_close(share->meta_file,MYF(0)); error: pthread_mutex_unlock(&archive_mutex); + VOID(pthread_mutex_destroy(&share->mutex)); my_free((gptr) share, MYF(0)); return NULL; @@ -493,23 +490,29 @@ int ha_archive::create(const char *name, TABLE *table_arg, if ((archive= gzdopen(create_file, "ab")) == NULL) { error= errno; - delete_table(name); - goto error; + goto error2; } if (write_data_header(archive)) { - gzclose(archive); + error= errno; + goto error3; + } + + if (gzclose(archive)) { + error= errno; goto error2; } - if (gzclose(archive)) - goto error2; + my_close(create_file, MYF(0)); DBUG_RETURN(0); +error3: + /* We already have an error, so ignore results of gzclose. */ + (void)gzclose(archive); error2: - error= errno; - delete_table(name); + my_close(create_file, MYF(0)); + delete_table(name); error: /* Return error number, if we got one */ DBUG_RETURN(error ? error : -1); @@ -736,7 +739,7 @@ int ha_archive::rebuild_meta_file(char *table_name, File meta_file) if ((rebuild_file= gzopen(data_file_name, "rb")) == NULL) DBUG_RETURN(errno ? errno : -1); - if (rc= read_data_header(rebuild_file)) + if ((rc= read_data_header(rebuild_file))) goto error; /* @@ -800,7 +803,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt) DBUG_RETURN(-1); } - while (read= gzread(reader, block, IO_SIZE)) + while ((read= gzread(reader, block, IO_SIZE))) gzwrite(writer, block, read); gzclose(reader); From feee6ee30b9aa55be7f6011887c6828c88bcc4f0 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Tue, 11 Jan 2005 00:17:21 +0100 Subject: [PATCH 13/24] field.h, field.cc: Did some more split TABLE to TABLE and TABLE_SHARE --- sql/field.cc | 138 +++++++++++++++++++++++++-------------------------- sql/field.h | 2 +- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index 8e0fddae332..f89479d9314 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1386,7 +1386,7 @@ int Field_short::store(const char *from,uint len,CHARSET_INFO *cs) error= 1; } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int2store(ptr,tmp); } @@ -1437,7 +1437,7 @@ int Field_short::store(double nr) res=(int16) (int) nr; } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int2store(ptr,res); } @@ -1486,7 +1486,7 @@ int Field_short::store(longlong nr) res=(int16) nr; } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int2store(ptr,res); } @@ -1501,7 +1501,7 @@ double Field_short::val_real(void) { short j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint2korr(ptr); else #endif @@ -1513,7 +1513,7 @@ longlong Field_short::val_int(void) { short j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint2korr(ptr); else #endif @@ -1532,7 +1532,7 @@ String *Field_short::val_str(String *val_buffer, char *to=(char*) val_buffer->ptr(); short j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint2korr(ptr); else #endif @@ -1560,7 +1560,7 @@ int Field_short::cmp(const char *a_ptr, const char *b_ptr) { short a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint2korr(a_ptr); b=sint2korr(b_ptr); @@ -1581,7 +1581,7 @@ int Field_short::cmp(const char *a_ptr, const char *b_ptr) void Field_short::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { if (unsigned_flag) to[0] = ptr[0]; @@ -1886,7 +1886,7 @@ int Field_long::store(const char *from,uint len,CHARSET_INFO *cs) store_tmp= (long) tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr, store_tmp); } @@ -1937,7 +1937,7 @@ int Field_long::store(double nr) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,res); } @@ -1988,7 +1988,7 @@ int Field_long::store(longlong nr) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,res); } @@ -2003,7 +2003,7 @@ double Field_long::val_real(void) { int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -2017,7 +2017,7 @@ longlong Field_long::val_int(void) /* See the comment in Field_long::store(long long) */ DBUG_ASSERT(table->in_use == current_thd); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -2035,7 +2035,7 @@ String *Field_long::val_str(String *val_buffer, char *to=(char*) val_buffer->ptr(); int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -2061,7 +2061,7 @@ int Field_long::cmp(const char *a_ptr, const char *b_ptr) { int32 a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint4korr(a_ptr); b=sint4korr(b_ptr); @@ -2080,7 +2080,7 @@ int Field_long::cmp(const char *a_ptr, const char *b_ptr) void Field_long::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { if (unsigned_flag) to[0] = ptr[0]; @@ -2146,7 +2146,7 @@ int Field_longlong::store(const char *from,uint len,CHARSET_INFO *cs) check_int(from,len,end,cs)) error= 1; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,tmp); } @@ -2197,7 +2197,7 @@ int Field_longlong::store(double nr) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,res); } @@ -2211,7 +2211,7 @@ int Field_longlong::store(double nr) int Field_longlong::store(longlong nr) { #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,nr); } @@ -2226,7 +2226,7 @@ double Field_longlong::val_real(void) { longlong j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { j=sint8korr(ptr); } @@ -2247,7 +2247,7 @@ longlong Field_longlong::val_int(void) { longlong j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint8korr(ptr); else #endif @@ -2266,7 +2266,7 @@ String *Field_longlong::val_str(String *val_buffer, char *to=(char*) val_buffer->ptr(); longlong j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint8korr(ptr); else #endif @@ -2291,7 +2291,7 @@ int Field_longlong::cmp(const char *a_ptr, const char *b_ptr) { longlong a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint8korr(a_ptr); b=sint8korr(b_ptr); @@ -2311,7 +2311,7 @@ int Field_longlong::cmp(const char *a_ptr, const char *b_ptr) void Field_longlong::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { if (unsigned_flag) to[0] = ptr[0]; @@ -2427,7 +2427,7 @@ int Field_float::store(double nr) } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4store(ptr,j); } @@ -2448,7 +2448,7 @@ double Field_float::val_real(void) { float j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4get(j,ptr); } @@ -2462,7 +2462,7 @@ longlong Field_float::val_int(void) { float j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4get(j,ptr); } @@ -2478,7 +2478,7 @@ String *Field_float::val_str(String *val_buffer, { float nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4get(nr,ptr); } @@ -2560,7 +2560,7 @@ int Field_float::cmp(const char *a_ptr, const char *b_ptr) { float a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4get(a,a_ptr); float4get(b,b_ptr); @@ -2580,7 +2580,7 @@ void Field_float::sort_string(char *to,uint length __attribute__((unused))) { float nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float4get(nr,ptr); } @@ -2709,7 +2709,7 @@ int Field_double::store(double nr) } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8store(ptr,nr); } @@ -2730,7 +2730,7 @@ double Field_double::val_real(void) { double j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8get(j,ptr); } @@ -2744,7 +2744,7 @@ longlong Field_double::val_int(void) { double j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8get(j,ptr); } @@ -2760,7 +2760,7 @@ String *Field_double::val_str(String *val_buffer, { double nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8get(nr,ptr); } @@ -2848,7 +2848,7 @@ int Field_double::cmp(const char *a_ptr, const char *b_ptr) { double a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8get(a,a_ptr); float8get(b,b_ptr); @@ -2871,7 +2871,7 @@ void Field_double::sort_string(char *to,uint length __attribute__((unused))) { double nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { float8get(nr,ptr); } @@ -3047,7 +3047,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs) } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,tmp); } @@ -3106,7 +3106,7 @@ int Field_timestamp::store(longlong nr) nr, MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,timestamp); } @@ -3130,7 +3130,7 @@ longlong Field_timestamp::val_int(void) THD *thd= table->in_use; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3160,7 +3160,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr) val_buffer->length(field_length); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3225,7 +3225,7 @@ bool Field_timestamp::get_date(TIME *ltime, uint fuzzydate) long temp; THD *thd= table->in_use; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) temp=uint4korr(ptr); else #endif @@ -3262,7 +3262,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr) { int32 a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint4korr(a_ptr); b=sint4korr(b_ptr); @@ -3280,7 +3280,7 @@ int Field_timestamp::cmp(const char *a_ptr, const char *b_ptr) void Field_timestamp::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; @@ -3309,7 +3309,7 @@ void Field_timestamp::set_time() long tmp= (long) table->in_use->query_start(); set_notnull(); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,tmp); } @@ -3702,7 +3702,7 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs) from, len, MYSQL_TIMESTAMP_DATE, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,tmp); } @@ -3730,7 +3730,7 @@ int Field_date::store(double nr) else tmp=(long) rint(nr); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,tmp); } @@ -3758,7 +3758,7 @@ int Field_date::store(longlong nr) else tmp=(long) nr; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,tmp); } @@ -3784,7 +3784,7 @@ double Field_date::val_real(void) { int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -3796,7 +3796,7 @@ longlong Field_date::val_int(void) { int32 j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint4korr(ptr); else #endif @@ -3811,7 +3811,7 @@ String *Field_date::val_str(String *val_buffer, val_buffer->alloc(field_length); int32 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=sint4korr(ptr); else #endif @@ -3829,7 +3829,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr) { int32 a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint4korr(a_ptr); b=sint4korr(b_ptr); @@ -3847,7 +3847,7 @@ int Field_date::cmp(const char *a_ptr, const char *b_ptr) void Field_date::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; @@ -4085,7 +4085,7 @@ int Field_datetime::store(const char *from,uint len,CHARSET_INFO *cs) from, len, MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,tmp); } @@ -4126,7 +4126,7 @@ int Field_datetime::store(longlong nr) MYSQL_TIMESTAMP_DATETIME, 1); #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,nr); } @@ -4155,7 +4155,7 @@ int Field_datetime::store_time(TIME *ltime,timestamp_type type) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1); } #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,tmp); } @@ -4182,7 +4182,7 @@ longlong Field_datetime::val_int(void) { longlong j; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) j=sint8korr(ptr); else #endif @@ -4202,7 +4202,7 @@ String *Field_datetime::val_str(String *val_buffer, int part3; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=sint8korr(ptr); else #endif @@ -4267,7 +4267,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr) { longlong a,b; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { a=sint8korr(a_ptr); b=sint8korr(b_ptr); @@ -4285,7 +4285,7 @@ int Field_datetime::cmp(const char *a_ptr, const char *b_ptr) void Field_datetime::sort_string(char *to,uint length __attribute__((unused))) { #ifdef WORDS_BIGENDIAN - if (!table->db_low_byte_first) + if (!table->s->db_low_byte_first) { to[0] = ptr[0]; to[1] = ptr[1]; @@ -5156,7 +5156,7 @@ void Field_blob::store_length(uint32 number) break; case 2: #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int2store(ptr,(unsigned short) number); } @@ -5169,7 +5169,7 @@ void Field_blob::store_length(uint32 number) break; case 4: #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,number); } @@ -5189,7 +5189,7 @@ uint32 Field_blob::get_length(const char *pos) { uint16 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=sint2korr(pos); else #endif @@ -5202,7 +5202,7 @@ uint32 Field_blob::get_length(const char *pos) { uint32 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=uint4korr(pos); else #endif @@ -5821,7 +5821,7 @@ void Field_enum::store_type(ulonglong value) case 1: ptr[0]= (uchar) value; break; case 2: #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int2store(ptr,(unsigned short) value); } @@ -5832,7 +5832,7 @@ void Field_enum::store_type(ulonglong value) case 3: int3store(ptr,(long) value); break; case 4: #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int4store(ptr,value); } @@ -5842,7 +5842,7 @@ void Field_enum::store_type(ulonglong value) break; case 8: #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) { int8store(ptr,value); } @@ -5933,7 +5933,7 @@ longlong Field_enum::val_int(void) { uint16 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=sint2korr(ptr); else #endif @@ -5946,7 +5946,7 @@ longlong Field_enum::val_int(void) { uint32 tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=uint4korr(ptr); else #endif @@ -5957,7 +5957,7 @@ longlong Field_enum::val_int(void) { longlong tmp; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) tmp=sint8korr(ptr); else #endif diff --git a/sql/field.h b/sql/field.h index 9e690705801..670b778f863 100644 --- a/sql/field.h +++ b/sql/field.h @@ -713,7 +713,7 @@ public: if ((*null_value= is_null())) return 0; #ifdef WORDS_BIGENDIAN - if (table->db_low_byte_first) + if (table->s->db_low_byte_first) return sint4korr(ptr); #endif long tmp; From 699cb2c066a3fdb9fef01f95fd41bdd806fafb19 Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Tue, 11 Jan 2005 01:01:35 +0100 Subject: [PATCH 14/24] Fix style nit --- sql/examples/ha_archive.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc index 59024405bec..ef609513489 100644 --- a/sql/examples/ha_archive.cc +++ b/sql/examples/ha_archive.cc @@ -498,7 +498,8 @@ int ha_archive::create(const char *name, TABLE *table_arg, goto error3; } - if (gzclose(archive)) { + if (gzclose(archive)) + { error= errno; goto error2; } From 0cf3c1e5c1b6366cd84da0a879aba9cb777347f0 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Tue, 11 Jan 2005 10:02:31 +0100 Subject: [PATCH 15/24] bug#7765 - ndb startup on 64-bit, increase stack on 64-bit --- ndb/src/common/portlib/NdbThread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c index 69e39994a9c..d4f6617d2f5 100644 --- a/ndb/src/common/portlib/NdbThread.c +++ b/ndb/src/common/portlib/NdbThread.c @@ -54,7 +54,11 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func, strnmov(tmpThread->thread_name,p_thread_name,sizeof(tmpThread->thread_name)); pthread_attr_init(&thread_attr); +#if (SIZEOF_CHARP == 8) + pthread_attr_setstacksize(&thread_attr, 2*thread_stack_size); +#else pthread_attr_setstacksize(&thread_attr, thread_stack_size); +#endif #ifdef USE_PTHREAD_EXTRAS /* Guard stack overflow with a 2k databuffer */ pthread_attr_setguardsize(&thread_attr, 2048); From e88b29273810e089aa45888c77236e12404a557b Mon Sep 17 00:00:00 2001 From: "tomas@poseidon.ndb.mysql.com" <> Date: Tue, 11 Jan 2005 10:34:36 +0100 Subject: [PATCH 16/24] Bug#7477 --- ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp | 29 ++++++----------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp index a02bfd459b3..a01f094cffd 100644 --- a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp +++ b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp @@ -14,19 +14,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/** - * O_DIRECT - */ -#if 0 -//#ifdef NDB_LINUX -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#endif - #include +#include +#include -#include "Error.hpp" +#include #include "AsyncFile.hpp" #include @@ -35,15 +27,6 @@ #include #include -#if 0 -#ifdef HAVE_PREAD -// This is for pread and pwrite -#ifndef __USE_UNIX98 -#define __USE_UNIX98 -#endif -#endif -#endif - #if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE #else // For readv and writev @@ -91,6 +74,7 @@ static int numAsyncFiles = 0; extern "C" void * runAsyncFile(void* arg) { + my_thread_init(); ((AsyncFile*)arg)->run(); return (NULL); } @@ -419,7 +403,7 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){ #elif defined NDB_OSE || defined NDB_SOFTOSE return_value = ::read(theFd, buf, size); #else // UNIX - return_value = ::pread(theFd, buf, size, offset); + return_value = my_pread(theFd, buf, size, offset,0); #endif #ifndef NDB_WIN32 if (return_value == -1 && errno == EINTR) { @@ -653,7 +637,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset, #elif defined NDB_OSE || defined NDB_SOFTOSE return_value = ::write(theFd, buf, bytes_to_write); #else // UNIX - return_value = ::pwrite(theFd, buf, bytes_to_write, offset); + return_value = my_pwrite(theFd, buf, bytes_to_write, offset, 0); #endif #ifndef NDB_WIN32 if (return_value == -1 && errno == EINTR) { @@ -889,6 +873,7 @@ void AsyncFile::endReq() { // Thread is ended with return if (theWriteBuffer) NdbMem_Free(theWriteBuffer); + my_thread_end(); NdbThread_Exit(0); } From 876a96cd0233d8ed5befa247220f57beff7f582a Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:12:52 +0300 Subject: [PATCH 17/24] make it compile with -ansi -pedantic --- sql/net_serv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index ca82c49b62d..5699b5a2f55 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -251,7 +251,7 @@ my_bool my_net_write(NET *net,const char *packet,ulong len) { uchar buff[NET_HEADER_SIZE]; - if (unlikely(!net->vio)) // nowhere to write + if (unlikely(!net->vio)) /* nowhere to write */ return 0; /* Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH From 067d13f63244957241b34556e72883ebe9c6ac1c Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:53:10 +0300 Subject: [PATCH 18/24] A fix for linking failure of MySQL client when linking with imap libraries (Bug#7428) (renamed: hash_reset -> my_hash_reset) --- mysys/hash.c | 6 +++--- sql/sql_class.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysys/hash.c b/mysys/hash.c index 451bc1eb7f5..6091ef39a4e 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -122,13 +122,13 @@ void hash_free(HASH *hash) Delete all elements from the hash (the hash itself is to be reused). SYNOPSIS - hash_reset() + my_hash_reset() hash the hash to delete elements of */ -void hash_reset(HASH *hash) +void my_hash_reset(HASH *hash) { - DBUG_ENTER("hash_reset"); + DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash: 0x%lxd",hash)); hash_free_elements(hash); diff --git a/sql/sql_class.h b/sql/sql_class.h index 169835f3324..7978aec8f1d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -648,8 +648,8 @@ public: /* Erase all statements (calls Statement destructor) */ void reset() { - hash_reset(&names_hash); - hash_reset(&st_hash); + my_hash_reset(&names_hash); + my_hash_reset(&st_hash); last_found_statement= 0; } From 4073c11a7244baa3f3ab5d9838bdc76d1d84f020 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 13:57:07 +0300 Subject: [PATCH 19/24] Followup: rename the declaration (hash_reset -> my_hash_reset) --- include/hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hash.h b/include/hash.h index cd7210a290c..9a6d91036e1 100644 --- a/include/hash.h +++ b/include/hash.h @@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset, uint key_length, hash_get_key get_key, void (*free_element)(void*), uint flags CALLER_INFO_PROTO); void hash_free(HASH *tree); -void hash_reset(HASH *hash); +void my_hash_reset(HASH *hash); byte *hash_element(HASH *hash,uint idx); gptr hash_search(HASH *info,const byte *key,uint length); gptr hash_next(HASH *info,const byte *key,uint length); From 6c69e3d2b30d62e56aa71159b360929c4a3055c9 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Tue, 11 Jan 2005 13:30:11 +0100 Subject: [PATCH 20/24] bug#7798 - ndb - range scan with invalid table version could cause node failure --- mysql-test/r/ndb_index_ordered.result | 16 ++++++++++++++ mysql-test/t/ndb_index_ordered.test | 18 ++++++++++++++++ ndb/src/kernel/blocks/dbtc/DbtcMain.cpp | 28 ++++++++++++++++++++----- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result index 75a5e42732b..943571aa524 100644 --- a/mysql-test/r/ndb_index_ordered.result +++ b/mysql-test/r/ndb_index_ordered.result @@ -420,3 +420,19 @@ count(*)-8 select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; count(*)-9 0 +drop table t1; +create table t1(a int primary key, b int not null, index(b)); +insert into t1 values (1,1), (2,2); +set autocommit=0; +begin; +select count(*) from t1; +count(*) +2 +ALTER TABLE t1 ADD COLUMN c int; +select a from t1 where b = 2; +a +2 +show tables; +Tables_in_test +t1 +drop table t1; diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index 71635159604..89f1e5b7e9f 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -236,3 +236,21 @@ select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; + +drop table t1; + +# bug#7798 +create table t1(a int primary key, b int not null, index(b)); +insert into t1 values (1,1), (2,2); +connect (con1,localhost,,,test); +connect (con2,localhost,,,test); +connection con1; +set autocommit=0; +begin; +select count(*) from t1; +connection con2; +ALTER TABLE t1 ADD COLUMN c int; +connection con1; +select a from t1 where b = 2; +show tables; +drop table t1; diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index dd1252b76b9..815d6c9d838 100644 --- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -1879,7 +1879,6 @@ void Dbtc::packKeyData000Lab(Signal* signal, Uint32 totalLen) { CacheRecord * const regCachePtr = cachePtr.p; - UintR Tmp; jam(); Uint32 len = 0; @@ -8503,14 +8502,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) apiConnectptr.i = scanTabReq->apiConnectPtr; tabptr.i = scanTabReq->tableId; - if (apiConnectptr.i >= capiConnectFilesize || - tabptr.i >= ctabrecFilesize) { + if (apiConnectptr.i >= capiConnectFilesize) + { jam(); warningHandlerLab(signal); return; }//if + ptrAss(apiConnectptr, apiConnectRecord); ApiConnectRecord * transP = apiConnectptr.p; + if (transP->apiConnectstate != CS_CONNECTED) { jam(); // could be left over from TCKEYREQ rollback @@ -8524,9 +8525,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) } else { jam(); errCode = ZSTATE_ERROR; - goto SCAN_TAB_error; + goto SCAN_TAB_error_no_state_change; } } + + if(tabptr.i >= ctabrecFilesize) + { + errCode = ZUNKNOWN_TABLE_ERROR; + goto SCAN_TAB_error; + } + ptrAss(tabptr, tableRecord); if ((aiLength == 0) || (!tabptr.p->checkTable(schemaVersion)) || @@ -8621,8 +8629,18 @@ void Dbtc::execSCAN_TABREQ(Signal* signal) errCode = ZNO_SCANREC_ERROR; goto SCAN_TAB_error; - SCAN_TAB_error: +SCAN_TAB_error: jam(); + /** + * Prepare for up coming ATTRINFO/KEYINFO + */ + transP->apiConnectstate = CS_ABORTING; + transP->abortState = AS_IDLE; + transP->transid[0] = transid1; + transP->transid[1] = transid2; + +SCAN_TAB_error_no_state_change: + ScanTabRef * ref = (ScanTabRef*)&signal->theData[0]; ref->apiConnectPtr = transP->ndbapiConnect; ref->transId1 = transid1; From a55cd1f1c44de7609a5ef5fe5dd2f37f0b057d4a Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Tue, 11 Jan 2005 15:32:23 +0300 Subject: [PATCH 21/24] Fixes for two compile-time failures. --- ndb/src/common/transporter/TransporterRegistry.cpp | 2 +- sql/sql_lex.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index 9273ad8bc80..fcc7a62d9e9 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -1419,6 +1419,6 @@ NdbOut & operator <<(NdbOut & out, SignalHeader & sh){ Transporter* TransporterRegistry::get_transporter(NodeId nodeId) { return theTransporters[nodeId]; -}; +} template class Vector; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5929ad5c14b..495fa4a0bd1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -172,7 +172,7 @@ void lex_start(THD *thd, uchar *buf,uint length) lex->proc_list.first= 0; if (lex->spfuns.records) - hash_reset(&lex->spfuns); + my_hash_reset(&lex->spfuns); } void lex_end(LEX *lex) From 691b3283d21b7756e0bf9af780b9fb76b243bc58 Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Tue, 11 Jan 2005 16:49:45 +0400 Subject: [PATCH 22/24] If VARCHAR strips only trailing spaces, then produce a note, not a warning or error. --- mysql-test/r/bdb.result | 4 ++-- mysql-test/r/heap.result | 2 +- mysql-test/r/myisam.result | 4 ++-- mysql-test/r/strict.result | 2 +- sql/field.cc | 20 +++++++++++++++++--- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index e3674486a21..d743bc03675 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1300,7 +1300,7 @@ insert into t1 values('+ ', '+ ', '+ '); set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: -Warning 1265 Data truncated for column 'v' at row 1 +Note 1265 Data truncated for column 'v' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * @@ -1346,7 +1346,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); Warnings: -Warning 1265 Data truncated for column 't' at row 2 +Note 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 50f6d3d56fc..4d5aabb8b3a 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -255,7 +255,7 @@ insert into t1 values('+ ', '+ ', '+ '); set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: -Warning 1265 Data truncated for column 'v' at row 1 +Note 1265 Data truncated for column 'v' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 1ac2f9631d7..138cae5cadd 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -571,7 +571,7 @@ insert into t1 values('+ ', '+ ', '+ '); set @a=repeat(' ',20); insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); Warnings: -Warning 1265 Data truncated for column 'v' at row 1 +Note 1265 Data truncated for column 'v' at row 1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') *+ *+*+ * @@ -617,7 +617,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); Warnings: -Warning 1265 Data truncated for column 't' at row 2 +Note 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 4da0f1e48f1..f0f7ed9684e 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -818,7 +818,6 @@ ERROR 01000: Data truncated for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES ('hellobob'); ERROR 01000: Data truncated for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES ('hello '); -ERROR 01000: Data truncated for column 'col2' at row 1 UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he'; ERROR 01000: Data truncated for column 'col1' at row 2 UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he'; @@ -835,6 +834,7 @@ col1 col2 hello hello he hellot hello hello +NULL hello hello hellob DROP TABLE t1; CREATE TABLE t1 (col1 enum('red','blue','green')); diff --git a/sql/field.cc b/sql/field.cc index f89479d9314..175ca09df37 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4672,6 +4672,7 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs) uint32 not_used, copy_length; char buff[80]; String tmpstr(buff,sizeof(buff), &my_charset_bin); + enum MYSQL_ERROR::enum_warning_level level= MYSQL_ERROR::WARN_LEVEL_WARN; /* Convert character set if nesessary */ if (String::needs_conversion(length, cs, field_charset, ¬_used)) @@ -4696,11 +4697,24 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs) *ptr= (uchar) copy_length; else int2store(ptr, copy_length); - - if (copy_length < length) + + // Check if we lost something other than just trailing spaces + if ((copy_length < length) && table->in_use->count_cuted_fields) + { + const char *end= from + length; + from+= copy_length; + from+= field_charset->cset->scan(field_charset, from, end, MY_SEQ_SPACES); + /* + If we lost only spaces then produce a NOTE, not a WARNING. + But if we have already had errors (e.g with charset conversion), + then don't reset level to NOTE. + */ + if (from == end && !error) + level= MYSQL_ERROR::WARN_LEVEL_NOTE; error= 1; + } if (error) - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_TRUNCATED, 1); + set_warning(level, ER_WARN_DATA_TRUNCATED, 1); return error; } From e72f9108efe44d7ae666d0016b22533784f6c293 Mon Sep 17 00:00:00 2001 From: "mskold@mysql.com" <> Date: Tue, 11 Jan 2005 14:06:44 +0100 Subject: [PATCH 23/24] Removed compiler warnings --- sql/ha_ndbcluster.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index b1fbe392940..d21237a0719 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2266,7 +2266,7 @@ void ha_ndbcluster::print_results() char buf[2000]; Field *field; void* ptr; - const NDBCOL *col; + const NDBCOL *col= NULL; NdbValue value; NdbBlob *ndb_blob; @@ -4008,7 +4008,6 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg): handler(table_arg), m_active_trans(NULL), m_active_cursor(NULL), - m_multi_cursor(NULL), m_table(NULL), m_table_info(NULL), m_table_flags(HA_REC_NOT_IN_SEQ | @@ -4037,7 +4036,8 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg): m_force_send(TRUE), m_autoincrement_prefetch(32), m_transaction_on(TRUE), - m_use_local_query_cache(FALSE) + m_use_local_query_cache(FALSE), + m_multi_cursor(NULL) { int i; @@ -5059,8 +5059,9 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p, * pk-op 4 pk-op 4 * range 5 * pk-op 6 pk-ok 6 - - /** + */ + + /** * Variables for loop */ byte *curr= (byte*)buffer->buffer; @@ -5117,7 +5118,7 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p, multi_range_curr->start_key.length)) goto sk; goto range; - case ORDERED_INDEX: + case ORDERED_INDEX: { range: multi_range_curr->range_flag &= ~(uint)UNIQUE_RANGE; if (scanOp == 0) @@ -5152,6 +5153,11 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p, DBUG_RETURN(res); break; } + case(UNDEFINED_INDEX): + DBUG_ASSERT(FALSE); + DBUG_RETURN(1); + break; + } } if (multi_range_curr != multi_range_end) @@ -5238,7 +5244,7 @@ ha_ndbcluster::read_multi_range_next(KEY_MULTI_RANGE ** multi_range_found_p) range_no= m_multi_cursor->get_range_no(); uint current_range_no= multi_range_curr - m_multi_ranges; - if (range_no == current_range_no) + if ((uint) range_no == current_range_no) { DBUG_MULTI_RANGE(4); // return current row From 7f287d963c99e3d2c548f0d0ffce2757019f6f87 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Tue, 11 Jan 2005 17:00:31 +0100 Subject: [PATCH 24/24] removed compiler warnings from ha_ndbcluster --- sql/ha_ndbcluster.cc | 230 +++++++++++-------------------------------- 1 file changed, 60 insertions(+), 170 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index b1fbe392940..c2f97590693 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -156,8 +156,8 @@ static int ndb_to_mysql_error(const NdbError *err) inline int execute_no_commit(ha_ndbcluster *h, NdbTransaction *trans) { - int m_batch_execute= 0; #ifdef NOT_USED + int m_batch_execute= 0; if (m_batch_execute) return 0; #endif @@ -169,8 +169,8 @@ int execute_no_commit(ha_ndbcluster *h, NdbTransaction *trans) inline int execute_commit(ha_ndbcluster *h, NdbTransaction *trans) { - int m_batch_execute= 0; #ifdef NOT_USED + int m_batch_execute= 0; if (m_batch_execute) return 0; #endif @@ -182,8 +182,8 @@ int execute_commit(ha_ndbcluster *h, NdbTransaction *trans) inline int execute_commit(THD *thd, NdbTransaction *trans) { - int m_batch_execute= 0; #ifdef NOT_USED + int m_batch_execute= 0; if (m_batch_execute) return 0; #endif @@ -195,8 +195,8 @@ int execute_commit(THD *thd, NdbTransaction *trans) inline int execute_no_commit_ie(ha_ndbcluster *h, NdbTransaction *trans) { - int m_batch_execute= 0; #ifdef NOT_USED + int m_batch_execute= 0; if (m_batch_execute) return 0; #endif @@ -810,7 +810,7 @@ int ha_ndbcluster::build_index_list(TABLE *tab, enum ILBP phase) { uint i; int error= 0; - const char *name, *index_name; + const char *index_name; char unique_index_name[FN_LEN]; static const char* unique_suffix= "$unique"; KEY* key_info= tab->key_info; @@ -1118,10 +1118,10 @@ ha_ndbcluster::set_index_key(NdbOperation *op, int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf) { - uint no_fields= table->s->fields, i; + uint no_fields= table->s->fields; NdbConnection *trans= m_active_trans; NdbOperation *op; - THD *thd= current_thd; + int res; DBUG_ENTER("pk_read"); DBUG_PRINT("enter", ("key_len: %u", key_len)); @@ -1238,7 +1238,6 @@ int ha_ndbcluster::peek_row() { NdbTransaction *trans= m_active_trans; NdbOperation *op; - THD *thd= current_thd; DBUG_ENTER("peek_row"); NdbOperation::LockMode lm= @@ -1345,8 +1344,11 @@ inline int ha_ndbcluster::fetch_next(NdbScanOperation* cursor) { if (execute_commit(this,trans) != 0) DBUG_RETURN(-1); - int res= trans->restart(); - DBUG_ASSERT(res == 0); + if(trans->restart() != 0) + { + DBUG_ASSERT(0); + DBUG_RETURN(-1); + } } m_ops_pending= 0; } @@ -1441,7 +1443,9 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op, { KEY_PART_INFO *key_part= &key_info->key_part[i]; Field *field= key_part->field; +#ifndef DBUG_OFF uint part_len= key_part->length; +#endif uint part_store_len= key_part->store_length; // Info about each key part struct part_st { @@ -1586,7 +1590,6 @@ int ha_ndbcluster::define_read_attrs(byte* buf, NdbOperation* op) { uint i; THD *thd= current_thd; - NdbTransaction *trans= m_active_trans; DBUG_ENTER("define_read_attrs"); @@ -1780,7 +1783,6 @@ int ha_ndbcluster::filtered_scan(const byte *key, uint key_len, int ha_ndbcluster::full_table_scan(byte *buf) { - uint i; int res; NdbScanOperation *op; NdbTransaction *trans= m_active_trans; @@ -1893,14 +1895,12 @@ int ha_ndbcluster::write_row(byte *record) ((m_rows_inserted % m_bulk_insert_rows) == 0) || set_blob_value) { - THD *thd= current_thd; // Send rows to NDB DBUG_PRINT("info", ("Sending inserts to NDB, "\ "rows_inserted:%d, bulk_insert_rows: %d", (int)m_rows_inserted, (int)m_bulk_insert_rows)); m_bulk_insert_not_flushed= FALSE; - // if (thd->transaction.on) if (m_transaction_on) { if (execute_no_commit(this,trans) != 0) @@ -1918,8 +1918,11 @@ int ha_ndbcluster::write_row(byte *record) no_uncommitted_rows_execute_failure(); DBUG_RETURN(ndb_err(trans)); } - int res= trans->restart(); - DBUG_ASSERT(res == 0); + if(trans->restart() != 0) + { + DBUG_ASSERT(0); + DBUG_RETURN(-1); + } } } if ((has_auto_increment) && (m_skip_auto_increment)) @@ -2220,10 +2223,13 @@ void ha_ndbcluster::unpack_record(byte* buf) { NdbBlob* ndb_blob= (*value).blob; bool isNull= TRUE; - int ret= ndb_blob->getNull(isNull); +#ifndef DBUG_OFF + int ret= +#endif + ndb_blob->getNull(isNull); DBUG_ASSERT(ret == 0); if (isNull) - (*field)->set_null(row_offset); + (*field)->set_null(row_offset); } } } @@ -2252,14 +2258,17 @@ void ha_ndbcluster::unpack_record(byte* buf) void ha_ndbcluster::print_results() { - const NDBTAB *tab= (const NDBTAB*) m_table; DBUG_ENTER("print_results"); #ifndef DBUG_OFF + const NDBTAB *tab= (const NDBTAB*) m_table; if (!_db_on_) DBUG_VOID_RETURN; - + + char buf_type[MAX_FIELD_WIDTH], buf_val[MAX_FIELD_WIDTH]; + String type(buf_type, sizeof(buf_type), &my_charset_bin); + String val(buf_val, sizeof(buf_val), &my_charset_bin); for (uint f=0; fs->fields;f++) { // Use DBUG_PRINT since DBUG_FILE cannot be filtered out @@ -2270,14 +2279,14 @@ void ha_ndbcluster::print_results() NdbValue value; NdbBlob *ndb_blob; - buf[0] = 0; - + buf[0]= 0; + field= table->field[f]; if (!(value= m_value[f]).ptr) { my_snprintf(buf, sizeof(buf), "not read"); goto print_value; } - field= table->field[f]; + ptr= field->ptr; DBUG_DUMP("field->ptr", (char*)ptr, field->pack_length()); col= tab->getColumn(f); @@ -2290,6 +2299,11 @@ void ha_ndbcluster::print_results() my_snprintf(buf, sizeof(buf), "NULL"); goto print_value; } + type.length(0); + val.length(0); + field->sql_type(type); + field->val_str(&val); + my_snprintf(buf, sizeof(buf), "%s %s", type.c_ptr(), val.c_ptr()); } else { @@ -2301,142 +2315,6 @@ void ha_ndbcluster::print_results() goto print_value; } } - - switch (col->getType()) { - case NdbDictionary::Column::Tinyint: { - Int8 value= *(Int8*)ptr; - my_snprintf(buf, sizeof(buf), "Tinyint %d", value); - break; - } - case NdbDictionary::Column::Tinyunsigned: { - Uint8 value= *(Uint8*)ptr; - my_snprintf(buf, sizeof(buf), "Tinyunsigned %u", value); - break; - } - case NdbDictionary::Column::Smallint: { - Int16 value= *(Int16*)ptr; - my_snprintf(buf, sizeof(buf), "Smallint %d", value); - break; - } - case NdbDictionary::Column::Smallunsigned: { - Uint16 value= *(Uint16*)ptr; - my_snprintf(buf, sizeof(buf), "Smallunsigned %u", value); - break; - } - case NdbDictionary::Column::Mediumint: { - byte value[3]; - memcpy(value, ptr, 3); - my_snprintf(buf, sizeof(buf), "Mediumint %d,%d,%d", value[0], value[1], value[2]); - break; - } - case NdbDictionary::Column::Mediumunsigned: { - byte value[3]; - memcpy(value, ptr, 3); - my_snprintf(buf, sizeof(buf), "Mediumunsigned %u,%u,%u", value[0], value[1], value[2]); - break; - } - case NdbDictionary::Column::Int: { - Int32 value= *(Int32*)ptr; - my_snprintf(buf, sizeof(buf), "Int %d", value); - break; - } - case NdbDictionary::Column::Unsigned: { - Uint32 value= *(Uint32*)ptr; - my_snprintf(buf, sizeof(buf), "Unsigned %u", value); - break; - } - case NdbDictionary::Column::Bigint: { - Int64 value= *(Int64*)ptr; - my_snprintf(buf, sizeof(buf), "Bigint %d", (int)value); - break; - } - case NdbDictionary::Column::Bigunsigned: { - Uint64 value= *(Uint64*)ptr; - my_snprintf(buf, sizeof(buf), "Bigunsigned %u", (unsigned)value); - break; - } - case NdbDictionary::Column::Float: { - float value= *(float*)ptr; - my_snprintf(buf, sizeof(buf), "Float %f", (double)value); - break; - } - case NdbDictionary::Column::Double: { - double value= *(double*)ptr; - my_snprintf(buf, sizeof(buf), "Double %f", value); - break; - } - case NdbDictionary::Column::Decimal: { - const char *value= (char*)ptr; - my_snprintf(buf, sizeof(buf), "Decimal '%-*s'", field->pack_length(), value); - break; - } - case NdbDictionary::Column::Char: { - const char *value= (char*)ptr; - my_snprintf(buf, sizeof(buf), "Char '%.*s'", field->pack_length(), value); - break; - } - case NdbDictionary::Column::Varchar: { - uint len= *(uchar*)ptr; - const char *value= (char*)ptr + 1; - my_snprintf(buf, sizeof(buf), "Varchar (%u)'%.*s'", len, len, value); - break; - } - case NdbDictionary::Column::Binary: { - const char *value= (char*)ptr; - my_snprintf(buf, sizeof(buf), "Binary '%.*s'", field->pack_length(), value); - break; - } - case NdbDictionary::Column::Varbinary: { - uint len= *(uchar*)ptr; - const char *value= (char*)ptr + 1; - my_snprintf(buf, sizeof(buf), "Varbinary (%u)'%.*s'", len, len, value); - break; - } - case NdbDictionary::Column::Datetime: { - my_snprintf(buf, sizeof(buf), "Datetime ?"); // fix-me - break; - } - case NdbDictionary::Column::Date: { - my_snprintf(buf, sizeof(buf), "Date ?"); // fix-me - break; - } - case NdbDictionary::Column::Time: { - my_snprintf(buf, sizeof(buf), "Time ?"); // fix-me - break; - } - case NdbDictionary::Column::Blob: { - Uint64 len= 0; - ndb_blob->getLength(len); - my_snprintf(buf, sizeof(buf), "Blob [len=%u]", (unsigned)len); - break; - } - case NdbDictionary::Column::Text: { - Uint64 len= 0; - ndb_blob->getLength(len); - my_snprintf(buf, sizeof(buf), "Text [len=%u]", (unsigned)len); - break; - } - case NdbDictionary::Column::Bit: { - const char *value= (char*)ptr; - my_snprintf(buf, sizeof(buf), "Bit '%.*s'", field->pack_length(), value); - break; - } - case NdbDictionary::Column::Longvarchar: { - uint len= uint2korr(ptr); - const char *value= (char*)ptr + 2; - my_snprintf(buf, sizeof(buf), "Longvarchar (%u)'%.*s'", len, len, value); - break; - } - case NdbDictionary::Column::Longvarbinary: { - uint len= uint2korr(ptr); - const char *value= (char*)ptr + 2; - my_snprintf(buf, sizeof(buf), "Longvarbinary (%u)'%.*s'", len, len, value); - break; - } - case NdbDictionary::Column::Undefined: - my_snprintf(buf, sizeof(buf), "Unknown type: %d", col->getType()); - break; - } print_value: DBUG_PRINT("value", ("%u,%s: %s", f, col->getName(), buf)); @@ -2685,8 +2563,11 @@ int ha_ndbcluster::rnd_init(bool scan) { if (!scan) DBUG_RETURN(1); - int res= cursor->restart(m_force_send); - DBUG_ASSERT(res == 0); + if(cursor->restart(m_force_send) != 0) + { + DBUG_ASSERT(0); + DBUG_RETURN(-1); + } } index_init(table->s->primary_key); DBUG_RETURN(0); @@ -2801,13 +2682,15 @@ void ha_ndbcluster::position(const byte *record) DBUG_PRINT("info", ("Getting hidden key")); int hidden_no= table->s->fields; const NdbRecAttr* rec= m_value[hidden_no].rec; + memcpy(ref, (const void*)rec->aRef(), ref_length); +#ifndef DBUG_OFF const NDBTAB *tab= (const NDBTAB *) m_table; const NDBCOL *hidden_col= tab->getColumn(hidden_no); DBUG_ASSERT(hidden_col->getPrimaryKey() && hidden_col->getAutoIncrement() && rec != NULL && ref_length == NDB_HIDDEN_PRIMARY_KEY_LENGTH); - memcpy(ref, (const void*)rec->aRef(), ref_length); +#endif } DBUG_DUMP("ref", (char*)ref, ref_length); @@ -3335,12 +3218,14 @@ int ha_ndbcluster::start_stmt(THD *thd) if (!trans){ Ndb *ndb= ((Thd_ndb*)thd->transaction.thd_ndb)->ndb; DBUG_PRINT("trans",("Starting transaction stmt")); - + +#if 0 NdbTransaction *tablock_trans= (NdbTransaction*)thd->transaction.all.ndb_tid; DBUG_PRINT("info", ("tablock_trans: %x", (uint)tablock_trans)); DBUG_ASSERT(tablock_trans); // trans= ndb->hupp(tablock_trans); +#endif trans= ndb->startTransaction(); if (trans == NULL) ERR_RETURN(ndb->getNdbError()); @@ -3675,7 +3560,6 @@ int ha_ndbcluster::create(const char *name, NDBCOL col; uint pack_length, length, i, pk_length= 0; const void *data, *pack_data; - const char **key_names= form->s->keynames.type_names; char name2[FN_HEADLEN]; bool create_from_engine= (info->table_options & HA_CREATE_FROM_ENGINE); @@ -3908,7 +3792,6 @@ int ha_ndbcluster::alter_table_name(const char *to) Ndb *ndb= get_ndb(); NDBDICT *dict= ndb->getDictionary(); const NDBTAB *orig_tab= (const NDBTAB *) m_table; - int ret; DBUG_ENTER("alter_table_name_table"); NdbDictionary::Table new_tab= *orig_tab; @@ -4512,15 +4395,21 @@ bool ndbcluster_init() } else if(res == 1) { - if (g_ndb_cluster_connection->start_connect_thread()) { + if (g_ndb_cluster_connection->start_connect_thread()) + { DBUG_PRINT("error", ("g_ndb_cluster_connection->start_connect_thread()")); goto ndbcluster_init_error; } +#ifndef DBUG_OFF { char buf[1024]; - DBUG_PRINT("info",("NDBCLUSTER storage engine not started, will connect using %s", - g_ndb_cluster_connection->get_connectstring(buf,sizeof(buf)))); + DBUG_PRINT("info", + ("NDBCLUSTER storage engine not started, " + "will connect using %s", + g_ndb_cluster_connection-> + get_connectstring(buf,sizeof(buf)))); } +#endif } else { @@ -5059,8 +4948,9 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p, * pk-op 4 pk-op 4 * range 5 * pk-op 6 pk-ok 6 - - /** + */ + + /** * Variables for loop */ byte *curr= (byte*)buffer->buffer;