MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Satya B Date:February 10 2010 7:20am
Subject:bzr commit into mysql-backup-backport branch (satya.bn:3086) Bug#50374
View as plain text  
#At file:///home/satya/WORK/50374/mysql-next-mr-backup-50374/ based on revid:charles.bell@stripped

 3086 Satya B	2010-02-10
      BUG#50374 - Test failures when compiling with -DBACKUP_TEST
            
      This option was added to test BACKUP/RESTORE code easily in the early
      stages of development.
            
      Since we no longer use this and we can do testing of backup code even
      without this option '-DBACKUP_TEST', backup_test code is removed.
            
      Note: There is no test case and has to be tested by running unit tests
            (make test-unit) and backup tests.
     @ sql/backup/CMakeLists.txt
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/backup/Makefile.am
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/backup/backup_test.cc
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/backup/backup_test.h
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/lex.h
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/sql_parse.cc
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.
     @ sql/sql_yacc.yy
        BUG#50374 - Test failures when compiling with -DBACKUP_TEST
        
        Remove backup_test code.

    removed:
      sql/backup/backup_test.cc
      sql/backup/backup_test.h
    modified:
      sql/backup/CMakeLists.txt
      sql/backup/Makefile.am
      sql/lex.h
      sql/sql_parse.cc
      sql/sql_yacc.yy
=== modified file 'sql/backup/CMakeLists.txt'
--- a/sql/backup/CMakeLists.txt	2009-12-21 19:37:43 +0000
+++ b/sql/backup/CMakeLists.txt	2010-02-10 07:20:24 +0000
@@ -23,7 +23,7 @@ SET(BACKUP_SOURCES stream.cc logger.cc k
                image_info.cc backup_info.cc data_backup.cc
                be_default.cc buffer_iterator.cc
                be_snapshot.cc be_thread.cc 
-               backup_test.cc be_nodata.cc
+               be_nodata.cc
                restore_info.cc)
 
 IF(NOT SOURCE_SUBLIBS)

=== modified file 'sql/backup/Makefile.am'
--- a/sql/backup/Makefile.am	2009-12-21 19:37:43 +0000
+++ b/sql/backup/Makefile.am	2010-02-10 07:20:24 +0000
@@ -37,7 +37,6 @@ libbackup_la_SOURCES = \
   be_nodata.cc \
   buffer_iterator.cc \
   be_thread.cc \
-  backup_test.cc \
   restore_info.cc
 
 libbackup_la_LIBADD = libbackupstream.la
@@ -67,8 +66,7 @@ noinst_HEADERS = \
   buffer_iterator.h \
   be_thread.h \
   stream_v1.h \
-  stream_v1_services.h \
-  backup_test.h
+  stream_v1_services.h
 
 DEFS = \
   -DMYSQL_SERVER \

=== removed file 'sql/backup/backup_test.cc'
--- a/sql/backup/backup_test.cc	2009-12-21 19:37:43 +0000
+++ b/sql/backup/backup_test.cc	1970-01-01 00:00:00 +0000
@@ -1,268 +0,0 @@
-/**
-  @file
-
-  Implementation of the backup test function.
-
-  @todo Implement code to test service interface(s).
-*/
-
-#include "../mysql_priv.h"
-#include "si_objects.h"
-#include "backup_aux.h"
-
-using namespace obs;
-
-
-/**
-   Call backup kernel API to execute backup related SQL statement.
-
-   @param[in] thd  current thread
-   @param[in] db_list  List of databases.
-*/
-int execute_backup_test_command(THD *thd, List<LEX_STRING> *db_list)
-{
-  int res= 0;
-
-  DBUG_ENTER("execute_backup_test_command");
-  DBUG_ASSERT(thd);
-
-  Protocol *protocol= thd->protocol;    // client comms
-  List<Item> field_list;                // list of fields to send
-  String     op_str;                    // operations string
-  String str;
-
-  {
-    String tmp_db_name("qqq", 3, system_charset_info);
-    DBUG_ASSERT(obs::check_db_existence(thd, &tmp_db_name));
-  }
-
-  /*
-    Send field list.
-  */
-  field_list.push_back(new Item_empty_string("db", 2));
-  field_list.push_back(new Item_empty_string("name", 5));
-  field_list.push_back(new Item_empty_string("type", 4));
-  field_list.push_back(new Item_empty_string("serialization", 13));
-  protocol->send_result_set_metadata(&field_list, Protocol::SEND_NUM_ROWS 
-                                                  | Protocol::SEND_EOF);
-
-  //obs::Obj_iterator *it= obs::get_databases(thd);
-  List_iterator<LEX_STRING> it(*db_list);
-
-  //if (it)
-  {
-    obs::Obj *db;
-
-    //while ((db= it->next()))
-    LEX_STRING *dbname;
-    while ((dbname= it++))
-    {
-      String dir;
-      dir.copy(dbname->str, dbname->length, system_charset_info);
-      db= get_database_stub(thd, &dir);
-
-      if (is_internal_db_name(db->get_db_name()))
-          continue;
-
-      DBUG_ASSERT(!obs::check_db_existence(thd, db->get_db_name()));
-
-      //
-      // List tables..
-      //
-
-      obs::Obj_iterator *tit= obs::get_db_tables(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *table;
-
-        while ((table= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(table->get_name()));
-          protocol->store("TABLE", 5, system_charset_info);
-          table->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete table;
-        }
-      }
-
-      //
-      // List views.
-      //
-
-      tit= obs::get_db_views(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *table;
-
-        while ((table= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(table->get_name()));
-          protocol->store("VIEW", 5, system_charset_info);
-          table->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete table;
-        }
-
-        delete tit;
-      }
-
-      //
-      // List triggers.
-      //
-
-      tit= obs::get_db_triggers(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *trigger;
-
-        while ((trigger= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(trigger->get_name()));
-          protocol->store(C_STRING_WITH_LEN("TRIGGER"), system_charset_info);
-          trigger->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete trigger;
-        }
-
-        delete tit;
-      }
-
-      //
-      // List stored procedures.
-      //
-
-      tit= obs::get_db_stored_procedures(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *sp;
-
-        while ((sp= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(sp->get_name()));
-          protocol->store(C_STRING_WITH_LEN("STORED PROCEDURE"),
-                          system_charset_info);
-          sp->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete sp;
-        }
-
-        delete tit;
-      }
-
-      //
-      // List stored functions.
-      //
-
-      tit= obs::get_db_stored_functions(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *sf;
-
-        while ((sf= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(sf->get_name()));
-          protocol->store(C_STRING_WITH_LEN("STORED FUNCTION"),
-                          system_charset_info);
-          sf->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete sf;
-        }
-
-        delete tit;
-      }
-
-      //
-      // List events.
-      //
-
-      tit= obs::get_db_events(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *event;
-
-        while ((event= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(event->get_name()));
-          protocol->store(C_STRING_WITH_LEN("EVENT"),
-                          system_charset_info);
-          event->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete event;
-        }
-      }
-
-      //
-      // List db grants.
-      //
-      tit= obs::get_all_db_grants(thd, db->get_name());
-
-      if (tit)
-      {
-        obs::Obj *grant;
-
-        while ((grant= tit->next()))
-        {
-          String serial;
-          serial.length(0);
-          protocol->prepare_for_resend();
-          protocol->store(const_cast<String*>(db->get_name()));
-          protocol->store(const_cast<String*>(grant->get_name()));
-          check_user_existence(thd, grant);
-          protocol->store(C_STRING_WITH_LEN("GRANT"),
-                          system_charset_info);
-          grant->serialize(thd, &serial);
-          protocol->store(&serial);
-          protocol->write();
-
-          delete grant;
-        }
-
-      delete tit;
-      }
-    }
-  }
-  my_eof(thd);
-  DBUG_RETURN(res);
-}

