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, 2007-05-29 18:13:28+02:00, rafal@quant.(none) +2 -0
cset-1.2525.1.3.patch
sql/backup/backup_kernel.h@stripped, 2007-05-29 18:07:33+02:00, rafal@quant.(none) +2 -0
Import patch cset-1.2525.1.3.patch
sql/backup/sql_backup.cc@stripped, 2007-05-29 18:11:28+02:00, rafal@quant.(none) +15 -7
Import patch cset-1.2525.1.3.patch
# 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.28/sql/backup/sql_backup.cc 2007-05-29 18:13:33 +02:00
+++ 1.29/sql/backup/sql_backup.cc 2007-05-29 18:13:33 +02:00
@@ -260,14 +260,20 @@
::ha_resolve_storage_engine_name(hton),
hton->get_backup_engine) );
- #ifndef USE_DEFAULT_BACKUP
+ /*
+ there are img_count images in images[] table. The default image, if
+ it was created, has number default_img_no.
+ */
- uint last_image_no= images[0]? img_count-1 : img_count;
+ #ifndef USE_DEFAULT_BACKUP
// Point 3: try existing images but not the default one.
- for (uint no=1; no <= last_image_no && no < 256 ; ++no)
+ for (int no=0; no < img_count && no < 256 ; ++no)
{
+ if (default_image_no >= 0 && no == (uint)default_image_no)
+ continue;
+
img= images[no];
// An image object decides if it can handle given table or not
@@ -279,7 +285,7 @@
if (hton->get_backup_engine)
{
- uint no= ++last_image_no;
+ uint no= img_count;
DBUG_ASSERT(no<256);
@@ -300,9 +306,11 @@
// Point 4: try default backup engine.
- if (!images[0])
+ if (default_image_no < 0)
{
- img= images[0]= new Default_image(*this);
+ default_image_no= img_count;
+
+ img= images[default_image_no]= new Default_image(*this);
DBUG_ASSERT(img);
DBUG_PRINT("backup",("Default image added to archive"));
img_count++;
@@ -339,7 +347,7 @@
closed when the structure is closed with the @c close() method.
*/
Backup_info::Backup_info(THD *thd):
- m_thd(thd), i_s_tables(NULL), /* m_tables(NULL), */ m_state(INIT),
+ default_image_no(-1), m_thd(thd), i_s_tables(NULL), m_state(INIT),
m_items(NULL), m_last_item(NULL), m_last_db(NULL)
{
i_s_tables= get_schema_table(m_thd, ::get_schema_table(SCH_TABLES));
--- 1.4/sql/backup/backup_kernel.h 2007-05-29 18:13:33 +02:00
+++ 1.5/sql/backup/backup_kernel.h 2007-05-29 18:13:33 +02:00
@@ -134,6 +134,8 @@
*/
int find_image(const Table_ref&);
+ int default_image_no; ///< Position of the default image in @c images list, -1 if not used.
+
Db_item* add_db(const backup::Db_ref&);
Table_item* add_table(Db_item&, const Table_ref&);
| Thread |
|---|
| • bk commit into 5.1 tree (rafal:1.2530) | rsomla | 29 May |