[-]
[+]
|
Changed |
mydumper.spec
|
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/CMakeLists.txt
^
|
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(mydumper)
-set(VERSION 0.5.1)
+set(VERSION 0.5.2)
set(ARCHIVE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
#Required packages
@@ -16,7 +16,7 @@
add_subdirectory(docs)
endif (BUILD_DOCS)
-set(CMAKE_C_FLAGS "-Wall -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -Werror -O3 -g ${MYSQL_CFLAGS}")
+set(CMAKE_C_FLAGS "-Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -Werror -O3 -g ${MYSQL_CFLAGS}")
include_directories(${MYDUMPER_SOURCE_DIR} ${MYSQL_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PCRE_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
@@ -25,13 +25,13 @@
endif (NOT CMAKE_INSTALL_PREFIX)
MARK_AS_ADVANCED(CMAKE)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
add_executable(mydumper mydumper.c binlog.c server_detect.c g_unix_signal.c)
-target_link_libraries(mydumper ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
+target_link_libraries(mydumper ${MYSQL_LIBRARIES_mysqlclient_r} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
add_executable(myloader myloader.c)
-target_link_libraries(myloader ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
+target_link_libraries(myloader ${MYSQL_LIBRARIES_mysqlclient_r} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES})
INSTALL(TARGETS mydumper myloader
RUNTIME DESTINATION bin
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/README
^
|
@@ -18,7 +18,8 @@
* Ubuntu or Debian: apt-get install libglib2.0-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev
* Fedora, RedHat and CentOS: yum install glib2-devel mysql-devel zlib-devel pcre-devel
* openSUSE: zypper install glib2-devel libmysqlclient-devel pcre-devel zlib-devel
-* MacOSX: port install glib2 mysql5 pcre
+* MacOSX: port install glib2 mysql5 pcre pkgconfig cmake
+ (You may want to run 'port select mysql mysql5' afterwards)
One has to make sure, that pkg-config, mysql_config, pcre-config are all in $PATH
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/binlog.c
^
|
@@ -241,7 +241,7 @@
outfile= g_fopen(filename, "w");
} else {
filename= g_strdup_printf("%s/%s.gz", binlog_dir, binlog_file);
- outfile= gzopen(filename, "w");
+ outfile= (void*) gzopen(filename, "w");
}
g_free(filename);
@@ -252,7 +252,7 @@
if (!compress_output)
fclose(outfile);
else
- gzclose(outfile);
+ gzclose((gzFile) outfile);
}
unsigned int get_event(const char *buf, unsigned int len) {
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/cmake/modules/FindMySQL.cmake
^
|
@@ -47,7 +47,9 @@
set(MYSQL_ADD_LIBRARIES "")
- string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
+ # prepend space in order to match separate words only (e.g. rather
+ # than "-linux" from within "-L/usr/lib/i386-linux-gnu")
+ string(REGEX MATCHALL " +-l[^ ]*" MYSQL_LIB_LIST " ${MY_TMP}")
foreach(MY_LIB ${MYSQL_LIB_LIST})
string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
list(APPEND MYSQL_ADD_LIBRARIES "${MY_LIB}")
@@ -55,7 +57,7 @@
set(MYSQL_ADD_LIBRARY_PATH "")
- string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
+ string(REGEX MATCHALL " +-L[^ ]*" MYSQL_LIBDIR_LIST " ${MY_TMP}")
foreach(MY_LIB ${MYSQL_LIBDIR_LIST})
string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
list(APPEND MYSQL_ADD_LIBRARY_PATH "${MY_LIB}")
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/cmake/modules/FindSphinx.cmake
^
|
@@ -4,6 +4,9 @@
# This modules defines
# SPHINX_EXECUTABLE
# SPHINX_FOUND
+# SPHINX_MAJOR_VERSION
+# SPHINX_MINOR_VERSION
+# SPHINX_VERSION
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -32,6 +35,23 @@
SPHINX_EXECUTABLE
)
+if (SPHINX_EXECUTABLE)
+ execute_process (
+ COMMAND "${SPHINX_EXECUTABLE}" -h
+ OUTPUT_VARIABLE _SPHINX_VERSION_OUTPUT
+ ERROR_VARIABLE _SPHINX_VERSION_OUTPUT
+ )
+ if (_SPHINX_VERSION_OUTPUT MATCHES "Sphinx v([0-9]+\\.[0-9]+\\.[0-9]+)")
+ set (SPHINX_VERSION "${CMAKE_MATCH_1}")
+ string (REPLACE "." ";" _SPHINX_VERSION_LIST "${SPHINX_VERSION}")
+ list (GET _SPHINX_VERSION_LIST 0 SPHINX_MAJOR_VERSION)
+ list (GET _SPHINX_VERSION_LIST 1 SPHINX_MINOR_VERSION)
+ # patch version meh :)
+ endif()
+endif()
+
+message("${SPHINX_MAJOR_VERSION}")
+
mark_as_advanced(
SPHINX_EXECUTABLE
)
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/docs/CMakeLists.txt
^
|
@@ -10,6 +10,11 @@
set(GENERATE_DOC FALSE)
endif(NOT SPHINX_FOUND)
+if(SPHINX_MAJOR_VERSION LESS 1)
+ message(WARNING "Sphinx is older than v1.0, not building docs")
+ set(GENERATE_DOC FALSE)
+endif(SPHINX_MAJOR_VERSION LESS 1)
+
if(GENERATE_DOC)
# documentation tools
set(SOURCE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/_build")
@@ -148,6 +153,4 @@
ADDITIONAL_MAKE_CLEAN_FILES "${CLEAN_FILES}"
)
-else(GENERATE_DOC)
- message(WARNING "Missing python-sphinx documentation tools, docs will not be built")
endif(GENERATE_DOC)
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/mydumper.c
^
|
@@ -1156,7 +1156,7 @@
if (!compress_output)
outfile= g_fopen(filename, "w");
else
- outfile= gzopen(filename, "w");
+ outfile= (void*) gzopen(filename, "w");
if (!outfile) {
g_critical("Error: DB: %s Could not create output file %s (%d)", database, filename, errno);
@@ -1202,7 +1202,7 @@
if (!compress_output)
fclose((FILE *)outfile);
else
- gzclose(outfile);
+ gzclose((gzFile)outfile);
g_string_free(statement, TRUE);
@@ -1218,7 +1218,7 @@
if (!compress_output)
outfile = g_fopen(filename, "w");
else
- outfile = gzopen(filename, "w");
+ outfile = (void*) gzopen(filename, "w");
if (!outfile) {
g_critical("Error: DB: %s TABLE: %s Could not create output file %s (%d)", database, table, filename, errno);
@@ -1229,7 +1229,7 @@
if (!compress_output)
fclose((FILE *)outfile);
else
- gzclose(outfile);
+ gzclose((gzFile)outfile);
if (!rows_count && !build_empty_files) {
// dropping the useless file
|
[-]
[+]
|
Changed |
mydumper-0.5.2.tar.gz/myloader.c
^
|
@@ -331,7 +331,7 @@
infile= g_fopen(path, "r");
is_compressed= FALSE;
} else {
- infile= gzopen(path, "r");
+ infile= (void*) gzopen(path, "r");
is_compressed= TRUE;
}
@@ -368,7 +368,7 @@
if (!is_schema &&(query_counter == commit_count)) {
query_counter= 0;
if (mysql_query(conn, "COMMIT")) {
- g_critical("Error commiting data for %s.%s: %s", db ? db : database, table, mysql_error(conn));
+ g_critical("Error committing data for %s.%s: %s", db ? db : database, table, mysql_error(conn));
errors++;
return;
}
@@ -384,7 +384,7 @@
}
}
if (!is_schema && mysql_query(conn, "COMMIT")) {
- g_critical("Error commiting data for %s.%s from file %s: %s", db ? db : database, table, filename, mysql_error(conn));
+ g_critical("Error committing data for %s.%s from file %s: %s", db ? db : database, table, filename, mysql_error(conn));
errors++;
}
g_string_free(data, TRUE);
@@ -392,7 +392,7 @@
if (!is_compressed) {
fclose(infile);
} else {
- gzclose(infile);
+ gzclose((gzFile)infile);
}
return;
}
@@ -412,7 +412,7 @@
}
} else {
if (!gzgets((gzFile)file, buffer, 256)) {
- if (gzeof(file)) {
+ if (gzeof((gzFile)file)) {
*eof= TRUE;
buffer[0]= '\0';
} else {
|