Hello community, here is the log from the commit of package mysql checked in at Wed Nov 15 17:38:58 CET 2006. -------- --- mysql/mysql.changes 2006-10-31 17:01:34.000000000 +0100 +++ /mounts/work_src_done/STABLE/mysql/mysql.changes 2006-11-15 17:19:28.000000000 +0100 @@ -1,0 +2,20 @@ +Wed Nov 15 17:16:46 CET 2006 - mmarek@suse.de + +- create user mysql with shell /bin/false, because 'su mysql' is + not needed anymore (see bug #57071) + +------------------------------------------------------------------- +Wed Nov 15 12:30:43 CET 2006 - mmarek@suse.cz + +- use /var/lib/mysql/.tmp instead of /var/lib/mysql/tmp to avoid + collision with a database named 'tmp' [#221188] + +------------------------------------------------------------------- +Tue Nov 14 12:10:16 CET 2006 - mmarek@suse.cz + +- use upstream patch for the varbinary upgrade problem (fixes the + problem in the REPAIR TABLE implementation, not in the mysqlcheck + program) + [#188134, http://bugs.mysql.com/bug.php?id=19371] + +------------------------------------------------------------------- Old: ---- minmem mysql-5.0.24-varbinary-upgrade.patch New: ---- mysql-5.0.26-varbinary-upgrade.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mysql.spec ++++++ --- /var/tmp/diff_new_pack.DlxCwv/_old 2006-11-15 17:38:09.000000000 +0100 +++ /var/tmp/diff_new_pack.DlxCwv/_new 2006-11-15 17:38:09.000000000 +0100 @@ -12,7 +12,7 @@ Name: mysql BuildRequires: gcc-c++ readline-devel tcpd-devel -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package Group: Productivity/Databases/Servers # for mysqlcheck Requires: mysql-client >= 5.0.19 @@ -20,7 +20,7 @@ Requires: perl-DBD-mysql Autoreqprov: on Version: 5.0.26 -Release: 3 +Release: 7 URL: http://www.mysql.com Summary: A True Multiuser, Multithreaded SQL Database Server PreReq: /usr/sbin/useradd /usr/sbin/groupadd fileutils %install_info_prereq %fillup_prereq %insserv_prereq @@ -38,7 +38,7 @@ Patch6: mysql-5.0.22-install_db.patch Patch7: mysql-5.0.22-4x-compat.patch Patch8: mysql-5.0.22-logrotate.patch -Patch11: mysql-5.0.24-varbinary-upgrade.patch +Patch11: mysql-5.0.26-varbinary-upgrade.patch Patch12: mysql-5.0.24-coredump.patch Patch13: mysql-5.0.24-my_libwrap.patch Patch14: mysql-5.0.26-uninitialized_variable.patch @@ -80,7 +80,7 @@ Obsoletes: mysqldev Provides: mysqldev Requires: mysql-client mysql-shared = %{version} glibc-devel zlib-devel -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package Summary: MySQL Development Header Files and Libraries URL: http://www.mysql.com Group: Development/Libraries/C and C++ @@ -100,7 +100,7 @@ %package client Obsoletes: mysqclnt Provides: mysqclnt -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package Summary: MySQL Client URL: http://www.mysql.com Group: Productivity/Databases/Clients @@ -143,7 +143,7 @@ Obsoletes: mysqllib Provides: mysqllib Summary: MySQL Shared Libraries -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package URL: http://www.mysql.com Group: Development/Libraries/Other Autoreqprov: on @@ -161,7 +161,7 @@ %package Max Summary: MySQL - Server with Berkeley DB -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package URL: http://www.mysql.com Group: Productivity/Databases/Servers Requires: mysql = %{version} @@ -181,7 +181,7 @@ %package debug Summary: MySQL server with debug options turned on -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package URL: http://www.mysql.com Group: Productivity/Databases/Servers Requires: mysql = %{version} @@ -202,7 +202,7 @@ %package test Summary: MySQL testsuite -License: GNU General Public License (GPL) - all versions, Other License(s), see package +License: GNU General Public License (GPL), Other License(s), see package URL: http://www.mysql.com Group: Productivity/Databases/Servers Requires: mysql = %{version} mysql-client = %{version} perl-DBD-mysql @@ -347,9 +347,6 @@ nm --numeric-sort sql/mysqld > sql/mysqld.sym %install -/usr/sbin/groupadd -g 60 -o -r mysql >/dev/null 2>/dev/null || : -/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ - -s /bin/bash -d /var/lib/mysql mysql 2> /dev/null || : # Create directory structure DOC="Docs/INSTALL-BINARY INSTALL-SOURCE README EXCEPTIONS-CLIENT" DOCDIR=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} @@ -390,7 +387,7 @@ install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/mysql ln -sf ../../etc/init.d/mysql $RPM_BUILD_ROOT/usr/sbin/rcmysql #install -m 755 scripts/mysql_install_db ${DOCDIR} -install -m 755 -d $RPM_BUILD_ROOT/var/lib/mysql/tmp +install -m 755 -d $RPM_BUILD_ROOT/var/lib/mysql/.tmp # this is used by the init script install -m 700 -d $RPM_BUILD_ROOT/var/lib/mysql/.protected # testsuite @@ -407,8 +404,8 @@ %pre /usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || : /usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ - -s /bin/bash -d /var/lib/mysql mysql 2> /dev/null || : -/usr/sbin/usermod -g mysql -s /bin/bash mysql + -s /bin/false -d /var/lib/mysql mysql 2> /dev/null || : +/usr/sbin/usermod -g mysql -s /bin/false mysql dbfile=var/mysql/mysql/db.ISM olddir=var/mysql newdir=var/lib/mysql @@ -577,6 +574,17 @@ %dir %attr(755, mysql, mysql) /usr/share/mysql-test/var %changelog -n mysql +* Wed Nov 15 2006 - mmarek@suse.de +- create user mysql with shell /bin/false, because 'su mysql' is + not needed anymore (see bug #57071) +* Wed Nov 15 2006 - mmarek@suse.cz +- use /var/lib/mysql/.tmp instead of /var/lib/mysql/tmp to avoid + collision with a database named 'tmp' [#221188] +* Tue Nov 14 2006 - mmarek@suse.cz +- use upstream patch for the varbinary upgrade problem (fixes the + problem in the REPAIR TABLE implementation, not in the mysqlcheck + program) + [#188134, http://bugs.mysql.com/bug.php?id=19371] * Tue Oct 31 2006 - mmarek@suse.cz - fixed another binary incompatibility in mysql-shared [http://bugs.mysql.com/bug.php?id=23427] (mybug23427.patch) ++++++ mysql-5.0.24-varbinary-upgrade.patch -> mysql-5.0.26-varbinary-upgrade.patch ++++++ --- mysql/mysql-5.0.24-varbinary-upgrade.patch 2006-08-17 11:40:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/mysql/mysql-5.0.26-varbinary-upgrade.patch 2006-11-13 13:43:43.000000000 +0100 @@ -1,119 +1,53 @@ +--- sql/field_conv.cc ++++ sql/field_conv.cc +@@ -309,6 +309,21 @@ static void do_field_string(Copy_field * + } + + ++static void do_field_varbinary_pre50(Copy_field *copy) ++{ ++ char buff[MAX_FIELD_WIDTH]; ++ copy->tmp.set_quick(buff,sizeof(buff),copy->tmp.charset()); ++ copy->from_field->val_str(©->tmp); ++ ++ /* Use the same function as in 4.1 to trim trailing spaces */ ++ uint length= my_lengthsp_8bit(&my_charset_bin, copy->tmp.c_ptr_quick(), ++ copy->from_field->field_length); ++ ++ copy->to_field->store(copy->tmp.c_ptr_quick(), length, ++ copy->tmp.charset()); ++} ++ ++ + static void do_field_int(Copy_field *copy) + { + longlong value= copy->from_field->val_int(); +@@ -556,6 +571,15 @@ void (*Copy_field::get_copy_func(Field * + if (from->result_type() == STRING_RESULT) + { + /* ++ Detect copy from pre 5.0 varbinary to varbinary as of 5.0 and ++ use special copy function that removes trailing spaces and thus ++ repairs data. ++ */ ++ if (from->type() == MYSQL_TYPE_VAR_STRING && !from->has_charset() && ++ to->type() == MYSQL_TYPE_VARCHAR && !to->has_charset()) ++ return do_field_varbinary_pre50; ++ ++ /* + If we are copying date or datetime's we have to check the dates + if we don't allow 'all' dates. + */ --- sql/handler.cc +++ sql/handler.cc -@@ -1887,6 +1887,10 @@ +@@ -1972,6 +1972,10 @@ int handler::check_old_types() { return HA_ADMIN_NEEDS_ALTER; } -+ if ((*field)->type() == FIELD_TYPE_VAR_STRING) ++ if ((*field)->type() == MYSQL_TYPE_VAR_STRING) + { + return HA_ADMIN_NEEDS_ALTER; + } } } return 0; ---- client/mysqlcheck.c -+++ client/mysqlcheck.c -@@ -515,6 +515,94 @@ - return 0; - } /* use_db */ - -+/* -+ * remove trailing spaces / zeroes from pre-5.0 varbinary fields -+ * actually, this doesn't belog here but into the server (REPAIR TABLE), -+ */ -+static int repair_varbinary(char *table, uint length) -+{ -+ MYSQL_RES *res; -+ MYSQL_ROW row; -+ char *query, message[100], *ptr; -+ uint query_length= 0, num_cols; -+ -+ if (opt_all_in_1) -+ { -+ fputs("repair_varbinary doesn't work with --all-in-1\n", stderr); -+ return 1; -+ } -+ /* SHOW COLUMNS FROM `db`.`table` */ -+ query_length= sizeof("SHOW COLUMNS FROM ````")-1 + length; -+ if (!(query =(char *) my_malloc(query_length+1, MYF(MY_WME)))) -+ return 1; -+ ptr= strmov(query, "SHOW COLUMNS FROM "); -+ ptr= fix_table_name(ptr, table); -+ if (mysql_real_query(sock, query, query_length)) -+ { -+ my_snprintf(message, sizeof(message), "when executing '%s'", query); -+ DBerror(sock, message); -+ my_free(query, MYF(0)); -+ return 1; -+ } -+ my_free(query, MYF(0)); -+ -+ /* UPDATE `db`.`table` SET `col1`=TRIM(TRAILING '\0' FROM `col1`), -+ * `col1`=RTIM(`col1`), -+ * `col2`= ... -+ */ -+ res= mysql_store_result(sock); -+ -+ /* first compute query_length */ -+ query_length= sizeof("UPDATE ```` SET ")-1 + length; -+ num_cols = 0; -+ while ((row= mysql_fetch_row(res))) -+ { -+ if (!strncmp(row[1], "varbinary(", sizeof("varbinary(")-1)) -+ { -+ query_length += sizeof("``=TRIM(TRAILING '\\0' FROM ``), ``=RTRIM(``), ") -+ - 1 + 4 * strlen(row[0]); -+ num_cols++; -+ } -+ } -+ if (!num_cols) -+ { -+ /* nothing to do */ -+ mysql_free_result(res); -+ return 0; -+ } -+ query_length -= 2; /* no comma-space after last RTRIM */ -+ -+ /* then rewind and construct the query */ -+ if (!(query= (char *) my_malloc(query_length+1, MYF(MY_WME)))) -+ { -+ mysql_free_result(res); -+ return 1; -+ } -+ mysql_data_seek(res, 0); -+ ptr= strmov(query, "UPDATE "); -+ ptr= fix_table_name(ptr, table); -+ ptr= strmov(ptr, " SET "); -+ while ((row= mysql_fetch_row(res))) -+ { -+ if (!strncmp(row[1], "varbinary(", sizeof("varbinary(")-1)) -+ { -+ ptr= strxmov(ptr, "`", row[0], "`=TRIM(TRAILING '\\0' FROM `", -+ row[0], "`), `", row[0], "`=RTRIM(`", row[0], "`)", NullS); -+ if (--num_cols) -+ ptr= strmov(ptr, ", "); -+ } -+ } -+ mysql_free_result(res); -+ if (mysql_real_query(sock, query, query_length)) -+ { -+ my_snprintf(message, sizeof(message), "when executing '%s'", query); -+ DBerror(sock, message); -+ my_free(query, MYF(0)); -+ return 1; -+ } -+ my_free(query, MYF(0)); -+ return 0; -+} - - static int handle_request_for_tables(char *tables, uint length) - { -@@ -573,6 +661,8 @@ - } - print_result(); - my_free(query, MYF(0)); -+ if (what_to_do == DO_REPAIR && repair_varbinary(tables, length) != 0) -+ return 1; - return 0; - } - ++++++ rc.mysql ++++++ --- mysql/rc.mysql 2006-10-16 10:46:03.000000000 +0200 +++ /mounts/work_src_done/STABLE/mysql/rc.mysql 2006-11-15 11:55:15.000000000 +0100 @@ -71,7 +71,7 @@ pid_file=/var/lib/mysql/mysqld.pid socket=/var/lib/mysql/mysql.sock print_defaults=/usr/bin/my_print_defaults -export TMPDIR=/var/lib/mysql/tmp +export TMPDIR=/var/lib/mysql/.tmp mode=$1 # start or stop ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org