List:Commits« Previous MessageNext Message »
From:rsomla Date:March 2 2007 10:20am
Subject:bk commit into 5.1 tree (rafal:1.2475)
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, 2007-03-02 11:20:05+01:00, rafal@quant.(none) +17 -0
  Merge rsomla@bk-internal:/home/bk/mysql-5.1-new-rpl
  into  quant.(none):/ext/mysql/bk/backup/prototype
  MERGE: 1.2390.23.10

  BitKeeper/etc/ignore@stripped, 2007-03-02 11:04:54+01:00, rafal@quant.(none) +0 -0
    auto-union
    MERGE: 1.270.5.1

  libmysqld/Makefile.am@stripped, 2007-03-02 11:05:31+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.108.1.1

  mysql-test/r/sp-error.result@stripped, 2007-03-02 11:05:31+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.118.1.1

  mysql-test/r/sp.result@stripped, 2007-03-02 11:05:31+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.241.1.4

  mysql-test/t/ps_1general.test@stripped, 2007-03-02 11:05:31+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.37.1.1

  mysql-test/t/sp-error.test@stripped, 2007-03-02 11:05:31+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.115.2.1

  mysql-test/t/sp.test@stripped, 2007-03-02 11:05:32+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.211.1.1

  sql/CMakeLists.txt@stripped, 2007-03-02 11:20:00+01:00, rafal@quant.(none) +3 -2
    Manual merge.
    MERGE: 1.29.1.6

  sql/Makefile.am@stripped, 2007-03-02 11:05:32+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.171.1.2

  sql/sql_parse.cc@stripped, 2007-03-02 11:20:00+01:00, rafal@quant.(none) +1 -2
    Manual merge.
    MERGE: 1.616.1.3

  sql/sql_show.cc@stripped, 2007-03-02 11:05:32+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.381.2.4

  sql/sql_table.cc@stripped, 2007-03-02 11:05:32+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.382.3.1

  sql/sql_yacc.yy@stripped, 2007-03-02 11:05:33+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.533.2.1

  sql/table.h@stripped, 2007-03-02 11:05:33+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.153.1.9

  storage/archive/Makefile.am@stripped, 2007-03-02 11:05:33+01:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.8.1.3

  storage/archive/ha_archive.cc@stripped, 2007-03-02 11:20:00+01:00, rafal@quant.(none) +1 -39
    Manual merge.
    MERGE: 1.116.1.1

  storage/archive/ha_archive.h@stripped, 2007-03-02 11:20:00+01:00, rafal@quant.(none) +0 -0
    Manual merge
    MERGE: 1.53.1.2

# 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/RESYNC

--- 1.174/sql/Makefile.am	2007-03-02 11:20:14 +01:00
+++ 1.175/sql/Makefile.am	2007-03-02 11:20:14 +01:00
@@ -69,7 +69,9 @@
 			sql_plugin.h authors.h \
 			event_data_objects.h event_scheduler.h \
 			sql_partition.h partition_info.h partition_element.h \
-			contributors.h sql_servers.h
+			contributors.h \
+			backup.h backup0.h backup_private.h backup_util.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 \
@@ -109,7 +111,8 @@
                         event_queue.cc event_db_repository.cc events.cc \
 			sql_plugin.cc sql_binlog.cc \
 			sql_builtin.cc sql_tablespace.cc partition_info.cc \
-			sql_servers.cc
+			sql_servers.cc \
+			backup.cc backup_util.cc backup_prototype.cc backup_alg.cc restore_alg.cc
 
 
 gen_lex_hash_SOURCES =	gen_lex_hash.cc

--- 1.630/sql/sql_parse.cc	2007-03-02 11:20:14 +01:00
+++ 1.631/sql/sql_parse.cc	2007-03-02 11:20:14 +01:00
@@ -27,6 +27,9 @@
 #include "sp_cache.h"
 #include "events.h"
 #include "event_data_objects.h"
+#ifndef EMBEDDED_LIBRARY
+#include "backup.h"
+#endif
 #include "sql_trigger.h"
 
 /* Used in error handling only */
