List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:January 30 2009 9:06am
Subject:bzr commit into mysql-6.0-backup branch (jorgen.loland:2756) Bug#38294
View as plain text  
#At file:///localhome/jl208045/mysql/mysql-6.0-backup-38294/

 2756 Jorgen Loland	2009-01-30
      Bug#38294 - Backup: server crash if no database set when issuing backup.
      
      Previously, backup crashed when called without setting a database first ('use db'); making any database the active database was a workaround. The reason for this was bug 38916 - "Select from I_S.ROUTINES results in "No database selected" error". 
      
      This patch contains a regression test for the originally reported problem.
modified:
  mysql-test/suite/backup/r/backup.result
  mysql-test/suite/backup/t/backup.test

per-file messages:
  mysql-test/suite/backup/r/backup.result
    Added test for backup run without any database selected.
  mysql-test/suite/backup/t/backup.test
    Added test for backup run without any database selected.
=== modified file 'mysql-test/suite/backup/r/backup.result'
--- a/mysql-test/suite/backup/r/backup.result	2008-12-10 15:53:06 +0000
+++ b/mysql-test/suite/backup/r/backup.result	2009-01-30 09:06:22 +0000
@@ -641,3 +641,15 @@ a	b
 5	2008-04-01 00:00:01
 DROP DATABASE IF EXISTS bup_delete;
 DROP DATABASE IF EXISTS bup_default;
+# 
+# Bug#38294 - Backup fails if no database selected.
+#
+CREATE DATABASE bup_usedb;
+CREATE FUNCTION bup_usedb.f1() RETURNS INT RETURN (SELECT 1);
+BACKUP DATABASE bup_usedb TO 'bup_usedb.bak';
+backup_id
+#
+DROP DATABASE bup_usedb;
+#
+# Cleanup
+#

=== modified file 'mysql-test/suite/backup/t/backup.test'
--- a/mysql-test/suite/backup/t/backup.test	2008-12-08 10:30:21 +0000
+++ b/mysql-test/suite/backup/t/backup.test	2009-01-30 09:06:22 +0000
@@ -538,6 +538,24 @@ DROP DATABASE IF EXISTS bup_delete;
 DROP DATABASE IF EXISTS bup_default;
 --enable_warnings
 
+--echo # 
+--echo # Bug#38294 - Backup fails if no database selected.
+--echo #
+
+CREATE DATABASE bup_usedb;
+CREATE FUNCTION bup_usedb.f1() RETURNS INT RETURN (SELECT 1);
+
+# Calling backup without calling 'use db' first
+--replace_column 1 #
+BACKUP DATABASE bup_usedb TO 'bup_usedb.bak';
+
+DROP DATABASE bup_usedb;
+
+--echo #
+--echo # Cleanup
+--echo #
+
+--remove_file $MYSQLTEST_VARDIR/master-data/bup_usedb.bak
 --remove_file $MYSQLTEST_VARDIR/master-data/bup_delete.bak
 --remove_file $MYSQLTEST_VARDIR/master-data/bup_default_timestamp.bak
 --remove_file $MYSQLTEST_VARDIR/master-data/bup_default.bak

Thread
bzr commit into mysql-6.0-backup branch (jorgen.loland:2756) Bug#38294Jorgen Loland30 Jan
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2756)Bug#38294Chuck Bell4 Feb
  • Re: bzr commit into mysql-6.0-backup branch (jorgen.loland:2756)Bug#38294Rafal Somla5 Feb