From a74939e2401a2af905292ecacbcae31997509123 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 02:46:47 +0100 Subject: [PATCH 1/3] Makefile.am: Use libtool convenience lib, to access get_password object correctly, bug#17155 server-tools/instance-manager/Makefile.am: Use libtool convenience lib, to access get_password object correctly, bug#17155 --- server-tools/instance-manager/Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index 5b9690322aa..218eceebd12 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -24,9 +24,10 @@ DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER # default_options.h, generated from default_options.h.in) # See automake/autoconf docs for details -noinst_LIBRARIES= liboptions.a libnet.a +noinst_LTLIBRARIES= liboptions.la +noinst_LIBRARIES= libnet.a -liboptions_a_CXXFLAGS= $(CXXFLAGS) \ +liboptions_la_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \ -DDEFAULT_LOG_FILE_NAME="$(localstatedir)/mysqlmanager.log" \ -DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" \ @@ -35,8 +36,8 @@ liboptions_a_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \ -DPROTOCOL_VERSION=@PROTOCOL_VERSION@ -liboptions_a_SOURCES= options.h options.cc priv.h priv.cc -liboptions_a_LIBADD= $(top_builddir)/libmysql/get_password.$(OBJEXT) +liboptions_la_SOURCES= options.h options.cc priv.h priv.cc +liboptions_la_LIBADD= $(top_builddir)/libmysql/get_password.lo # MySQL sometimes uses symlinks to reuse code # All symlinked files are grouped in libnet.a @@ -77,7 +78,7 @@ mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \ mysql_manager_error.h \ portability.h -mysqlmanager_LDADD= liboptions.a \ +mysqlmanager_LDADD= liboptions.la \ libnet.a \ $(top_builddir)/vio/libvio.a \ $(top_builddir)/mysys/libmysys.a \ From 25b3bb8bd711f0d2127f38a50c68dcc292064f82 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 20:49:10 -0500 Subject: [PATCH 2/3] Expanding a binary field should result in 0x00-filled positions, not 0x20 (ASCII space). For Bug#16857. sql/field_conv.cc: Bug#16857: Do not expand BINARY fields as if they are strings (which presumably /should/ be filled with spaces). Instead, fill BINARY fields with 0x00 bytes. --- mysql-test/r/binary.result | 19 +++++++++++++++++++ mysql-test/t/binary.test | 12 ++++++++++++ sql/field_conv.cc | 18 +++++++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index a8d6c3bf411..c5673d1c00d 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -141,3 +141,22 @@ t1 CREATE TABLE `t1` ( `a` binary(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 (col1 binary(4)); +insert into t1 values ('a'),('a '); +select hex(col1) from t1; +hex(col1) +61000000 +61200000 +alter table t1 modify col1 binary(10); +select hex(col1) from t1; +hex(col1) +61000000000000000000 +61200000000000000000 +insert into t1 values ('b'),('b '); +select hex(col1) from t1; +hex(col1) +61000000000000000000 +61200000000000000000 +62000000000000000000 +62200000000000000000 +drop table t1; diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index 1ac0cfebb28..4ab6ee9eaf1 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -89,3 +89,15 @@ show create table t1; drop table t1; # End of 4.1 tests + +# +# Bug#16857 +# +create table t1 (col1 binary(4)); +insert into t1 values ('a'),('a '); +select hex(col1) from t1; +alter table t1 modify col1 binary(10); +select hex(col1) from t1; +insert into t1 values ('b'),('b '); +select hex(col1) from t1; +drop table t1; diff --git a/sql/field_conv.cc b/sql/field_conv.cc index bbe2dbe5e9f..895f022624c 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -379,6 +379,16 @@ static void do_cut_string_complex(Copy_field *copy) +static void do_expand_binary(Copy_field *copy) +{ + CHARSET_INFO *cs= copy->from_field->charset(); + memcpy(copy->to_ptr,copy->from_ptr,copy->from_length); + cs->cset->fill(cs, copy->to_ptr+copy->from_length, + copy->to_length-copy->from_length, '\0'); +} + + + static void do_expand_string(Copy_field *copy) { CHARSET_INFO *cs= copy->from_field->charset(); @@ -583,7 +593,13 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*) return (from->charset()->mbmaxlen == 1 ? do_cut_string : do_cut_string_complex); else if (to_length > from_length) - return do_expand_string; + { + if ((to->flags & BINARY_FLAG) != 0) + return do_expand_binary; + else + return do_expand_string; + } + } else if (to->real_type() != from->real_type() || to_length != from_length || From a91d0afdaa79b8e78571796079b8910dd8380fda Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 03:27:27 +0100 Subject: [PATCH 3/3] mysql.spec.sh: Don't create empty embedded RPM, bug#15769 support-files/mysql.spec.sh: Don't create empty embedded RPM, bug#15769 --- support-files/mysql.spec.sh | 44 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 613045e6ad5..599f397e351 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -204,24 +204,24 @@ the standard MySQL package. Please note that this is a dynamically linked binary! -%package embedded -Requires: %{name}-devel -Summary: MySQL - embedded library -Group: Applications/Databases -Obsoletes: mysql-embedded - -%description embedded -This package contains the MySQL server as an embedded library. - -The embedded MySQL server library makes it possible to run a -full-featured MySQL server inside the client application. -The main benefits are increased speed and more simple management -for embedded applications. - -The API is identical for the embedded MySQL version and the -client/server version. - -%{see_base} +#%package embedded +#Requires: %{name}-devel +#Summary: MySQL - embedded library +#Group: Applications/Databases +#Obsoletes: mysql-embedded +# +#%description embedded +#This package contains the MySQL server as an embedded library. +# +#The embedded MySQL server library makes it possible to run a +#full-featured MySQL server inside the client application. +#The main benefits are increased speed and more simple management +#for embedded applications. +# +#The API is identical for the embedded MySQL version and the +#client/server version. +# +#%{see_base} %prep %setup -n mysql-%{mysql_version} @@ -712,14 +712,18 @@ fi %attr(755, root, root) %{_sbindir}/mysqld-max %attr(644, root, root) %{_libdir}/mysql/mysqld-max.sym -%files embedded -%defattr(-, root, root, 0755) +#%files embedded +#%defattr(-, root, root, 0755) # %attr(644, root, root) %{_libdir}/mysql/libmysqld.a # The spec file changelog only includes changes made to the spec file # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Fri Mar 03 2006 Kent Boortz + +- Don't output an embedded package as it is empty + * Fri Jan 10 2006 Joerg Bruehe - Use "-i" on "make test-force";