List:Commits« Previous MessageNext Message »
From:rsomla Date:October 28 2006 8:18pm
Subject:bk commit into 5.1 tree (rafal:1.2355)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-10-28 20:18:34+00:00, rafal@quant.(none) +10 -0
  Basic backup declarations factored-out to separate header backup0.h
  to avoid header dependency problems. Other minor changes.

  sql/CMakeLists.txt@stripped, 2006-10-28 20:18:31+00:00, rafal@quant.(none) +1 -0
    added backup0.h

  sql/Makefile.am@stripped, 2006-10-28 20:18:31+00:00, rafal@quant.(none) +1 -1
    added backup0.h

  sql/backup.cc@stripped, 2006-10-28 20:18:31+00:00, rafal@quant.(none) +4 -2
    cosmetic changes

  sql/backup.h@stripped, 2006-10-28 20:18:31+00:00, rafal@quant.(none) +15 -13
    basic definitions factored-out to backup0.h

  sql/backup0.h@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +18 -0
    Basic backup declarations needed to declare get_backup_engine method 
    in handlerton.h. These are independen't from any other declarations 
    and can be safely included in any places. Backup.h on the other hand, 
    depends on table.h.  

  sql/backup0.h@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +0 -0

  sql/handler.h@stripped, 2006-10-28 20:18:31+00:00, rafal@quant.(none) +5 -2
    use backup0.h for basic backup-related declarations

  storage/archive/CMakeLists.txt@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +1 -1
    added abackup.cc

  storage/archive/abackup.cc@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +2 -1
    Backup engine is now dynamically allocated hence it needs 
    to be deleted.

  storage/archive/ha_archive.cc@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +1 -1
    cosmetic changes: removing superfluous semicolons

  storage/archive/ha_archive.h@stripped, 2006-10-28 20:18:32+00:00, rafal@quant.(none) +1 -1
    cosmetic changes: removing superfluous semicolons

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	rafal
# Host:	quant.(none)
# Root:	/ext/mysql/bk/backup/prototype

--- 1.158/sql/Makefile.am	2006-10-28 20:18:41 +00:00
+++ 1.159/sql/Makefile.am	2006-10-28 20:18:41 +00:00
@@ -67,7 +67,7 @@
                         event_db_repository.h event_queue.h \
 			sql_plugin.h authors.h sql_partition.h event_data_objects.h \
 			partition_info.h partition_element.h event_scheduler.h \
-			contributors.h
+			backup.h backup0.h contributors.h
 mysqld_SOURCES =	sql_lex.cc sql_handler.cc sql_partition.cc \
 			item.cc item_sum.cc item_buff.cc item_func.cc \
 			item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \

--- 1.241/sql/handler.h	2006-10-28 20:18:41 +00:00
+++ 1.242/sql/handler.h	2006-10-28 20:18:41 +00:00
@@ -14,15 +14,18 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-// #include "backup.h"
+#include "backup0.h"
+  
+/*  
 typedef int Backup_result_t;
 
 namespace backup
 {
   class Engine;
-};
+}
 
 typedef backup::Engine  Backup_engine;
+*/
    
 /* Definitions for parameters to do with handler-routines */
 

--- 1.104/storage/archive/ha_archive.cc	2006-10-28 20:18:41 +00:00
+++ 1.105/storage/archive/ha_archive.cc	2006-10-28 20:18:41 +00:00
@@ -514,7 +514,7 @@
   if(lock) pthread_mutex_unlock(&archive_mutex);
 
   DBUG_RETURN(rc);