@@ -1855,26 +1858,36 @@
 
   case SQLCOM_BACKUP_TABLE:
   {
-    DBUG_ASSERT(first_table == all_tables && first_table != 0);
+#ifndef EMBEDDED_LIBRARY
+     backup::do_backup(thd);
+#endif
+/*    
+   DBUG_ASSERT(first_table == all_tables && first_table != 0);
     if (check_table_access(thd, SELECT_ACL, all_tables, 0) ||
 	check_global_access(thd, FILE_ACL))
-      goto error; /* purecov: inspected */
-    thd->enable_slow_log= opt_log_slow_admin_statements;
+      goto error; */ /* purecov: inspected */
+/*    thd->enable_slow_log= opt_log_slow_admin_statements;
     res = mysql_backup_table(thd, first_table);
     select_lex->table_list.first= (byte*) first_table;
     lex->query_tables=all_tables;
+*/    
     break;
   }
   case SQLCOM_RESTORE_TABLE:
   {
-    DBUG_ASSERT(first_table == all_tables && first_table != 0);
+#ifndef EMBEDDED_LIBRARY
+    backup::do_restore(thd);
+#endif
+/*    DBUG_ASSERT(first_table == all_tables && first_table != 0);
     if (check_table_access(thd, INSERT_ACL, all_tables, 0) ||
 	check_global_access(thd, FILE_ACL))
-      goto error; /* purecov: inspected */
-    thd->enable_slow_log= opt_log_slow_admin_statements;
+      goto error; 
+*/    /* purecov: inspected */
+/*    thd->enable_slow_log= opt_log_slow_admin_statements;
     res = mysql_restore_table(thd, first_table);
     select_lex->table_list.first= (byte*) first_table;
     lex->query_tables=all_tables;
+*/
     break;
   }
   case SQLCOM_ASSIGN_TO_KEYCACHE:

--- 1.394/sql/sql_show.cc	2007-03-02 11:20:14 +01:00
+++ 1.395/sql/sql_show.cc	2007-03-02 11:20:14 +01:00
@@ -4923,7 +4923,7 @@
   mysql_schema_table()
     thd                thread handler
     lex                pointer to LEX
-    table_list         pointer to table_list
+    table_list         pointer to str. describing the table to be opened/created
 
   RETURN
     0	success

--- 1.393/sql/sql_table.cc	2007-03-02 11:20:15 +01:00
+++ 1.394/sql/sql_table.cc	2007-03-02 11:20:15 +01:00
@@ -1762,7 +1762,7 @@
           new_error= Table_triggers_list::drop_all_triggers(thd, db,
                                                             table->table_name);
         }
-        error|= new_error;
+        if( !if_exists ) error|= new_error;
       }
     }
     if (error)

--- 1.544/sql/sql_yacc.yy	2007-03-02 11:20:15 +01:00
+++ 1.545/sql/sql_yacc.yy	2007-03-02 11:20:15 +01:00
@@ -5582,28 +5582,32 @@
 
 
 restore:
