Below is the list of changes that have just been committed into a local
6.0 repository of cbell. When cbell 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, 2008-01-10 16:22:43-05:00, cbell@mysql_laptop. +10 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Patch adds a new stubbed backup test command.
CMakeLists.txt@stripped, 2008-01-10 16:22:23-05:00, cbell@mysql_laptop. +4 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Add the backup test compile directive.
sql/backup/CMakeLists.txt@stripped, 2008-01-10 16:22:28-05:00, cbell@mysql_laptop. +1 -1
WL#3574 : Online backup: Service API for Metadata Objects II
Add new code files to build.
sql/backup/Makefile.am@stripped, 2008-01-10 16:22:29-05:00, cbell@mysql_laptop. +3 -1
WL#3574 : Online backup: Service API for Metadata Objects II
Add new code files to build.
sql/backup/backup_test.cc@stripped, 2008-01-10 16:22:30-05:00, cbell@mysql_laptop. +25 -0
WL#3574 : Online backup: Service API for Metadata Objects II
New code file for backup test command.
sql/backup/backup_test.cc@stripped, 2008-01-10 16:22:30-05:00, cbell@mysql_laptop. +0 -0
sql/backup/backup_test.h@stripped, 2008-01-10 16:22:31-05:00, cbell@mysql_laptop. +10 -0
WL#3574 : Online backup: Service API for Metadata Objects II
New header file for backup test command.
sql/backup/backup_test.h@stripped, 2008-01-10 16:22:31-05:00, cbell@mysql_laptop. +0 -0
sql/lex.h@stripped, 2008-01-10 16:22:24-05:00, cbell@mysql_laptop. +5 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Add the test keyword to the list of symbols.
sql/sql_lex.h@stripped, 2008-01-10 16:22:25-05:00, cbell@mysql_laptop. +3 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Add the backup test command case enum.
sql/sql_parse.cc@stripped, 2008-01-10 16:22:26-05:00, cbell@mysql_laptop. +21 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Add a case in the big switch for the backup test command.
sql/sql_yacc.yy@stripped, 2008-01-10 16:22:27-05:00, cbell@mysql_laptop. +8 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Modify parser to add backup test command.
win/configure.js@stripped, 2008-01-10 16:22:29-05:00, cbell@mysql_laptop. +1 -0
WL#3574 : Online backup: Service API for Metadata Objects II
Add the backup test compile directive.
diff -Nrup a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2007-12-06 12:31:03 -05:00
+++ b/CMakeLists.txt 2008-01-10 16:22:23 -05:00
@@ -106,6 +106,10 @@ IF(EXTRA_DEBUG)
ADD_DEFINITIONS(-D EXTRA_DEBUG)
ENDIF(EXTRA_DEBUG)
+IF(BACKUP_TEST)
+ ADD_DEFINITIONS(-D BACKUP_TEST)
+ENDIF(BACKUP_TEST)
+
# in some places we use DBUG_OFF
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
diff -Nrup a/sql/backup/CMakeLists.txt b/sql/backup/CMakeLists.txt
--- a/sql/backup/CMakeLists.txt 2008-01-09 19:02:01 -05:00
+++ b/sql/backup/CMakeLists.txt 2008-01-10 16:22:28 -05:00
@@ -26,7 +26,7 @@ SET(BACKUP_SOURCES stream.cc logger.cc k
catalog.cc meta_data.cc data_backup.cc
be_default.cc buffer_iterator.cc
be_snapshot.cc be_thread.cc backup_progress.cc
- si_objects.cc)
+ si_objects.cc backup_test.cc)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(backup ${BACKUP_SOURCES})
diff -Nrup a/sql/backup/Makefile.am b/sql/backup/Makefile.am
--- a/sql/backup/Makefile.am 2008-01-09 19:02:02 -05:00
+++ b/sql/backup/Makefile.am 2008-01-10 16:22:29 -05:00
@@ -37,6 +37,7 @@ libbackup_la_SOURCES = \
buffer_iterator.cc \
be_thread.cc \
backup_progress.cc \
+ backup_test.cc \
si_objects.cc
libbackup_la_LIBADD = libbackupstream.la
@@ -65,7 +66,8 @@ noinst_HEADERS = \
be_thread.h \
backup_progress.h \
stream_v1.h \
- stream_v1_services.h
+ stream_v1_services.h \
+ backup_test.h
DEFS = \
-DMYSQL_SERVER \
diff -Nrup a/sql/backup/backup_test.cc b/sql/backup/backup_test.cc
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/sql/backup/backup_test.cc 2008-01-10 16:22:30 -05:00
@@ -0,0 +1,25 @@
+/**
+ @file
+
+ Implementation of the backup test function.
+
+ @todo Implement code to test service interface(s).
+ */
+
+#include "../mysql_priv.h"
+
+/**
+ Call backup kernel API to execute backup related SQL statement.
+
+ @param[in] thd current thread
+ @param[in] lex results of parsing the statement.
+ */
+int execute_backup_test_command(THD *thd, LEX *lex)
+{
+ int res= 0;
+ DBUG_ENTER("execute_backup_command");
+ DBUG_ASSERT(thd && lex);
+ send_ok(thd);
+ DBUG_RETURN(res);
+}
+
diff -Nrup a/sql/backup/backup_test.h b/sql/backup/backup_test.h
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/sql/backup/backup_test.h 2008-01-10 16:22:31 -05:00
@@ -0,0 +1,10 @@
+#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*, LEX*);
+
+#endif
diff -Nrup a/sql/lex.h b/sql/lex.h
--- a/sql/lex.h 2007-08-27 03:05:26 -04:00
+++ b/sql/lex.h 2008-01-10 16:22:24 -05:00
@@ -589,7 +589,12 @@ static SYMBOL symbols[] = {
{ "YEAR", SYM(YEAR_SYM)},
{ "YEAR_MONTH", SYM(YEAR_MONTH_SYM)},
{ "ZEROFILL", SYM(ZEROFILL)},
+#ifdef BACKUP_TEST
+ { "||", SYM(OR_OR_SYM)},
+ { "TEST", SYM(TEST)}
+#else
{ "||", SYM(OR_OR_SYM)}
+#endif
};
diff -Nrup a/sql/sql_lex.h b/sql/sql_lex.h
--- a/sql/sql_lex.h 2007-12-06 12:31:04 -05:00
+++ b/sql/sql_lex.h 2008-01-10 16:22:25 -05:00
@@ -119,6 +119,9 @@ enum enum_sql_command {
SQLCOM_ALTER_DB_UPGRADE,
SQLCOM_SHOW_ARCHIVE,
SQLCOM_BACKUP, SQLCOM_RESTORE,
+#ifdef BACKUP_TEST
+ SQLCOM_BACKUP_TEST,
+#endif
/* This should be the last !!! */
SQLCOM_END
diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc 2007-12-12 15:13:25 -05:00
+++ b/sql/sql_parse.cc 2008-01-10 16:22:26 -05:00
@@ -30,6 +30,10 @@
#include <ddl_blocker.h>
#include "backup/debug.h"
+#ifdef BACKUP_TEST
+#include "backup/backup_test.h"
+#endif
+
/**
@defgroup Runtime_Environment Runtime Environment
@{
@@ -1956,6 +1960,23 @@ mysql_execute_command(THD *thd)
res = mysql_show_binlog_events(thd);
break;
}
+#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))
+ goto error;
+ break;
+#endif
#endif
case SQLCOM_SHOW_ARCHIVE:
diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy
--- a/sql/sql_yacc.yy 2007-12-06 12:31:05 -05:00
+++ b/sql/sql_yacc.yy 2008-01-10 16:22:27 -05:00
@@ -1097,6 +1097,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
%token YEAR_MONTH_SYM
%token YEAR_SYM /* SQL-2003-R */
%token ZEROFILL
+%token TEST
%left JOIN_SYM INNER_SYM STRAIGHT_JOIN CROSS LEFT RIGHT
/* A dummy token to force the priority of table_ref production in a join. */
@@ -6036,6 +6037,13 @@ backup:
database_list TO_SYM TEXT_STRING_sys
{
Lex->backup_dir = $6;
+ }
+ | BACKUP_SYM TEST database_list
+ {
+#ifdef BACKUP_TEST
+ Lex->sql_command = SQLCOM_BACKUP_TEST;
+ Lex->db_list.empty();
+#endif
}
;
diff -Nrup a/win/configure.js b/win/configure.js
--- a/win/configure.js 2007-11-09 16:13:09 -05:00
+++ b/win/configure.js 2008-01-10 16:22:29 -05:00
@@ -49,6 +49,7 @@ try
case "__NT__":
case "CYBOZU":
case "EXTRA_DEBUG":
+ case "BACKUP_TEST":
case "EMBED_MANIFESTS":
case "WITH_EMBEDDED_SERVER":
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
| Thread |
|---|
| • bk commit into 6.0 tree (cbell:1.2757) WL#3574 | cbell | 10 Jan |