-};
+}
 
 
 /* 

--- 1.51/storage/archive/ha_archive.h	2006-10-28 20:18:41 +00:00
+++ 1.52/storage/archive/ha_archive.h	2006-10-28 20:18:41 +00:00
@@ -25,7 +25,7 @@
 namespace archive_backup
 {
   class Table_backup;  // needs to be friend of ha_archive (see abackup.cc for def)
-};
+}
 
 /*
   Please read ha_archive.cc first. If you are looking for more general

--- 1.2/sql/backup.cc	2006-10-28 20:18:41 +00:00
+++ 1.3/sql/backup.cc	2006-10-28 20:18:41 +00:00
@@ -6,7 +6,7 @@
 TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list); // defined in sql_show.cc
 
 namespace backup {
-
+  
 /*
   Data describing single table column. 
   
@@ -939,7 +939,9 @@
 // Implementation of Table_ref and Db_ref
 
 
-Table_ref &Table_ref::operator=(const TABLE_LIST &t)
+
+
+Table_ref &Table_ref::operator=(const st_table_list &t)
 {
   m_name.set( STRING_WITH_LEN(t.table_name), table_alias_charset );
   m_db= t.db;

--- 1.3/sql/backup.h	2006-10-28 20:18:41 +00:00
+++ 1.4/sql/backup.h	2006-10-28 20:18:41 +00:00
@@ -1,15 +1,17 @@
 #ifndef BACKUP_H
 #define BACKUP_H
+
+#include "backup0.h"
+
+#ifndef VIEW_ALGORITHM_UNDEFINED
+  #error backup.h must be included after table.h  
+#endif
+
 //struct st_table_list;
-typedef struct st_table_list TABLE_LIST;
+//typedef struct st_table_list TABLE_LIST;
 
 namespace backup {
 
-typedef uint version_t; 
-typedef int  result_t; 
-  
-enum enum_return_codes { OK=0, ERROR, WAIT, NOT_NOW, INIT_DONE };  
-
 class Db_ref
 {
   String  m_name;
@@ -39,14 +41,15 @@
   
     Table_ref(const char *db, const char *name):
        m_name(name,table_alias_charset),m_db(db)
-    {}
+    {};
    
-    Table_ref(const TABLE_LIST &t):
+    Table_ref(const st_table_list &t):
        m_name(t.table_name,table_alias_charset),
        m_db(t.db) 
-    {}
+    {};
    
-   Table_ref &operator=(const TABLE_LIST &t);   
+   Table_ref &operator=(const st_table_list &t);   
+  
    const Db_ref &db() const { return m_db; }
    const String &name() const { return m_name; }    
    
@@ -225,9 +228,8 @@
 
 int do_restore(THD*);
 
-}
 
-typedef backup::result_t Backup_result_t;
-typedef backup::Engine   Backup_engine;
+} // backup namespace
+
    
 #endif
--- New file ---
+++ sql/backup0.h	06/10/28 20:18:32
#ifndef BACKUP0_H
#define BACKUP0_H

namespace backup {

typedef uint version_t; 
typedef int  result_t; 
  
enum enum_return_codes { OK=0, ERROR, WAIT, NOT_NOW, INIT_DONE };  

class Engine;

}

typedef backup::result_t Backup_result_t;
typedef backup::Engine   Backup_engine;
   
#endif


--- 1.2/storage/archive/abackup.cc	2006-10-28 20:18:41 +00:00
+++ 1.3/storage/archive/abackup.cc	2006-10-28 20:18:41 +00:00
@@ -1,6 +1,6 @@
 #include <mysql_priv.h>
 #include "ha_archive.h"
-#include <backup.h>
+#include "backup.h"
 
 namespace archive_backup {
 
@@ -80,6 +80,7 @@
     result_t get_backup(const Table_map &tables, Backup_engine::Backup* &eng);
     result_t get_restore(version_t ver, const Table_map &tables, Backup_engine::Restore* &eng);
 
+    void free() { delete this; };
 };
 
 /*************************

--- 1.29/sql/CMakeLists.txt	2006-10-28 20:18:41 +00:00
+++ 1.30/sql/CMakeLists.txt	2006-10-28 20:18:41 +00:00
@@ -54,6 +54,7 @@
                event_queue.cc event_db_repository.cc 
                sql_tablespace.cc events.cc ../sql-common/my_user.c 
                partition_info.cc rpl_utility.cc rpl_injector.cc sql_locale.cc
+               backup.cc backup.h backup0.h
                ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
   			   ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
 			   ${PROJECT_SOURCE_DIR}/include/mysqld_error.h

--- 1.6/storage/archive/CMakeLists.txt	2006-10-28 20:18:41 +00:00
+++ 1.7/storage/archive/CMakeLists.txt	2006-10-28 20:18:41 +00:00
@@ -5,5 +5,5 @@
                     ${CMAKE_SOURCE_DIR}/sql
                     ${CMAKE_SOURCE_DIR}/regex
                     ${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(archive azio.c ha_archive.cc ha_archive.h)
+ADD_LIBRARY(archive azio.c ha_archive.cc abackup.cc ha_archive.h)
 TARGET_LINK_LIBRARIES(archive zlib mysys dbug strings)
Thread
bk commit into 5.1 tree (rafal:1.2355)rsomla29 Oct