-	RESTORE_SYM table_or_tables
+	RESTORE_SYM /* table_or_tables */
 	{
 	   Lex->sql_command = SQLCOM_RESTORE_TABLE;
-           WARN_DEPRECATED(yythd, "5.2", "RESTORE TABLE",
+/*           WARN_DEPRECATED(yythd, "5.2", "RESTORE TABLE",
                            "MySQL Administrator (mysqldump, mysql)");
-	}
+*/	};
+/*
 	table_list FROM TEXT_STRING_sys
         {
 	  Lex->backup_dir = $6.str;
         };
+*/
 
 backup:
-	BACKUP_SYM table_or_tables
+	BACKUP_SYM /* table_or_tables */
 	{
 	   Lex->sql_command = SQLCOM_BACKUP_TABLE;
-           WARN_DEPRECATED(yythd, "5.2", "BACKUP TABLE",
+/*           WARN_DEPRECATED(yythd, "5.2", "BACKUP TABLE",
                            "MySQL Administrator (mysqldump, mysql)");
-	}
+*/	};
+	/* 
 	table_list TO_SYM TEXT_STRING_sys
         {
 	  Lex->backup_dir = $6.str;
-        };
+        }; 
+	*/
 
 checksum:
         CHECKSUM_SYM table_or_tables

--- 1.155/sql/table.h	2007-03-02 11:20:15 +01:00
+++ 1.156/sql/table.h	2007-03-02 11:20:15 +01:00
@@ -158,7 +158,12 @@
   LEX_STRING path;                	/* Path to .frm file (from datadir) */
   LEX_STRING normalized_path;		/* unpack_filename(path) */
   LEX_STRING connect_string;
-  key_map keys_in_use;                  /* Keys in use for table */
+
+  /* 
+     Set of keys in use, implemented as a Bitmap.
+     Excludes keys disabled by ALTER TABLE ... DISABLE KEYS.
+  */
+  key_map keys_in_use;
   key_map keys_for_keyread;
   ha_rows min_rows, max_rows;		/* create information */
   ulong   avg_row_length;		/* create information */
@@ -313,7 +318,21 @@
   byte *write_row_record;		/* Used as optimisation in
 					   THD::write_row */
   byte *insert_values;                  /* used by INSERT ... UPDATE */
-  key_map quick_keys, used_keys, keys_in_use_for_query, merge_keys;
+  key_map quick_keys, used_keys;
+
+  /*
+    A set of keys that can be used in the query that references this
+    table.
+
+    All indexes disabled on the table's TABLE_SHARE (see TABLE::s) will be 
+    subtracted from this set upon instantiation. Thus for any TABLE t it holds
+    that t.keys_in_use_for_query is a subset of t.s.keys_in_use. Generally we 
+    must not introduce any new keys here (see setup_tables).
+
+    The set is implemented as a bitmap.
+  */
+  key_map keys_in_use_for_query;
+  key_map merge_keys;
   KEY  *key_info;			/* data of keys in database */
 
   Field *next_number_field;		/* Set if next_number is activated */
@@ -389,6 +408,10 @@
   /*
     If true, the current table row is considered to have all columns set to 
     NULL, including columns declared as "not null" (see maybe_null).
+
+    TODO: Each of these flags take up 8 bits. They can just as easily
+    be put into one single unsigned long and instead of taking up 18
+    bytes, it would take up 4.
   */
   my_bool null_row;
   my_bool force_index;
@@ -396,6 +419,7 @@
   my_bool key_read, no_keyread;
   my_bool locked_by_flush;
   my_bool locked_by_logger;
+  my_bool no_replicate;
   my_bool locked_by_name;
   my_bool fulltext_searched;
   my_bool no_cache;
@@ -452,6 +476,12 @@
 
 };
 
+enum enum_schema_table_state
+{ 
+  NOT_PROCESSED= 0,
+  PROCESSED_BY_CREATE_SORT_INDEX,
+  PROCESSED_BY_JOIN_EXEC
+};
 
 typedef struct st_foreign_key_info
 {
@@ -460,6 +490,7 @@
   LEX_STRING *referenced_table;
   LEX_STRING *update_method;
   LEX_STRING *delete_method;
+  LEX_STRING *referenced_key_name;
   List<LEX_STRING> foreign_fields;
   List<LEX_STRING> referenced_fields;
 } FOREIGN_KEY_INFO;
@@ -711,7 +742,6 @@
   st_select_lex_unit *derived;		/* SELECT_LEX_UNIT of derived table */
   ST_SCHEMA_TABLE *schema_table;        /* Information_schema table */
   st_select_lex	*schema_select_lex;
-  bool is_schema_table_processed;
   /*
     True when the view field translation table is used to convert
     schema table fields for backwards compatibility with SHOW command.
@@ -821,6 +851,7 @@
   */
   bool          prelocking_placeholder;
 
+  enum enum_schema_table_state schema_table_state;
   void calc_md5(char *buffer);
   void set_underlying_merge();
   int view_check_option(THD *thd, bool ignore_failure);

--- 1.129/storage/archive/ha_archive.cc	2007-03-02 11:20:15 +01:00
+++ 1.130/storage/archive/ha_archive.cc	2007-03-02 11:20:15 +01:00
@@ -25,6 +25,7 @@
 
 #include <mysql/plugin.h>
 
+
 /*
   First, if you want to understand storage engines you should look at 
   ha_example.cc and ha_example.h. 
@@ -96,10 +97,7 @@
 pthread_mutex_t archive_mutex;
 static HASH archive_open_tables;
 
-/* The file extension */
-#define ARZ ".ARZ"               // The data file
-#define ARN ".ARN"               // Files used during an optimize call
-#define ARM ".ARM"               // Meta file (deprecated)
+               
 
 /*
   uchar + uchar
@@ -167,7 +165,10 @@
   archive_hton->create= archive_create_handler;
   archive_hton->flags= HTON_NO_FLAGS;
   archive_hton->discover= archive_discover;
-
+  
+//  archive_backup::init();
+  archive_hton->get_backup_engine= archive_backup_engine;
+  
   if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
     goto error;
   if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
@@ -335,6 +336,7 @@
     share->table_name= tmp_name;
     share->crashed= FALSE;
     share->archive_write_open= FALSE;
+            
     fn_format(share->data_file_name, table_name, "",
               ARZ, MY_REPLACE_EXT | MY_UNPACK_FILENAME);
     strmov(share->table_name, table_name);
@@ -375,6 +377,38 @@
 }
 
 
+int ha_archive::flush(bool lock)
+{
+  int rc= 0;
+  DBUG_ENTER("ha_archive::flush");
+  
+  if (lock) 
+    pthread_mutex_lock(&archive_mutex);
+  
+  if (share->archive_write_open)
+  {
+    DBUG_PRINT("archive", ("flushing table data"));
+    if (azflush(&(share->archive_write), Z_FULL_FLUSH)) // Z_SYNC_FLUSH or Z_FULL_FLUSH
+      rc= 1;
+    share->forced_flushes++;
+  }
+  
+  (void)write_meta_file(share->meta_file, share->rows_recorded,
+                        share->auto_increment_value, 
+                        share->forced_flushes, 
+                        share->real_path, 
+                        share->dirty);
+  
+  //if (my_close(share->meta_file, MYF(0)))
+  //  rc= 1;
+    
+  if (lock) 
+    pthread_mutex_unlock(&archive_mutex);
+
+  DBUG_RETURN(rc);
+}
+
+
 /* 
   Free the share.
   See ha_example.cc for a description.
@@ -391,6 +425,7 @@
   pthread_mutex_lock(&archive_mutex);
   if (!--share->use_count)
   {
+    DBUG_PRINT("info", ("archive removing share for table %s",share->table_name)); 
     hash_delete(&archive_open_tables, (byte*) share);
     thr_lock_delete(&share->lock);
     VOID(pthread_mutex_destroy(&share->mutex));
@@ -719,40 +754,6 @@
   {
       length += 2 + ((Field_blob*)table->field[*ptr])->get_length();
   }
-
-  return length;
-}
-
-
-unsigned int ha_archive::pack_row(byte *record)
-{
-  byte *ptr;
-
-  DBUG_ENTER("ha_archive::pack_row");
-
-
-  if (fix_rec_buff(max_row_length(record)))
-    DBUG_RETURN(HA_ERR_OUT_OF_MEM); /* purecov: inspected */
-
-  /* Copy null bits */
-  memcpy(record_buffer->buffer+ARCHIVE_ROW_HEADER_SIZE, 
-         record, table->s->null_bytes);
-  ptr= record_buffer->buffer + table->s->null_bytes + ARCHIVE_ROW_HEADER_SIZE;
-
-  for (Field **field=table->field ; *field ; field++)
-  {
-    if (!((*field)->is_null()))
-      ptr=(byte*) (*field)->pack((char*) ptr,
-                                 (char*) record + (*field)->offset(record));
-  }
-
-  int4store(record_buffer->buffer, (int)(ptr - record_buffer->buffer -
-                                         ARCHIVE_ROW_HEADER_SIZE)); 
-  DBUG_PRINT("ha_archive",("Pack row length %u", (unsigned int)
-                           (ptr - record_buffer->buffer - 
-                             ARCHIVE_ROW_HEADER_SIZE)));
-
-  DBUG_RETURN((unsigned int) (ptr - record_buffer->buffer));
 }
 
 
