[debian-mysql] Bug#478319: mysql-dfsg-5.0: Setup of mysql.user table fails on hostname "localhost" (duplicate key error)
Daniel Hahler
debian-bugs at thequod.de
Mon Apr 28 19:11:09 UTC 2008
Package: mysql-dfsg-5.0
Version: 5.0.51a-3
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu hardy ubuntu-patch
The attached patch fixes a "duplicate key" error, when install MySQL
server on a host with hostname "localhost".
I've reported it initially in Launchpad at:
https://launchpad.net/bugs/223836
-------------- next part --------------
diff -u mysql-dfsg-5.0-5.0.51a/debian/patches/00list mysql-dfsg-5.0-5.0.51a/debian/patches/00list
--- mysql-dfsg-5.0-5.0.51a/debian/patches/00list
+++ mysql-dfsg-5.0-5.0.51a/debian/patches/00list
@@ -24,0 +25 @@
+93_fix_user_setup_on_localhost.dpatch
--- mysql-dfsg-5.0-5.0.51a.orig/debian/patches/93_fix_user_setup_on_localhost.dpatch
+++ mysql-dfsg-5.0-5.0.51a/debian/patches/93_fix_user_setup_on_localhost.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 93_fix_user_setup_on_localhost.dpatch by Daniel Hahler <ubuntu at thequod.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad mysql-dfsg-5.0-5.0.51a~/scripts/mysql_system_tables_data.sql mysql-dfsg-5.0-5.0.51a/scripts/mysql_system_tables_data.sql
+--- mysql-dfsg-5.0-5.0.51a~/scripts/mysql_system_tables_data.sql 2008-01-11 15:43:26.000000000 +0100
++++ mysql-dfsg-5.0-5.0.51a/scripts/mysql_system_tables_data.sql 2008-04-28 20:57:08.084428731 +0200
+@@ -18,6 +18,6 @@
+ REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+ REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+ INSERT INTO tmp_user (host,user) VALUES ('localhost','');
+-INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
++REPLACE INTO tmp_user (host,user) VALUES (@@hostname,'');
+ INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
+ DROP TABLE tmp_user;
More information about the pkg-mysql-maint
mailing list