[Pkg-mysql-commits] r1050 - in branches/sid-5.0/debian: . patches
Norbert Tretkowski
nobse at alioth.debian.org
Thu Dec 6 22:10:23 UTC 2007
tags 454227 pending
thanks
Author: nobse
Date: 2007-12-06 22:10:23 +0000 (Thu, 06 Dec 2007)
New Revision: 1050
Added:
branches/sid-5.0/debian/patches/50_fix_mysqldump.dpatch
Modified:
branches/sid-5.0/debian/changelog
branches/sid-5.0/debian/patches/00list
Log:
New patch to fix mysqldump because 'null' is shown as type of fields for view with bad definer.
Modified: branches/sid-5.0/debian/changelog
===================================================================
--- branches/sid-5.0/debian/changelog 2007-12-06 19:56:03 UTC (rev 1049)
+++ branches/sid-5.0/debian/changelog 2007-12-06 22:10:23 UTC (rev 1050)
@@ -14,11 +14,13 @@
(closes: #436552)
* Don't fail when upgrading mysql-common if $datadir is empty or not defined
(patch from Edward Allcutt). (closes: #453127)
+ * New patch to fix mysqldump because 'null' is shown as type of fields for
+ view with bad definer. (closes: #454227)
* New Finnish debconf translation from Esko Arajärvi. (closes: #448776)
* Add Vcs-* and Homepage fields to source stanza in control file.
* Update mysqlreport to 3.2 release.
- -- Norbert Tretkowski <nobse at debian.org> Thu, 06 Dec 2007 19:50:27 +0100
+ -- Norbert Tretkowski <nobse at debian.org> Thu, 06 Dec 2007 23:06:05 +0100
mysql-dfsg-5.0 (5.0.45-3) unstable; urgency=high
Modified: branches/sid-5.0/debian/patches/00list
===================================================================
--- branches/sid-5.0/debian/patches/00list 2007-12-06 19:56:03 UTC (rev 1049)
+++ branches/sid-5.0/debian/patches/00list 2007-12-06 22:10:23 UTC (rev 1050)
@@ -7,6 +7,7 @@
43_scripts__mysql_update__password.dpatch
44_scripts__mysql_config__libs.dpatch
45_warn-CLI-passwords.dpatch
+50_fix_mysqldump.dpatch
86_PATH_MAX.dpatch
88_mctype_attrib.dpatch
89_ndb__staticlib.dpatch
Added: branches/sid-5.0/debian/patches/50_fix_mysqldump.dpatch
===================================================================
--- branches/sid-5.0/debian/patches/50_fix_mysqldump.dpatch (rev 0)
+++ branches/sid-5.0/debian/patches/50_fix_mysqldump.dpatch 2007-12-06 22:10:23 UTC (rev 1050)
@@ -0,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_fix_mysqldump.dpatch by <nobse at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: SHOW FIELDS FROM a view with no valid definer was possible (since fix
+## DP: for Bug#26817), but gave NULL as a field-type. This led to mysqldump-ing
+## DP: of such views being successful, but loading such a dump with the client
+## DP: failing. Patch allows SHOW FIELDS to give data-type of field in underlying
+## DP: table.
+
+ at DPATCH@
+diff -Nrup a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result
+--- a/mysql-test/r/information_schema_db.result 2007-08-20 08:23:06 +02:00
++++ b/mysql-test/r/information_schema_db.result 2007-10-26 09:01:28 +02:00
+@@ -130,7 +130,7 @@ Warnings:
+ Warning 1356 View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+ show fields from testdb_1.v7;
+ Field Type Null Key Default Extra
+-f1 null YES NULL
++f1 char(4) YES NULL
+ Warnings:
+ Note 1449 There is no 'no_such_user'@'no_such_host' registered
+ create table t3 (f1 char(4), f2 char(4));
+@@ -150,7 +150,7 @@ View Create View
+ v6 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v6` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1`
+ show fields from testdb_1.v7;
+ Field Type Null Key Default Extra
+-f1 null YES NULL
++f1 char(4) YES NULL
+ Warnings:
+ Note 1449 There is no 'no_such_user'@'no_such_host' registered
+ show create view testdb_1.v7;
+@@ -178,7 +178,7 @@ show create view v4;
+ ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
+ show fields from v4;
+ Field Type Null Key Default Extra
+-f1 null YES NULL
++f1 char(4) YES NULL
+ f2 char(4) YES NULL
+ show fields from v2;
+ Field Type Null Key Default Extra
+diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
+--- a/sql/sql_base.cc 2007-09-27 11:17:13 +02:00
++++ b/sql/sql_base.cc 2007-10-26 09:01:28 +02:00
+@@ -3958,7 +3958,9 @@ find_field_in_tables(THD *thd, Item_iden
+ {
+ Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length,
+ item->name, db, table_name, ref,
+- check_privileges,
++ (thd->lex->sql_command ==
++ SQLCOM_SHOW_FIELDS)
++ ? false : check_privileges,
+ allow_rowid,
+ &(item->cached_field_index),
+ register_tree_change,
More information about the Pkg-mysql-commits
mailing list