@@ -867,7 +868,6 @@
 
   DBUG_RETURN(rc);
 }
-
 
 void ha_archive::get_auto_increment(ulonglong offset, ulonglong increment,
                                     ulonglong nb_desired_values,

--- 1.62/storage/archive/ha_archive.h	2007-03-02 11:20:15 +01:00
+++ 1.63/storage/archive/ha_archive.h	2007-03-02 11:20:15 +01:00
@@ -20,6 +20,24 @@
 #include <zlib.h>
 #include "azlib.h"
 
+#include "backup.h"
+
+/* The file extension */
+#define ARZ ".ARZ"               // The data file
+#define ARN ".ARN"               // Files used during an optimize call
+#define ARM ".ARM"               // Meta file
+
+
+class ha_archive;
+
+namespace archive_backup
+{
+  void  init();
+  void  done();
+  class Engine;
+  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
   answers on how storage engines work, look at ha_example.cc and
@@ -45,6 +63,8 @@
   ha_rows rows_recorded;    /* Number of rows in tables */
   ulonglong mean_rec_length;
   char real_path[FN_REFLEN];
+  
+  uint  backup_stream;
 } ARCHIVE_SHARE;
 
 /*
@@ -56,7 +76,7 @@
 #define ARCHIVE_VERSION 3
 
 class ha_archive: public handler
-{
+{ 
   THR_LOCK_DATA lock;        /* MySQL lock */
   ARCHIVE_SHARE *share;      /* Shared lock info */
   
@@ -142,5 +162,9 @@
   bool fix_rec_buff(unsigned int length);
   int unpack_row(azio_stream *file_to_read, byte *record);
   unsigned int pack_row(byte *record);
+  
+//  archive_backup::Engine  *backup_engine_instance;
+  friend class archive_backup::Table_backup;
 };
 
