From 1e630458f76f10bdbad0975b64a93b9119a5cd17 Mon Sep 17 00:00:00 2001 From: "stewart@mysql.com" <> Date: Wed, 7 Dec 2005 11:11:59 +0100 Subject: [PATCH 01/13] New tool to collate all information to form a good error report for NDB. It will copy from each node the logs and trace dumps (if any) and create a tarball. Having this tarball attached to a bug report greatly helps troubleshooting and avoids user error. It will (optionally) also get the filesystem. --- ndb/tools/ndb_error_reporter | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 ndb/tools/ndb_error_reporter diff --git a/ndb/tools/ndb_error_reporter b/ndb/tools/ndb_error_reporter new file mode 100755 index 00000000000..2b5aadb6171 --- /dev/null +++ b/ndb/tools/ndb_error_reporter @@ -0,0 +1,88 @@ +#!/usr/bin/perl -w + +use strict; + +if(@ARGV < 1) +{ + print STDERR "Usage:\n"; + print STDERR "\tndb_error_reporter config.ini [username] [--fs]\n\n"; + print STDERR "\tusername is a user that you can use to ssh into\n"; + print STDERR "\t all of your nodes with.\n\n"; + print STDERR "\t--fs means include the filesystems in the report\n"; + print STDERR "\t WARNING: This may require a lot of disk space.\n"; + print STDERR "\t Only use this option when asked to.\n\n"; + exit(1); +} + +my $config_file= $ARGV[0]; +my $config_get_fs= 0; +my $config_username= ''; +if(defined($ARGV[1])) +{ + $config_get_fs= 1 if $ARGV[1] eq '--fs'; + $config_username= $ARGV[1].'@' if $ARGV[1] ne '--fs'; + $config_get_fs= (defined $ARGV[2] && $ARGV[2] eq '--fs')?1:$config_get_fs; +} + +if(!stat($config_file)) +{ + print STDERR "Cannot open configuration file.\n\n"; + exit(1); +} + +my @nodes= split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndbd`; + +push @nodes, split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndb_mgmd`; + +sub config { + my $nodeid= shift; + my $query= shift; + my $res= `ndb_config --config-file=$ARGV[0] --id=$nodeid --query=$query`; + chomp $res; + $res; +} + +my @t= localtime(); +my $reportdir= sprintf('ndb_error_report_%u%02u%02u%02u%02u%02u', + ($t[5]+1900),($t[4]+1),$t[3],$t[2],$t[1],$t[0]); + +if(stat($reportdir) || stat($reportdir.'tar.bz2')) +{ + print STDERR "It looks like another ndb_error_report process is running.\n"; + print STDERR "If that is not the case, remove the ndb_error_report directory"; + print STDERR " and run ndb_error_report again.\n\n"; + exit(1); +} + +mkdir($reportdir); + +foreach my $node (@nodes) +{ + print "\n\n Copying data from node $node". + (($config_get_fs)?" with filesystem":""). + "\n\n"; + my $recurse= ($config_get_fs)?'-r ':''; + system 'scp '.$recurse.$config_username.config($node,'host'). + ':'.config($node,'datadir')."/ndb_".$node."* ". + "$reportdir/\n"; +} + +print "\n\n Copying configuration file...\n\n\t$config_file\n\n"; +system "cp $config_file $reportdir/"; + +my $r = system 'bzip2 2>&1 > /dev/null < /dev/null'; +my $outfile; +if($r==0) +{ + $outfile= "$reportdir.tar.bz2"; + system "tar c $reportdir|bzip2 > $outfile"; +} +else +{ + $outfile= "$reportdir.tar.gz"; + system "tar c $reportdir|gzip > $outfile"; +} + +system "rm -rf $reportdir"; + +print "\n\nPlease attach $outfile to your error report\n\n"; From 297d80dc110d469374827a7f3aca400530f7818a Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sun, 18 Dec 2005 13:30:01 +0100 Subject: [PATCH 02/13] BUG#11336 - fulltext index corruption after repair_by_sort and mi_delete for uca collation isalnum and strnncollsp don't agree on whether 0xC2A0 is a space (strnncollsp is right, isalnum is wrong). they still don't, the bug was fixed by avoiding strnncollsp --- myisam/mi_delete.c | 2 +- mysql-test/r/fulltext2.result | 21 +++++++++++++++++++++ mysql-test/t/fulltext2.test | 32 +++++++++++++++++++++++++++++++- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c index 833223221ec..6c302aecea1 100644 --- a/myisam/mi_delete.c +++ b/myisam/mi_delete.c @@ -157,7 +157,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo, goto err; } if ((error=d_search(info,keyinfo, - (keyinfo->flag & HA_FULLTEXT ? SEARCH_FIND + (keyinfo->flag & HA_FULLTEXT ? SEARCH_FIND | SEARCH_UPDATE : SEARCH_SAME), key,key_length,old_root,root_buff)) >0) { diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index 0b1d8eb9a15..72c6b2d22ed 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -215,3 +215,24 @@ select count(*) from t1 where match a against ('aaazzz' in boolean mode); count(*) 262 drop table t1; +set names utf8; +create table t1(a text,fulltext(a)) collate=utf8_swedish_ci; +insert into t1 values('test test '),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'); +delete from t1 limit 1; +drop table t1; +set names latin1; diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test index bcd39b9ea04..7a7b572d58f 100644 --- a/mysql-test/t/fulltext2.test +++ b/mysql-test/t/fulltext2.test @@ -179,7 +179,37 @@ update t1 set a='aaaxxx' where a = 'aaayyy'; select count(*) from t1 where match a against ('aaaxxx' in boolean mode); select count(*) from t1 where match a against ('aaayyy' in boolean mode); select count(*) from t1 where match a against ('aaazzz' in boolean mode); - drop table t1; +# +# BUG#11336 +# +# for uca collation isalnum and strnncollsp don't agree on whether +# 0xC2A0 is a space (strnncollsp is right, isalnum is wrong). +# +# they still don't, the bug was fixed by avoiding strnncollsp +# + +set names utf8; +create table t1(a text,fulltext(a)) collate=utf8_swedish_ci; +insert into t1 values('test test '),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'), +('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'); +delete from t1 limit 1; +drop table t1; +set names latin1; + # End of 4.1 tests From 7d6f1e470944f944c24a7980ec00442f9b88d504 Mon Sep 17 00:00:00 2001 From: "stewart@mysql.com" <> Date: Wed, 21 Dec 2005 00:18:58 +1100 Subject: [PATCH 03/13] build fix --- ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 733d0fc9951..6bb499eff18 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -11020,7 +11020,7 @@ void Dbdih::initCommonData() ndb_mgm_get_int_parameter(p, CFG_DB_NO_REPLICAS, &cnoReplicas); if (cnoReplicas > 4) { - progError(__LINE__, NDBD_EXIT_INVALID_CONFIG, + progError(__LINE__, ERR_INVALID_CONFIG, "Only up to four replicas are supported. Check NoOfReplicas."); } From f5cc3fd619f524c2c7a8d880ac1152d68875eaf9 Mon Sep 17 00:00:00 2001 From: "paul@snake-hub.snake.net" <> Date: Tue, 20 Dec 2005 12:47:44 -0600 Subject: [PATCH 04/13] mysql.cc: Typo in help message. --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 14a27413687..d76195535a3 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -254,7 +254,7 @@ static COMMANDS commands[] = { { "quit", 'q', com_quit, 0, "Quit mysql." }, { "rehash", '#', com_rehash, 0, "Rebuild completion hash." }, { "source", '.', com_source, 1, - "Execute a SQL script file. Takes a file name as an argument."}, + "Execute an SQL script file. Takes a file name as an argument."}, { "status", 's', com_status, 0, "Get status information from the server."}, #ifdef USE_POPEN { "system", '!', com_shell, 1, "Execute a system shell command."}, From 9dceb4f32ea02d021b48d7dceb6795a366ebe6ce Mon Sep 17 00:00:00 2001 From: "knielsen@mysql.com" <> Date: Wed, 21 Dec 2005 15:19:11 +0100 Subject: [PATCH 05/13] BUG#15842: Change in "item.cc" adding Item_sp_variable breaks compile on HP-UX 11.23 Fix: make explicit conversion to non-constant string (char *). Backported from 5.1 changeset 1.1968 05/12/19 17:36:20 kent@mysql.com +2 -0 --- sql/item.cc | 2 +- sql/sql_trigger.cc | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index 659970f2a91..210e5014f44 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -949,7 +949,7 @@ void Item_splocal::print(String *str) *****************************************************************************/ Item_case_expr::Item_case_expr(int case_expr_id) - :Item_sp_variable(STRING_WITH_LEN("case_expr")), + :Item_sp_variable((char *) STRING_WITH_LEN("case_expr")), m_case_expr_id(case_expr_id) { } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 779b044696e..55f8d4801bd 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -21,7 +21,7 @@ #include "parse_file.h" static const LEX_STRING triggers_file_type= - {STRING_WITH_LEN("TRIGGERS")}; + {(char *) STRING_WITH_LEN("TRIGGERS")}; const char * const triggers_file_ext= ".TRG"; @@ -34,17 +34,17 @@ const char * const triggers_file_ext= ".TRG"; static File_option triggers_file_parameters[]= { { - {STRING_WITH_LEN("triggers") }, + {(char *) STRING_WITH_LEN("triggers") }, offsetof(class Table_triggers_list, definitions_list), FILE_OPTIONS_STRLIST }, { - {STRING_WITH_LEN("sql_modes") }, + {(char *) STRING_WITH_LEN("sql_modes") }, offsetof(class Table_triggers_list, definition_modes_list), FILE_OPTIONS_ULLLIST }, { - {STRING_WITH_LEN("definers") }, + {(char *) STRING_WITH_LEN("definers") }, offsetof(class Table_triggers_list, definers_list), FILE_OPTIONS_STRLIST }, @@ -71,7 +71,7 @@ struct st_trigname }; static const LEX_STRING trigname_file_type= - {STRING_WITH_LEN("TRIGGERNAME")}; + {(char *) STRING_WITH_LEN("TRIGGERNAME")}; const char * const trigname_file_ext= ".TRN"; @@ -82,7 +82,7 @@ static File_option trigname_file_parameters[]= FIXME: Length specified for "trigger_table" key is erroneous, problem caused by this are reported as BUG#14090 and should be fixed ASAP. */ - {STRING_WITH_LEN("trigger_table")}, + {(char *) STRING_WITH_LEN("trigger_table")}, offsetof(struct st_trigname, trigger_table), FILE_OPTIONS_ESTRING }, @@ -1236,7 +1236,7 @@ Handle_old_incorrect_sql_modes_hook::process_unknown_string(char *&unknown_key, (char *)path, "TRIGGER"); File_option sql_modes_parameters= { - {STRING_WITH_LEN("sql_modes") }, + {(char *) STRING_WITH_LEN("sql_modes") }, offsetof(class Table_triggers_list, definition_modes_list), FILE_OPTIONS_ULLLIST }; From 4e37b62ff92383ceae3420a2bd0d74842c9a3205 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Wed, 21 Dec 2005 18:50:06 +0100 Subject: [PATCH 06/13] Increment the version number to 5.0.19 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index b3d4a587bea..b5c31361b26 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.18) +AM_INIT_AUTOMAKE(mysql, 5.0.19) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -18,7 +18,7 @@ SHARED_LIB_VERSION=15:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=18 +NDB_VERSION_BUILD=19 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From e5281df9f7e11c5f7913496835048c6f6b79d753 Mon Sep 17 00:00:00 2001 From: "paul@frost.snake.net" <> Date: Thu, 22 Dec 2005 13:02:53 -0600 Subject: [PATCH 07/13] mysqltest.c: Put options in order. Add #ifdef around --debug for non-debug builds. --- client/mysqltest.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index ba1b92b31a3..3a4ce5ce7cf 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2731,10 +2731,8 @@ end: static struct my_option my_long_options[] = { - {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", - 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"database", 'D', "Database to use.", (gptr*) &db, (gptr*) &db, 0, - GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, + 0, 0, 0, 0, 0, 0}, {"basedir", 'b', "Basedir for tests.", (gptr*) &opt_basedir, (gptr*) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"big-test", 'B', "Define BIG_TEST to 1.", (gptr*) &opt_big_test, @@ -2742,13 +2740,17 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use the compressed server/client protocol.", (gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, - 0, 0, 0, 0, 0, 0}, + {"database", 'D', "Database to use.", (gptr*) &db, (gptr*) &db, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef DBUG_OFF + {"debug", '#', "This is a non-debug version. Catch this and exit", + 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#else + {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", + 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"manager-user", OPT_MANAGER_USER, "Undocumented: Used for debugging.", - (gptr*) &manager_user, (gptr*) &manager_user, 0, GET_STR, REQUIRED_ARG, 0, - 0, 0, 0, 0, 0}, {"manager-host", OPT_MANAGER_HOST, "Undocumented: Used for debugging.", (gptr*) &manager_host, (gptr*) &manager_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -2757,6 +2759,9 @@ static struct my_option my_long_options[] = {"manager-port", OPT_MANAGER_PORT, "Undocumented: Used for debugging.", (gptr*) &manager_port, (gptr*) &manager_port, 0, GET_INT, REQUIRED_ARG, MYSQL_MANAGER_PORT, 0, 0, 0, 0, 0}, + {"manager-user", OPT_MANAGER_USER, "Undocumented: Used for debugging.", + (gptr*) &manager_user, (gptr*) &manager_user, 0, GET_STR, REQUIRED_ARG, 0, + 0, 0, 0, 0, 0}, {"manager-wait-timeout", OPT_MANAGER_WAIT_TIMEOUT, "Undocumented: Used for debugging.", (gptr*) &manager_wait_timeout, (gptr*) &manager_wait_timeout, 0, GET_INT, REQUIRED_ARG, 3, 0, 0, 0, 0, 0}, From 7f843ffe870c71b1dce84a267af580ddadfa33be Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Fri, 23 Dec 2005 14:20:00 +0400 Subject: [PATCH 08/13] ctype_uca.result, ctype_uca.test: Adding test case. charset-def.c: Initialize new collation. ctype-uca.c: Adding simplified Hungarian collation. --- mysql-test/r/ctype_uca.result | 106 ++++++++++++++++++++++++++++++++++ mysql-test/t/ctype_uca.test | 1 + mysys/charset-def.c | 4 ++ strings/ctype-uca.c | 73 +++++++++++++++++++++++ 4 files changed, 184 insertions(+) diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 4b245c69d2a..3e286c77c00 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -2015,6 +2015,112 @@ Z,z,Ź,ź,Ż,ż,Ž,ž ǁ ǂ ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_hungarian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Á,Â,Ã,Ä,Å,à,á,â,ã,ä,å,Ā,ā,Ă,ă,Ą,ą,Ǎ,ǎ,Ǟ,ǟ,Ǡ,ǡ,Ǻ,ǻ +AA,Aa,aA,aa +Æ,æ,Ǣ,ǣ,Ǽ,ǽ +B,b +ƀ +Ɓ +Ƃ,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,Ċ,ċ,Č,č +CH,Ch,cH,ch +Ƈ,ƈ +D,d,Ď,ď +DZ,Dz,dZ,dz,DŽ,Dž,dž,DZ,Dz,dz +Đ,đ +Ɖ +Ɗ +Ƌ,ƌ +Ð,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ē,ē,Ĕ,ĕ,Ė,ė,Ę,ę,Ě,ě +Ǝ,ǝ +Ə +Ɛ +F,f +Ƒ,ƒ +G,g,Ĝ,ĝ,Ğ,ğ,Ġ,ġ,Ģ,ģ,Ǧ,ǧ,Ǵ,ǵ +Ǥ,ǥ +Ɠ +Ɣ +Ƣ,ƣ +H,h,Ĥ,ĥ +ƕ,Ƕ +Ħ,ħ +I,i,Ì,Í,Î,Ï,ì,í,î,ï,Ĩ,ĩ,Ī,ī,Ĭ,ĭ,Į,į,İ,Ǐ,ǐ +IJ,Ij,iJ,ij,IJ,ij +ı +Ɨ +Ɩ +J,j,Ĵ,ĵ,ǰ +K,k,Ķ,ķ,Ǩ,ǩ +Ƙ,ƙ +L,l,Ĺ,ĺ,Ļ,ļ,Ľ,ľ +Ŀ,ŀ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Ł,ł +ƚ +ƛ +M,m +N,n,Ñ,ñ,Ń,ń,Ņ,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,NJ,Nj,nj +Ɲ +ƞ +Ŋ,ŋ +O,o,Ò,Ó,Ô,Õ,ò,ó,ô,õ,Ō,ō,Ŏ,ŏ,Ơ,ơ,Ǒ,ǒ,Ǫ,ǫ,Ǭ,ǭ +OE,Oe,oE,oe,Œ,œ +Ö,ö,Ő,ő +Ø,ø,Ǿ,ǿ +Ɔ +Ɵ +P,p +Ƥ,ƥ +Q,q +ĸ +R,r,Ŕ,ŕ,Ŗ,ŗ,Ř,ř +RR,Rr,rR,rr +Ʀ +S,s,Ś,ś,Ŝ,ŝ,Ş,ş,Š,š,ſ +SS,Ss,sS,ss,ß +Ʃ +ƪ +T,t,Ţ,ţ,Ť,ť +ƾ +Ŧ,ŧ +ƫ +Ƭ,ƭ +Ʈ +U,u,Ù,Ú,Û,ù,ú,û,Ũ,ũ,Ū,ū,Ŭ,ŭ,Ů,ů,Ų,ų,Ư,ư,Ǔ,ǔ,Ǖ,ǖ,Ǘ,ǘ,Ǚ,ǚ,Ǜ,ǜ +Ü,ü,Ű,ű +Ɯ +Ʊ +V,v +Ʋ +W,w,Ŵ,ŵ +X,x +Y,y,Ý,ý,ÿ,Ŷ,ŷ,Ÿ +Ƴ,ƴ +Z,z,Ź,ź,Ż,ż,Ž,ž +ƍ +Ƶ,ƶ +Ʒ,Ǯ,ǯ +Ƹ,ƹ +ƺ +Þ,þ +ƿ,Ƿ +ƻ +Ƨ,ƨ +Ƽ,ƽ +Ƅ,ƅ +ʼn +ǀ +ǁ +ǂ +ǃ drop table t1; SET NAMES utf8; CREATE TABLE t1 (c varchar(255) NOT NULL COLLATE utf8_general_ci, INDEX (c)); diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 6d8713f4910..3e49b9de883 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -212,6 +212,7 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_esperanto_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_hungarian_ci; drop table t1; diff --git a/mysys/charset-def.c b/mysys/charset-def.c index 5b30d1ee135..0559fe59d06 100644 --- a/mysys/charset-def.c +++ b/mysys/charset-def.c @@ -43,6 +43,7 @@ extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci; extern CHARSET_INFO my_charset_ucs2_roman_uca_ci; extern CHARSET_INFO my_charset_ucs2_persian_uca_ci; extern CHARSET_INFO my_charset_ucs2_esperanto_uca_ci; +extern CHARSET_INFO my_charset_ucs2_hungarian_uca_ci; #endif #ifdef HAVE_CHARSET_utf8 @@ -64,6 +65,7 @@ extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci; extern CHARSET_INFO my_charset_utf8_roman_uca_ci; extern CHARSET_INFO my_charset_utf8_persian_uca_ci; extern CHARSET_INFO my_charset_utf8_esperanto_uca_ci; +extern CHARSET_INFO my_charset_utf8_hungarian_uca_ci; #ifdef HAVE_UTF8_GENERAL_CS extern CHARSET_INFO my_charset_utf8_general_cs; #endif @@ -151,6 +153,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_ucs2_roman_uca_ci); add_compiled_collation(&my_charset_ucs2_persian_uca_ci); add_compiled_collation(&my_charset_ucs2_esperanto_uca_ci); + add_compiled_collation(&my_charset_ucs2_hungarian_uca_ci); #endif #endif @@ -184,6 +187,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_utf8_roman_uca_ci); add_compiled_collation(&my_charset_utf8_persian_uca_ci); add_compiled_collation(&my_charset_utf8_esperanto_uca_ci); + add_compiled_collation(&my_charset_utf8_hungarian_uca_ci); #endif #endif diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 4768e42a0b0..b18e5ee59d2 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -6705,6 +6705,14 @@ static const char esperanto[]= "& S < \\u015d <<< \\u015c" "& U < \\u016d <<< \\u016c"; +/* + A simplified version of Hungarian, without consonant contractions. +*/ +static const char hungarian[]= + "&O < \\u00F6 <<< \\u00D6 << \\u0151 <<< \\u0150" + "&U < \\u00FC <<< \\u00DC << \\u0171 <<< \\u0170"; + + /* Unicode Collation Algorithm: Collation element (weight) scanner, @@ -8627,6 +8635,39 @@ CHARSET_INFO my_charset_ucs2_esperanto_uca_ci= }; +CHARSET_INFO my_charset_ucs2_hungarian_uca_ci= +{ + 146,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_hungarian_ci",/* name */ + "", /* comment */ + hungarian, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + my_unicase_default, /* caseinfo */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 1, /* caseup_multiply */ + 1, /* casedn_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + + #endif @@ -9252,6 +9293,38 @@ CHARSET_INFO my_charset_utf8_esperanto_uca_ci= &my_collation_any_uca_handler }; +CHARSET_INFO my_charset_utf8_hungarian_uca_ci= +{ + 210,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_hungarian_ci",/* name */ + "", /* comment */ + hungarian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + my_unicase_default, /* caseinfo */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 1, /* caseup_multiply */ + 1, /* casedn_multiply */ + 1, /* mbminlen */ + 3, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + #endif /* HAVE_CHARSET_utf8 */ #endif /* HAVE_UCA_COLLATIONS */ From 7b049bf2cd050d07713b51b67a0c015066c1f6ae Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 23 Dec 2005 12:38:22 +0100 Subject: [PATCH 09/13] correct help text --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index cc9bec35242..7b9e7d54d8f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4370,7 +4370,7 @@ Disable with --skip-bdb (will save memory).", {"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE, - "Don't use client side character set value sent during handshake.", + "Don't ignore client side character set value sent during handshake.", (gptr*) &opt_character_set_client_handshake, (gptr*) &opt_character_set_client_handshake, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, From c0638190759a616adc447207e18c155c81132ee9 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 23 Dec 2005 20:50:28 +0100 Subject: [PATCH 10/13] locking issues, test for LONGLONG_MIN in decimal.c --- myisam/mi_create.c | 5 +++-- mysys/thr_alarm.c | 26 +++++++++-------------- server-tools/instance-manager/instance.cc | 3 +++ strings/decimal.c | 7 +++--- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 6d4106afda5..1a17febe94a 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -72,7 +72,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, } LINT_INIT(dfile); LINT_INIT(file); - pthread_mutex_lock(&THR_LOCK_myisam); errpos=0; options=0; bzero((byte*) &share,sizeof(share)); @@ -135,7 +134,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, pack_reclength++; min_pack_length++; /* We must test for 257 as length includes pack-length */ - if (test(rec->length >= 257)) + if (test(rec->length >= 257)) { long_varchar_count++; pack_reclength+= 2; /* May be packed on 3 bytes */ @@ -542,6 +541,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (! (flags & HA_DONT_TOUCH_DATA)) share.state.create_time= (long) time((time_t*) 0); + pthread_mutex_lock(&THR_LOCK_myisam); + if (ci->index_file_name) { fn_format(filename, ci->index_file_name,"",MI_NAME_IEXT,4); diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index e5b77de5e38..41914080a9d 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -401,7 +401,7 @@ void end_thr_alarm(my_bool free_structures) { DBUG_ENTER("end_thr_alarm"); if (alarm_aborted != 1) /* If memory not freed */ - { + { pthread_mutex_lock(&LOCK_alarm); DBUG_PRINT("info",("Resheduling %d waiting alarms",alarm_queue.elements)); alarm_aborted= -1; /* mark aborted */ @@ -415,13 +415,10 @@ void end_thr_alarm(my_bool free_structures) if (free_structures) { struct timespec abstime; - /* - The following test is just for safety, the caller should not - depend on this - */ - DBUG_ASSERT(!alarm_queue.elements); - /* Wait until alarm thread dies */ + DBUG_ASSERT(!alarm_queue.elements); + + /* Wait until alarm thread dies */ set_timespec(abstime, 10); /* Wait up to 10 seconds */ while (alarm_thread_running) { @@ -429,16 +426,13 @@ void end_thr_alarm(my_bool free_structures) if (error == ETIME || error == ETIMEDOUT) break; /* Don't wait forever */ } - if (!alarm_queue.elements) + delete_queue(&alarm_queue); + alarm_aborted= 1; + pthread_mutex_unlock(&LOCK_alarm); + if (!alarm_thread_running) /* Safety */ { - delete_queue(&alarm_queue); - alarm_aborted= 1; - pthread_mutex_unlock(&LOCK_alarm); - if (!alarm_thread_running) /* Safety */ - { - pthread_mutex_destroy(&LOCK_alarm); - pthread_cond_destroy(&COND_alarm); - } + pthread_mutex_destroy(&LOCK_alarm); + pthread_cond_destroy(&COND_alarm); } } else diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index 3d54d000d5f..3d04403f830 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -255,7 +255,10 @@ static void start_and_monitor_instance(Instance_options *old_instance_options, log_info("starting instance %s", instance_name_buff); if (start_process(old_instance_options, &process_info)) + { + instance_map->unlock(); return; /* error is logged */ + } /* allow users to delete instances */ instance_map->unlock(); diff --git a/strings/decimal.c b/strings/decimal.c index 0c1f03016e0..5fb37d374a2 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1069,9 +1069,9 @@ int decimal2longlong(decimal_t *from, longlong *to) } } /* boundary case: 9223372036854775808 */ - if (unlikely(from->sign==0 && x < 0 && -x < 0)) + if (unlikely(from->sign==0 && x == LONGLONG_MIN)) { - *to= -1-x; + *to= LONGLONG_MAX; return E_DEC_OVERFLOW; } @@ -2675,7 +2675,8 @@ void test_pr(const char *s1, int prec, int dec, char filler, const char *orig, int slen= sizeof(s2); int res; - sprintf(s, "'%s', %d, %d, '%c'", s1, prec, dec, filler); + sprintf(s, filler ? "'%s', %d, %d, '%c'" : "'%s', %d, %d, '\\0'", + s1, prec, dec, filler); end= strend(s1); string2decimal(s1, &a, &end); res= decimal2string(&a, s2, &slen, prec, dec, filler); From d5d6b51422cdaf785eaad49e8e528b55211694c4 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sat, 24 Dec 2005 14:32:50 +0100 Subject: [PATCH 11/13] remove "defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__)" unmaintainably scattered all over the source --- include/config-netware.h | 3 ++- sql/ha_archive.cc | 2 +- sql/handler.cc | 6 +++--- sql/mysqld.cc | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/config-netware.h b/include/config-netware.h index 7def0053bf2..f517e3c34d3 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -72,9 +72,10 @@ extern "C" { #undef HAVE_CRYPT #endif /* HAVE_OPENSSL */ -/* Configure can't detect this because it uses AC_TRY_RUN */ +/* Netware has an ancient zlib */ #undef HAVE_COMPRESS #define HAVE_COMPRESS +#undef HAVE_ARCHIVE_DB /* include the old function apis */ #define USE_OLD_FUNCTIONS 1 diff --git a/sql/ha_archive.cc b/sql/ha_archive.cc index 2747f678cc3..c60d40c2685 100644 --- a/sql/ha_archive.cc +++ b/sql/ha_archive.cc @@ -20,7 +20,7 @@ #include "mysql_priv.h" -#if defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__) +#if defined(HAVE_ARCHIVE_DB) #include "ha_archive.h" #include diff --git a/sql/handler.cc b/sql/handler.cc index 47010de3002..4c60f460a23 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -60,7 +60,7 @@ handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, HTON_NO_FLAGS }; #endif -#if defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__) +#if defined(HAVE_ARCHIVE_DB) #include "ha_archive.h" extern handlerton archive_hton; #else @@ -314,7 +314,7 @@ handler *get_new_handler(TABLE *table, MEM_ROOT *alloc, enum db_type db_type) case DB_TYPE_EXAMPLE_DB: return new (alloc) ha_example(table); #endif -#if defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__) +#if defined(HAVE_ARCHIVE_DB) case DB_TYPE_ARCHIVE_DB: return new (alloc) ha_archive(table); #endif @@ -513,7 +513,7 @@ int ha_panic(enum ha_panic_function flag) if (have_federated_db == SHOW_OPTION_YES) error|= federated_db_end(); #endif -#if defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__) +#if defined(HAVE_ARCHIVE_DB) if (have_archive_db == SHOW_OPTION_YES) error|= archive_db_end(); #endif diff --git a/sql/mysqld.cc b/sql/mysqld.cc index aaa467603f5..2705615111a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6323,7 +6323,7 @@ static void mysql_init_variables(void) #else have_example_db= SHOW_OPTION_NO; #endif -#if defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__) +#if defined(HAVE_ARCHIVE_DB) have_archive_db= SHOW_OPTION_YES; #else have_archive_db= SHOW_OPTION_NO; From 14384b840168f8cedfda0ec728e7d406b1b515bb Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Tue, 27 Dec 2005 02:01:58 +0200 Subject: [PATCH 12/13] Avoiding conditional jump on uninitialized variable (BUG#14904). --- mysys/my_copy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mysys/my_copy.c b/mysys/my_copy.c index 072492172e3..2fb022a25f2 100644 --- a/mysys/my_copy.c +++ b/mysys/my_copy.c @@ -53,7 +53,7 @@ struct utimbuf { int my_copy(const char *from, const char *to, myf MyFlags) { uint Count; - my_bool new_file_stat; /* 1 if we could stat "to" */ + my_bool new_file_stat= 0; /* 1 if we could stat "to" */ int create_flag; File from_file,to_file; char buff[IO_SIZE]; @@ -62,7 +62,6 @@ int my_copy(const char *from, const char *to, myf MyFlags) DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags)); from_file=to_file= -1; - LINT_INIT(new_file_stat); DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); From cb25f0f039f48c5c29e9a6f74e0dcc6a71d52e75 Mon Sep 17 00:00:00 2001 From: "stewart@mysql.com" <> Date: Wed, 28 Dec 2005 01:32:03 +1100 Subject: [PATCH 13/13] 5.0 ndb build fix. --- ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index ebfb46c7043..2a28c4db770 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -11137,7 +11137,7 @@ void Dbdih::initCommonData() ndb_mgm_get_int_parameter(p, CFG_DB_NO_REPLICAS, &cnoReplicas); if (cnoReplicas > 4) { - progError(__LINE__, ERR_INVALID_CONFIG, + progError(__LINE__, NDBD_EXIT_INVALID_CONFIG, "Only up to four replicas are supported. Check NoOfReplicas."); }