=== removed file 'sql/backup/backup_test.h'
--- a/sql/backup/backup_test.h	2009-12-21 19:09:47 +0000
+++ b/sql/backup/backup_test.h	1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-#ifndef _BACKUP_TEST_H
-#define _BACKUP_TEST_H
-
-/*
-  Called from the big switch in mysql_execute_command() to execute
-  backup related demo
-*/
-int execute_backup_test_command(THD*, List<LEX_STRING> *);
-
-#endif

=== modified file 'sql/lex.h'
--- a/sql/lex.h	2009-12-22 20:35:01 +0000
+++ b/sql/lex.h	2010-02-10 07:20:24 +0000
@@ -619,13 +619,7 @@ static SYMBOL symbols[] = {
   { "YEAR",		SYM(YEAR_SYM)},
   { "YEAR_MONTH",	SYM(YEAR_MONTH_SYM)},
   { "ZEROFILL",		SYM(ZEROFILL)},
-#ifdef BACKUP_TEST
-  { "||",		SYM(OR_OR_SYM)},
-  { "BACKUP_TEST",	        SYM(BACKUP_TEST_SYM)},
-  { "BT",	        SYM(BACKUP_TEST_SYM)}
-#else
   { "||",		SYM(OR_OR_SYM)}
-#endif
 };
 
 

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-02-01 22:14:01 +0000
+++ b/sql/sql_parse.cc	2010-02-10 07:20:24 +0000
@@ -34,10 +34,6 @@
 #include "probes_mysql.h"
 #include "debug_sync.h"
 
-#ifdef BACKUP_TEST
-#include "backup/backup_test.h"
-#endif
-
 /**
   @defgroup Runtime_Environment Runtime Environment
   @{
@@ -2358,23 +2354,6 @@ case SQLCOM_PREPARE:
   }
 #endif
 
-
-#ifdef BACKUP_TEST
-  case SQLCOM_BACKUP_TEST:
-#ifdef EMBEDDED_LIBRARY
-    my_error(ER_NOT_SUPPORTED_YET, MYF(0), "BACKUP");
-    goto error;
-#else
-    /*
-      Note: execute_backup_test_command() sends a correct response to the client
-      (either ok, result set or error message).
-     */  
-    if (execute_backup_test_command(thd, &lex->db_list)) 
-      goto error;
-    break;
-#endif
-#endif
-
   case SQLCOM_BACKUP:
 #ifdef EMBEDDED_LIBRARY
     my_error(ER_NOT_SUPPORTED_YET, MYF(0), "BACKUP");

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2010-01-06 16:11:15 +0000
+++ b/sql/sql_yacc.yy	2010-02-10 07:20:24 +0000
@@ -1215,7 +1215,6 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %token  YEAR_MONTH_SYM
 %token  YEAR_SYM                      /* SQL-2003-R */
 %token  ZEROFILL
-%token  BACKUP_TEST_SYM
 
 %left   JOIN_SYM INNER_SYM STRAIGHT_JOIN CROSS LEFT RIGHT
 /* A dummy token to force the priority of table_ref production in a join. */
@@ -6690,13 +6689,6 @@ backup:   
           {
             Lex->backup_dir = $6;
           }
-        | BACKUP_TEST_SYM
-          database_list
-          {
-#ifdef BACKUP_TEST
-            Lex->sql_command = SQLCOM_BACKUP_TEST;
-#endif
-          }
         ;
 
 opt_compression:


Attachment: [text/bzr-bundle] bzr/satya.bn@sun.com-20100210072024-xnyx6vw5207wgn6u.bundle
Thread
bzr commit into mysql-backup-backport branch (satya.bn:3086) Bug#50374Satya B10 Feb