+Backup_result_t archive_backup_engine(handlerton *self, Backup_engine* &be);

--- 1.10/storage/archive/Makefile.am	2007-03-02 11:20:15 +01:00
+++ 1.11/storage/archive/Makefile.am	2007-03-02 11:20:15 +01:00
@@ -30,7 +30,7 @@
 DEFS =                  @DEFS@
 
 noinst_HEADERS =	ha_archive.h azlib.h
-noinst_PROGRAMS	=	archive_test
+noinst_PROGRAMS	=	archive_test archive_reader
 
 EXTRA_LTLIBRARIES =	ha_archive.la
 pkglib_LTLIBRARIES =	@plugin_archive_shared_target@
@@ -54,6 +54,14 @@
 			$(top_builddir)/strings/libmystrings.a \
 			@ZLIB_LIBS@
 archive_test_LDFLAGS = @NOINST_LDFLAGS@
+
+archive_reader_SOURCES = archive_reader.c azio.c
+archive_reader_CFLAGS =	$(AM_CFLAGS)
+archive_reader_LDADD =	$(top_builddir)/mysys/libmysys.a \
+			$(top_builddir)/dbug/libdbug.a \
+			$(top_builddir)/strings/libmystrings.a \
+			@ZLIB_LIBS@
+archive_reader_LDFLAGS = @NOINST_LDFLAGS@
 
 
 EXTRA_DIST =		CMakeLists.txt plug.in

--- 1.39/mysql-test/t/ps_1general.test	2007-03-02 11:20:15 +01:00
+++ 1.40/mysql-test/t/ps_1general.test	2007-03-02 11:20:15 +01:00
@@ -453,9 +453,9 @@
 prepare stmt1 from ' analyze table t1 ' ;
 prepare stmt1 from ' checksum table t1 ' ;
 prepare stmt1 from ' repair table t1 ' ;
