From 4672d762ed8c4e372594f5aaff4aea2dd55fa2b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Jul 2006 12:36:10 -0400 Subject: [PATCH 1/7] Bug #18777: Mysqlhotcopy does not copy all the direcories. scripts/mysqlhotcopy.sh: Defined new raid directory regular expression variable that allows a mix of two alphanumeric characters. Replaced hardcode raid directory regular expressions with new variable. --- scripts/mysqlhotcopy.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index f9e29e33195..b3ea9dc4035 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -262,6 +262,7 @@ my $hc_locks = ""; my $hc_tables = ""; my $num_tables = 0; my $num_files = 0; +my $raid_dir_regex = '[A-Za-z0-9]{2}'; foreach my $rdb ( @db_desc ) { my $db = $rdb->{src}; @@ -296,7 +297,7 @@ foreach my $rdb ( @db_desc ) { my @raid_dir = (); while ( defined( my $name = readdir DBDIR ) ) { - if ( $name =~ /^\d\d$/ && -d "$db_dir/$name" ) { + if ( $name =~ /^$raid_dir_regex$/ && -d "$db_dir/$name" ) { push @raid_dir, $name; } else { @@ -604,7 +605,7 @@ sub copy_files { # add recursive option for scp $cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/; - my @non_raid = map { "'$_'" } grep { ! m:/\d{2}/[^/]+$: } @$files; + my @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files; # add files to copy and the destination directory safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid); @@ -797,7 +798,7 @@ sub get_raid_dirs { my %dirs = (); foreach my $f ( @$r_files ) { - if ( $f =~ m:^(\d\d)/: ) { + if ( $f =~ m:^($raid_dir_regex)/: ) { $dirs{$1} = 1; } } From e24fbb7252fde012a93a63bf1785284e92c10b0a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Sep 2006 10:06:03 +0500 Subject: [PATCH 2/7] Adding a new test for bug N17939 --- mysql-test/r/mysql.result | 10 ++++++++++ mysql-test/t/mysql.test | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 99633f5e12a..9e8caf7ef8e 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -76,6 +76,16 @@ c_cp932 | >a < | 0123456789 | 4 | | >abcd< | | 4 | +----------------------+------------+--------+ ++-------------------+ +| __tañgè Ñãmé | ++-------------------+ +| John Doe | ++-------------------+ ++-------------------+ +| John Doe | ++-------------------+ +| __tañgè Ñãmé | ++-------------------+ +------+------+---------------------------+ | i | j | k | +------+------+---------------------------+ diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index cf4e6f4047c..c768c0e6bbc 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -62,6 +62,12 @@ drop table t1; # --exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1 +# +# Bug#17939 Wrong table format when using UTF8 strings +# +--exec $MYSQL --default-character-set=utf8 --table -e "SELECT 'John Doe' as '__tañgè Ñãmé'" 2>&1 +--exec $MYSQL --default-character-set=utf8 --table -e "SELECT '__tañgè Ñãmé' as 'John Doe'" 2>&1 + # # Bug#18265 -- mysql client: No longer right-justifies numeric columns # From 35c004ac16da8be36e31ee66336c927c6e7859ae Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Sep 2006 17:27:35 +0500 Subject: [PATCH 3/7] Bug#20862 truncated result with show variables like 'innodb_data_file_path' The size of 'value' field is increased to FN_REFLEN --- sql/sql_show.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index eb78f4fbdae..4469bbacf90 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4277,7 +4277,7 @@ ST_FIELD_INFO triggers_fields_info[]= ST_FIELD_INFO variables_fields_info[]= { {"Variable_name", 80, MYSQL_TYPE_STRING, 0, 0, "Variable_name"}, - {"Value", 255, MYSQL_TYPE_STRING, 0, 0, "Value"}, + {"Value", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, "Value"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; From 84000c374b5e4e2fa61a11481bf65a87f0b123a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Oct 2006 15:15:16 +0200 Subject: [PATCH 4/7] Raise version number --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 7bc4fe77675..55da1dfb241 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.26) +AM_INIT_AUTOMAKE(mysql, 5.0.27) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -19,7 +19,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=26 +NDB_VERSION_BUILD=27 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From cdec7323eca6e32c07c6ea198f5575d85eab0846 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Oct 2006 00:48:26 +0200 Subject: [PATCH 5/7] Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers This was available from gcc 3.1, so diable it before that Update m_ctype.h to use the new macro include/m_ctype.h: Use macro ATTRIBUTE_FORMAT_FPTR on function pointer include/my_global.h: Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers This was available from gcc 3.1, so diable it before that --- include/m_ctype.h | 2 +- include/my_global.h | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index b2bf8d3e30f..b507e2dc7de 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -175,7 +175,7 @@ typedef struct my_charset_handler_st /* Charset dependant snprintf() */ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, - ...) ATTRIBUTE_FORMAT(printf, 4, 5); + ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix, long int val); int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, diff --git a/include/my_global.h b/include/my_global.h index d92df6fa743..41b660227b5 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -431,9 +431,6 @@ typedef unsigned short ushort; #ifndef __attribute__ # if !defined(__GNUC__) # define __attribute__(A) -# elif defined (__QNXNTO__) - /* qcc defines GNUC */ -# define __attribute__(A) # elif GCC_VERSION < 2008 # define __attribute__(A) # elif defined(__cplusplus) && GCC_VERSION < 3004 @@ -450,6 +447,19 @@ typedef unsigned short ushort; # define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) #endif +/* + __attribute__((format(...))) on a function pointer is not supported + until gcc 3.1 +*/ +#ifndef ATTRIBUTE_FORMAT_FPTR +# if (GCC_VERSION >= 3001) +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) +# else +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) +# endif /* GNUC >= 3.1 */ +#endif + + /* From old s-system.h */ /* From 0f3a12870ea59429854afb7c9db1df56cce4ac05 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Oct 2006 23:05:52 -0400 Subject: [PATCH 6/7] Back port change from 5.1 that adds the Windows database files to the source package. This is needed for WiX pacakging. --- Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am index d48f0e24966..474d268db38 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,8 +89,18 @@ bin-dist: all $(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@ # Remove BK's "SCCS" subdirectories from source distribution +# Create initial database files for Windows installations. dist-hook: rm -rf `find $(distdir) -type d -name SCCS -print` + if echo "$(distdir)" | grep -q '^/' ; then \ + scripts/mysql_install_db --no-defaults --windows \ + --basedir=$(top_srcdir) \ + --datadir="$(distdir)/win/data"; \ + else \ + scripts/mysql_install_db --no-defaults --windows \ + --basedir=$(top_srcdir) \ + --datadir="$$(pwd)/$(distdir)/win/data"; \ + fi tags: support-files/build-tags From 286448480f441b36f20616e60b295bc2f5a067a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Oct 2006 12:44:59 +0300 Subject: [PATCH 7/7] Added a missing breakpoint. This could cause wrong results in order by in some rare cases. --- sql/filesort.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/filesort.cc b/sql/filesort.cc index f13354d5c72..b063b416191 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -601,6 +601,7 @@ static inline void store_length(uchar *to, uint length, uint pack_length) break; case 3: mi_int3store(to, length); + break; default: mi_int4store(to, length); break;