---error ER_UNSUPPORTED_PS
-prepare stmt1 from ' restore table t1 from ''data.txt'' ' ;
-## handler
+#--error ER_UNSUPPORTED_PS
+#prepare stmt1 from ' restore table t1 from ''data.txt'' ' ;
+# handler
 --error ER_UNSUPPORTED_PS
 prepare stmt1 from ' handler t1 open ';
 

--- 1.109/libmysqld/Makefile.am	2007-03-02 11:20:15 +01:00
+++ 1.110/libmysqld/Makefile.am	2007-03-02 11:20:15 +01:00
@@ -59,7 +59,8 @@
 	sql_load.cc discover.cc sql_locale.cc \
 	sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
 	sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \
-	sql_lex.cc sql_list.cc sql_manager.cc sql_map.cc sql_parse.cc \
+	sql_lex.cc sql_list.cc sql_manager.cc sql_map.cc \
+	scheduler.cc sql_connect.cc sql_parse.cc \
 	sql_prepare.cc sql_derived.cc sql_rename.cc \
 	sql_select.cc sql_do.cc sql_show.cc set_var.cc \
 	sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \

--- 1.119/mysql-test/r/sp-error.result	2007-03-02 11:20:15 +01:00
+++ 1.120/mysql-test/r/sp-error.result	2007-03-02 11:20:15 +01:00
@@ -1098,18 +1098,6 @@
 RETURN 1;
 END|
 ERROR 0A000: Not allowed to return a result set from a function
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-BACKUP TABLE t1 TO '/tmp';
-RETURN 1;
-END|
-ERROR 0A000: Not allowed to return a result set from a function
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-RESTORE TABLE t1 FROM '/tmp';
-RETURN 1;
-END|
-ERROR 0A000: Not allowed to return a result set from a function
 create table t1 (a int)|
 CREATE PROCEDURE bug13012_1() REPAIR TABLE t1|
 CREATE FUNCTION bug13012_2() RETURNS INT

--- 1.248/mysql-test/r/sp.result	2007-03-02 11:20:15 +01:00
+++ 1.249/mysql-test/r/sp.result	2007-03-02 11:20:15 +01:00
@@ -2182,20 +2182,20 @@
 call bug3426(1000, @i)|
 select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
 @i	time
-2	01-01-1970 03:16:40
+2	01-01-1970 12:16:40
 call bug3426(NULL, @i)|
 select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
 @i	time
-1	01-01-1970 03:00:10
+1	01-01-1970 12:00:10
 alter procedure bug3426 sql security invoker|
 call bug3426(NULL, @i)|
 select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
 @i	time
-1	01-01-1970 03:00:10
+1	01-01-1970 12:00:10
 call bug3426(1000, @i)|
 select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
 @i	time
-2	01-01-1970 03:16:40
+2	01-01-1970 12:16:40
 drop procedure bug3426|
 create table t3 (
 id int unsigned auto_increment not null primary key,
@@ -4389,21 +4389,6 @@
 a - local variable in a nested compound statement
 drop procedure bug5967|
 drop procedure if exists bug13012|
-create procedure bug13012()
-BEGIN
-REPAIR TABLE t1;
-BACKUP TABLE t1 to '../tmp';
-DROP TABLE t1;
-RESTORE TABLE t1 FROM '../tmp';
-END|
-call bug13012()|
-Table	Op	Msg_type	Msg_text
-test.t1	repair	status	OK
-Table	Op	Msg_type	Msg_text
-test.t1	backup	status	OK
-Table	Op	Msg_type	Msg_text
-test.t1	restore	status	OK
-drop procedure bug13012|
 create view v1 as select * from t1|
 create procedure bug13012()
 BEGIN

--- 1.117/mysql-test/t/sp-error.test	2007-03-02 11:20:15 +01:00
+++ 1.118/mysql-test/t/sp-error.test	2007-03-02 11:20:15 +01:00
@@ -1565,18 +1565,18 @@
   REPAIR TABLE t1;
   RETURN 1;
 END|
---error ER_SP_NO_RETSET
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-  BACKUP TABLE t1 TO '/tmp';
-  RETURN 1;
-END|
---error ER_SP_NO_RETSET
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-  RESTORE TABLE t1 FROM '/tmp';
-  RETURN 1;
-END|
+#--error ER_SP_NO_RETSET
+#CREATE FUNCTION bug13012() RETURNS INT
+#BEGIN
+#  BACKUP TABLE t1 TO '/tmp';
+# RETURN 1;
+#END|
+#--error ER_SP_NO_RETSET
+#CREATE FUNCTION bug13012() RETURNS INT
+#BEGIN
+#  RESTORE TABLE t1 FROM '/tmp';
+#  RETURN 1;
+#END|
 create table t1 (a int)|
 CREATE PROCEDURE bug13012_1() REPAIR TABLE t1|
 CREATE FUNCTION bug13012_2() RETURNS INT

--- 1.216/mysql-test/t/sp.test	2007-03-02 11:20:15 +01:00
+++ 1.217/mysql-test/t/sp.test	2007-03-02 11:20:15 +01:00
@@ -5248,16 +5248,16 @@
 --disable_warnings
 drop procedure if exists bug13012|
 # Disable warnings also for BACKUP/RESTORE: they are deprecated.
-create procedure bug13012()
-BEGIN
-  REPAIR TABLE t1;
-  BACKUP TABLE t1 to '../tmp';
-  DROP TABLE t1;
-  RESTORE TABLE t1 FROM '../tmp';
-END|
-call bug13012()|
+#create procedure bug13012()
+#BEGIN
+#  REPAIR TABLE t1;
+#  BACKUP TABLE t1 to '../tmp';
+#  DROP TABLE t1;
+#  RESTORE TABLE t1 FROM '../tmp';
+#END|
+#call bug13012()|
 --enable_warnings
-drop procedure bug13012|
+#drop procedure bug13012|
 create view v1 as select * from t1|
 create procedure bug13012()
 BEGIN

--- 1.32/sql/CMakeLists.txt	2007-03-02 11:20:15 +01:00
+++ 1.33/sql/CMakeLists.txt	2007-03-02 11:20:15 +01:00
@@ -54,8 +54,10 @@
                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.h backup0.h backup_private.h backup_util.h
-							 backup.cc backup_util.cc backup_prototype.cc backup_alg.cc restore_alg.cc
+               rpl_rli.cc rpl_mi.cc sql_servers.cc
+	       sql_connect.cc scheduler.cc 
+	       backup.h backup0.h backup_private.h backup_util.h
+	       backup.cc backup_util.cc backup_prototype.cc backup_alg.cc restore_alg.cc
                ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
   			   ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
 			   ${PROJECT_SOURCE_DIR}/include/mysqld_error.h

--- 1.278/BitKeeper/etc/ignore	2007-03-02 11:20:15 +01:00
+++ 1.279/BitKeeper/etc/ignore	2007-03-02 11:20:15 +01:00
@@ -55,15 +55,20 @@
 ./mysql.sln
 ./mysql.suo
 ./prepare
+.cdtproject
 .defs.mk
 .depend
 .depend.mk
 .deps
+.externalToolBuilders/org.eclipse.cdt.make.core.ScannerConfigBuilder.launch
 .gdb_history
 .gdbinit
 .libs
 .o
 .out
+.project
+.settings/org.eclipse.cdt.core.prefs
+.settings/org.eclipse.ltk.core.refactoring.prefs
 .snprj/*
 .vimrc
 50
@@ -1005,6 +1010,7 @@
 libmysqld/.deps/tztime.Po
 libmysqld/.deps/uniques.Po
 libmysqld/.deps/unireg.Po
+libmysqld/backup.cc
 libmysqld/backup_dir
 libmysqld/client.c
 libmysqld/client_settings.h
Thread
bk commit into 5.1 tree (rafal:1.2475)rsomla2 Mar