Commit 2be1a25f authored by unknown's avatar unknown

Automerge MariaDB 5.1->5.2.

parents b95bd9f5 ee45ab06
......@@ -334,3 +334,126 @@ IF(WITH_EMBEDDED_SERVER)
ADD_SUBDIRECTORY(libmysqld/examples)
ENDIF(WITH_EMBEDDED_SERVER)
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
# Set up the installer
SET(CPACK_PACKAGE_NAME "MariaDB")
STRING(REPLACE "-MariaDB" "" CPACK_PACKAGE_VERSION ${VERSION})
SET(CPACK_PACKAGE_VENDOR "Monty Program AB http://www.montyprogram.com")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB")
SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
SET(CPACK_GENERATOR NSIS)
# Use our own NSIS template
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/win/cmake" ${CMAKE_MODULE_PATH})
# Installer components and grouping
SET(CPACK_COMPONENT_GROUP_SERVER_DESCRIPTION "The files necessary for running the MariaDB server.")
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Files used in development on the MariaDB server.")
SET(CPACK_ALL_INSTALL_TYPES Normal Development)
SET(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "MariaDB server")
SET(CPACK_COMPONENT_RUNTIME_DESCRIPTION "The server itself. You want to install this one.")
SET(CPACK_COMPONENT_RUNTIME_GROUP "Server")
SET(CPACK_COMPONENT_RUNTIME_INSTALL_TYPES Normal Development)
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Development headers")
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "Header files for development on MariaDB.")
SET(CPACK_COMPONENT_HEADERS_DEPENDS runtime)
SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Development)
SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded")
SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Files for embedding MariaDB in other projects.")
SET(CPACK_COMPONENT_EMBEDDED_DEPENDS headers)
SET(CPACK_COMPONENT_EMBEDDED_GROUP "Development")
SET(CPACK_COMPONENT_EMBEDDED_INSTALL_TYPES Development)
SET(CPACK_COMPONENT_SCRIPTS_DISPLAY_NAME "Server scripts")
SET(CPACK_COMPONENT_SCRIPTS_DESCRIPTION "SQL and Perl scripts to control and modify the server. You need a perl installation for some of these to work.")
SET(CPACK_COMPONENT_SCRIPTS_DEPENDS runtime)
SET(CPACK_COMPONENT_SCRIPTS_GROUP "Server")
SET(CPACK_COMPONENT_SCRIPTS_INSTALL_TYPES Normal Development)
SET(CPACK_COMPONENT_MYSQLTEST_DISPLAY_NAME "MariaDB test suite")
SET(CPACK_COMPONENT_MYSQLTEST_DESCRIPTION "The MariaDB regression test suite.")
SET(CPACK_COMPONENT_MYSQLTEST_DEPENDS runtime)
SET(CPACK_COMPONENT_MYSQLTEST_GROUP "Testing")
SET(CPACK_COMPONENT_MYSQLTEST_INSTALL_TYPES Normal Development)
SET(CPACK_COMPONENT_SQLBENCH_DISPLAY_NAME "SQL Bench")
SET(CPACK_COMPONENT_SQLBENCH_DESCRIPTION "The MariaDB benchmark suite.")
SET(CPACK_COMPONENT_SQLBENCH_DEPENDS runtime)
SET(CPACK_COMPONENT_SQLBENCH_GROUP "Testing")
SET(CPACK_COMPONENT_SQLBENCH_INSTALL_TYPES Normal Development)
# Add files to the installer
INSTALL(FILES COPYING EXCEPTIONS-CLIENT DESTINATION .)
INSTALL(FILES support-files/my-huge.ini support-files/my-innodb-heavy-4G.ini DESTINATION .)
INSTALL(FILES support-files/my-large.ini support-files/my-medium.ini DESTINATION .)
INSTALL(FILES support-files/my-small.ini DESTINATION .)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION Docs)
INSTALL(FILES COPYING DESTINATION Docs)
FILE(GLOB headerfiles "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
INSTALL(FILES ${headerfiles} DESTINATION include COMPONENT headers)
INSTALL(FILES include/mysql/plugin.h DESTINATION include/mysql COMPONENT headers)
INSTALL(FILES libmysql/libmysql.def DESTINATION include COMPONENT headers)
# Handle the database files
FILE(GLOB datafiles "${CMAKE_CURRENT_SOURCE_DIR}/win/data/mysql/*")
INSTALL(FILES ${datafiles} DESTINATION data/clean/mysql)
INSTALL(FILES win/data/maria_log.00000001 win/data/maria_log_control DESTINATION data/clean)
INSTALL(DIRECTORY win/data/test DESTINATION data/clean)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
IfFileExists '$INSTDIR\\\\data\\\\mysql\\\\db.frm' 0 CopyDatabaseFiles
MessageBox MB_OK 'There are already database files present in the data directory. Clean database files are not written to the directory'
GoTo EndCopyDatabaseFiles
CopyDatabaseFiles:
CopyFiles '$INSTDIR\\\\data\\\\clean\\\\*' '$INSTDIR\\\\data'
EndCopyDatabaseFiles:")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
MessageBox MB_OK 'This will not delete the database files in $INSTDIR\\\\data'")
# Files in the share dir
INSTALL(FILES sql/share/errmsg.txt DESTINATION share COMPONENT runtime)
FILE(GLOB charsets sql/share/charsets/*)
INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime)
FILE(GLOB share_dirs sql/share/*/errmsg.sys)
FOREACH(ERRMSGFILE ${share_dirs})
STRING(REPLACE "//" "/" ERRMSGFILE ${ERRMSGFILE}) # Work around a cmake bug
FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${ERRMSGFILE})
STRING(REPLACE "/errmsg.sys" "" DIRNAME ${DIRNAME})
INSTALL(FILES ${ERRMSGFILE} DESTINATION share/${DIRNAME} COMPONENT runtime)
ENDFOREACH(ERRMSGFILE ${share_dirs})
# MTR files
FILE(GLOB_RECURSE testfiles mysql-test/*)
FOREACH(testfile ${testfiles})
FILE(RELATIVE_PATH dirname ${PROJECT_SOURCE_DIR} ${testfile})
GET_FILENAME_COMPONENT(dirname ${dirname} PATH)
GET_FILENAME_COMPONENT(filename ${testfile} NAME)
GET_FILENAME_COMPONENT(ext ${testfile} EXT)
SET(ok "yes")
IF (NOT "x_${ext}" STREQUAL "x_")
# Test if this is one of the extensions we don't want to install
STRING(TOLOWER ${ext} ext)
IF(${ext} STREQUAL ".dir" OR ${ext} STREQUAL ".vcproj" OR ${ext} STREQUAL ".user" OR ${ext} STREQUAL ".ilk"
OR ${ext} STREQUAL ".idb" OR ${ext} STREQUAL ".map" OR ${ext} STREQUAL ".gcov"
OR ${ext} STREQUAL ".supp" OR ${ext} STREQUAL ".am" OR ${ext} STREQUAL ".stress")
SET(ok "no")
ENDIF()
ENDIF(NOT "x_${ext}" STREQUAL "x_")
IF (${ok} STREQUAL "yes")
# Message("Dir: ${dirname}. File: ${filename}. Ext: ${ext}")
INSTALL(FILES ${testfile} DESTINATION ${dirname} COMPONENT mysqltest)
ENDIF(${ok} STREQUAL "yes")
ENDFOREACH(testfile ${testfiles})
# SQL Bench
FILE(GLOB_RECURSE benchfiles sql-bench/*)
FOREACH(testfile ${testfiles})
FILE(RELATIVE_PATH dirname ${PROJECT_SOURCE_DIR} ${testfile})
GET_FILENAME_COMPONENT(dirname ${dirname} PATH)
GET_FILENAME_COMPONENT(filename ${testfile} NAME)
IF(NOT ${dirname} STREQUAL "sql-bench" OR ${filename} STREQUAL "README")
INSTALL(FILES ${testfile} DESTINATION ${dirname} COMPONENT sqlbench)
ENDIF()
ENDFOREACH(testfile ${testfiles})
INCLUDE(InstallRequiredSystemLibraries)
# This must always be the last line
INCLUDE(CPack)
......@@ -85,3 +85,5 @@ ENDIF(EMBED_MANIFESTS)
ADD_DEFINITIONS(-DHAVE_DLOPEN)
INSTALL(TARGETS mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow
mysqlbinlog mysqladmin mysqlslap echo DESTINATION bin COMPONENT runtime)
......@@ -1441,6 +1441,7 @@ static void free_resources()
if (md_result_file && md_result_file != stdout)
my_fclose(md_result_file, MYF(0));
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
my_free(current_host, MYF(MY_ALLOW_ZERO_PTR));
if (hash_inited(&ignore_table))
hash_free(&ignore_table);
if (extended_insert)
......@@ -4222,7 +4223,7 @@ static char *get_actual_table_name(const char *old_table_name, MEM_ROOT *root)
}
mysql_free_result(table_res);
}
DBUG_PRINT("exit", ("new_table_name: %s", name));
DBUG_PRINT("exit", ("new_table_name: %s", val_or_null(name)));
DBUG_RETURN(name);
}
......@@ -4818,6 +4819,7 @@ static my_bool get_view_structure(char *table, char* db)
field= mysql_fetch_field_direct(table_res, 0);
if (strcmp(field->name, "View") != 0)
{
mysql_free_result(table_res);
switch_character_set_results(mysql, default_charset);
verbose_msg("-- It's base table, skipped\n");
DBUG_RETURN(0);
......@@ -4827,8 +4829,10 @@ static my_bool get_view_structure(char *table, char* db)
if (path)
{
if (!(sql_file= open_sql_file_for_table(table, O_WRONLY)))
{
mysql_free_result(table_res);
DBUG_RETURN(1);
}
write_header(sql_file, db);
}
......
......@@ -542,7 +542,7 @@ public:
{
DBUG_ENTER("LogFile::open");
DBUG_PRINT("enter", ("dir: '%s', name: '%s'",
dir, name));
val_or_null(dir), val_or_null(name)));
if (!name)
{
m_file= stdout;
......
......@@ -53,3 +53,5 @@ TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
INSTALL(TARGETS comp_err my_print_defaults perror resolveip replace DESTINATION bin COMPONENT runtime)
......@@ -90,6 +90,9 @@
#define IF_WIN(A,B) (B)
#endif
/* Make it easier to print null strings */
#define val_or_null(A) ((A) ? (const char*) (A) : "(null)")
#ifndef EMBEDDED_LIBRARY
#ifdef WITH_NDB_BINLOG
#define HAVE_NDB_BINLOG 1
......
......@@ -130,3 +130,11 @@ ADD_DEFINITIONS(-DHAVE_DLOPEN)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
# TODO: Install mysqlclient_notls?
# TODO: Which component should these be part of, development?
INSTALL(TARGETS mysqlclient DESTINATION lib/opt COMPONENT runtime)
INSTALL(TARGETS libmysql DESTINATION lib/opt COMPONENT runtime)
# Also install libmysql.dll to the bin dir
INSTALL(TARGETS libmysql DESTINATION bin COMPONENT runtime)
......@@ -167,3 +167,7 @@ ENDFOREACH(ENGINE_LIB)
ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def)
ADD_DEPENDENCIES(libmysqld mysqlserver)
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
INSTALL(TARGETS mysqlserver DESTINATION Embedded/static COMPONENT embedded)
INSTALL(TARGETS libmysqld DESTINATION Embedded/DLL COMPONENT embedded)
drop table if exists t1, t2;
CALL mtr.add_suppression("Found wrong usage of mutex 'LOCK_sync' and 'LOCK_active'");
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=pbxt;
BEGIN;
......
......@@ -4,11 +4,6 @@
drop table if exists t1, t2;
--enable_warnings
# This warning is indication of a real bug, MBug#578117.
# But it is not a regression, so we suppress it to get a clean test run.
# This suppression must be removed as part of MBug#578117 fix.
CALL mtr.add_suppression("Found wrong usage of mutex 'LOCK_sync' and 'LOCK_active'");
#
# bug lp:544173, xa crash with two 2pc-capable storage engines without binlog
#
......
......@@ -49,4 +49,6 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(mysys ${MYSYS_SOURCES})
INSTALL(TARGETS mysys DESTINATION lib/opt COMPONENT runtime) # TODO: Component?
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -22,4 +22,6 @@ SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(regex ${REGEX_SOURCES})
INSTALL(TARGETS regex DESTINATION lib/opt COMPONENT runtime) # TODO: Component
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -75,3 +75,12 @@ CONFIGURE_FILE(mysqldumpslow.sh
CONFIGURE_FILE(mysqlhotcopy.sh
${CMAKE_BINARY_DIR}/scripts/mysqlhotcopy.pl ESCAPE_QUOTES @ONLY)
INSTALL(FILES mysqldumpslow.pl mysqlhotcopy.pl mysql_config.pl
mysql_convert_table_format.pl mysql_install_db.pl
mysql_secure_installation.pl mysqld_multi.pl
DESTINATION scripts COMPONENT scripts)
INSTALL(FILES fill_help_tables.sql mysql_fix_privilege_tables.sql mysql_system_tables.sql
mysql_system_tables_data.sql mysql_system_tables_fix.sql mysql_test_data_timezone.sql
DESTINATION share COMPONENT scripts)
......@@ -36,3 +36,5 @@ TARGET_LINK_LIBRARIES(mysqlmanager debug dbug mysys strings taocrypt vio yassl z
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker")
ENDIF(EMBED_MANIFESTS)
INSTALL(TARGETS mysqlmanager DESTINATION bin COMPONENT runtime)
......@@ -154,3 +154,8 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def)
ADD_DEPENDENCIES(udf_example strings GenError)
TARGET_LINK_LIBRARIES(udf_example strings wsock32)
INSTALL(TARGETS mysqld
RUNTIME DESTINATION bin COMPONENT runtime
LIBRARY DESTINATION lib COMPONENT runtime
ARCHIVE DESTINATION lib COMPONENT runtime)
......@@ -4040,7 +4040,8 @@ ha_find_files(THD *thd,const char *db,const char *path,
int error= 0;
DBUG_ENTER("ha_find_files");
DBUG_PRINT("enter", ("db: '%s' path: '%s' wild: '%s' dir: %d",
db, path, wild ? wild : "NULL", dir));
val_or_null(db), val_or_null(path),
val_or_null(wild), dir));
st_find_files_args args= {db, path, wild, dir, files};
plugin_foreach(thd, find_files_handlerton,
......
This diff is collapsed.
......@@ -1539,12 +1539,9 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
Security_context *sctx= thd->security_ctx;
ulong db_access= sctx->db_access;
CHARSET_INFO *db_default_cl;
DBUG_ENTER("mysql_change_db");
DBUG_PRINT("enter",("name: '%s'", new_db_name->str));
if (new_db_name == NULL ||
new_db_name->length == 0)
if (new_db_name->length == 0)
{
if (force_switch)
{
......@@ -1553,8 +1550,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
after loading stored program. The thing is that loading of stored
program can happen when there is no current database.
TODO: actually, new_db_name and new_db_name->str seem to be always
non-NULL. In case of stored program, new_db_name->str == "" and
In case of stored program, new_db_name->str == "" and
new_db_name->length == 0.
*/
......@@ -1569,6 +1565,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
DBUG_RETURN(TRUE);
}
}
DBUG_PRINT("enter",("name: '%s'", new_db_name->str));
if (is_schema_db(new_db_name->str, new_db_name->length))
{
......
......@@ -3980,9 +3980,9 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond)
if (get_lookup_field_values(thd, cond, tables, &lookup_field_vals))
DBUG_RETURN(0);
DBUG_PRINT("INDEX VALUES",("db_name='%s', table_name='%s'",
lookup_field_vals.db_value.str,
lookup_field_vals.table_value.str));
DBUG_PRINT("INDEX VALUES",("db_name: %s table_name: %s",
val_or_null(lookup_field_vals.db_value.str),
val_or_null(lookup_field_vals.table_value.str)));
if (make_db_list(thd, &db_names, &lookup_field_vals,
&with_i_schema))
DBUG_RETURN(1);
......
......@@ -489,6 +489,13 @@ int ha_tina::encode_quote(uchar *buf)
ptr= attribute.ptr();
end_ptr= attribute.length() + ptr;
/*
Ensure that buffer is big enough. This will also speed things up
as we don't have to do any new allocation in the loop below
*/
if (buffer.realloc(buffer.length() + attribute.length()*2+2))
return 0; // Failure
buffer.append('"');
while (ptr < end_ptr)
......
......@@ -91,4 +91,7 @@ IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("maria_pack" "asInvoker")
ENDIF(EMBED_MANIFESTS)
INSTALL(TARGETS maria_ftdump maria_chk maria_read_log maria_pack maria_dump_log
DESTINATION bin COMPONENT runtime)
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -70,4 +70,6 @@ IF(NOT SOURCE_SUBLIBS)
MYSQL_EMBED_MANIFEST("myisampack" "asInvoker")
ENDIF(EMBED_MANIFESTS)
INSTALL(TARGETS myisam_ftdump myisamchk myisamlog myisampack DESTINATION bin COMPONENT runtime)
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -38,6 +38,8 @@ IF(NOT SOURCE_SUBLIBS)
IF(${engine}_LIBS)
TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
ENDIF(${engine}_LIBS)
# Install the plugin
INSTALL(TARGETS ${dyn_libname} DESTINATION lib/plugin COMPONENT runtime)
MESSAGE("build ${engine} as DLL")
ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
ENDIF(NOT SOURCE_SUBLIBS)
......
......@@ -10404,7 +10404,7 @@ static MYSQL_SYSVAR_BOOL(recovery_stats, innobase_recovery_stats,
"Output statistics of recovery process after it.",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_ULONG(use_purge_thread, srv_use_purge_thread,
static MYSQL_SYSVAR_ULINT(use_purge_thread, srv_use_purge_thread,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of purge devoted threads. #### over 1 is EXPERIMENTAL ####",
NULL, NULL, 1, 0, 64, 0);
......@@ -10559,7 +10559,7 @@ static MYSQL_SYSVAR_ULONG(stats_auto_update, srv_stats_auto_update,
"(except for ANALYZE TABLE command) 0:disable 1:enable",
NULL, NULL, 1, 0, 1, 0);
static MYSQL_SYSVAR_ULONG(stats_update_need_lock, srv_stats_update_need_lock,
static MYSQL_SYSVAR_ULINT(stats_update_need_lock, srv_stats_update_need_lock,
PLUGIN_VAR_RQCMDARG,
"Enable/Disable InnoDB's update statistics which needs to lock dictionary. "
"e.g. Data_free.",
......@@ -10739,7 +10739,7 @@ static MYSQL_SYSVAR_ULONG(ibuf_accel_rate, srv_ibuf_accel_rate,
"Tunes amount of insert buffer processing of background, in addition to innodb_io_capacity. (in percentage)",
NULL, NULL, 100, 100, 999999999, 0);
static MYSQL_SYSVAR_ULONG(checkpoint_age_target, srv_checkpoint_age_target,
static MYSQL_SYSVAR_ULINT(checkpoint_age_target, srv_checkpoint_age_target,
PLUGIN_VAR_RQCMDARG,
"Control soft limit of checkpoint age. (0 : not control)",
NULL, NULL, 0, 0, ~0UL, 0);
......@@ -10833,12 +10833,12 @@ static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit,
"Limit the allocated memory for dictionary cache. (0: unlimited)",
NULL, NULL, 0, 0, LONG_MAX, 0);
static MYSQL_SYSVAR_ULONG(relax_table_creation, srv_relax_table_creation,
static MYSQL_SYSVAR_ULINT(relax_table_creation, srv_relax_table_creation,
PLUGIN_VAR_RQCMDARG,
"Relax limitation of column size at table creation as builtin InnoDB.",
NULL, NULL, 0, 0, 1, 0);
static MYSQL_SYSVAR_ULONG(pass_corrupt_table, srv_pass_corrupt_table,
static MYSQL_SYSVAR_ULINT(pass_corrupt_table, srv_pass_corrupt_table,
PLUGIN_VAR_RQCMDARG,
"Pass corruptions of user tables as 'corrupt table' instead of not crashing itself, "
"when used with file_per_table. "
......
......@@ -326,10 +326,12 @@ macro ULINTPF. */
typedef unsigned __int64 ulint;
#define ULINTPF "%I64u"
typedef __int64 lint;
#define MYSQL_SYSVAR_ULINT MYSQL_SYSVAR_ULONGLONG
#else
typedef unsigned long int ulint;
#define ULINTPF "%lu"
typedef long int lint;
#define MYSQL_SYSVAR_ULINT MYSQL_SYSVAR_ULONG
#endif
#ifdef __WIN__
......
......@@ -30,4 +30,6 @@ SET(STRINGS_SOURCES bchange.c bcmp.c bfill.c bmove512.c bmove_upp.c ctype-big5.c
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(strings ${STRINGS_SOURCES})
INSTALL(TARGETS strings DESTINATION lib/opt COMPONENT runtime) # TODO: Component
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -25,3 +25,5 @@ TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient_notls wsock32)
ADD_EXECUTABLE(bug25714 bug25714.c)
TARGET_LINK_LIBRARIES(bug25714 mysqlclient_notls wsock32)
INSTALL(TARGETS mysql_client_test bug25714 DESTINATION bin COMPONENT runtime)
This diff is collapsed.
......@@ -7,6 +7,55 @@
set -e
usage()
{
cat <<EOF
Usage: $0 [-h] [-64] [-nobuild]
-h, --help Show this help message.
-64 Build a 64 bit distribution.
-nobuild Don't run cmake and devenv, only do the packaging.
The default is to the builds and create 32 bit packages.
EOF
}
# The default settings
CMAKE_GENERATOR="Visual Studio 9 2008"
ARCH="win32"
RUNBUILD="yes"
parse_options()
{
while test $# -gt 0
do
case "$1" in
-64)
CMAKE_GENERATOR="Visual Studio 9 2008 Win64"
ARCH="win64"
;;
-nobuild)
RUNBUILD="no"
;;
-h | --help)
usage
exit 0;;
*)
echo "Unknown option '$1'"
usage
exit 1;;
esac
shift
done
}
########################################################################
if test ! -f sql/mysqld.cc
then
echo "You must run this script from the MySQL top-level directory"
exit 1
fi
if [ ! -d win/data ] ; then
echo This doesnt seem to be source tarball.
echo This script should be run from the top directory of the source tarball
......@@ -14,12 +63,14 @@ if [ ! -d win/data ] ; then
exit 1;
fi
parse_options "$@"
set -x
if [ "x_$1" != "x_-nobuild" ]; then
if [ "$RUNBUILD" == "yes" ]; then
sh win/configure-mariadb.sh
cmake -G "Visual Studio 9 2008"
cmake -G "$CMAKE_GENERATOR"
devenv.com MySQL.sln /build RelWithDebInfo
devenv.com MySQL.sln /build Debug
......@@ -35,12 +86,12 @@ VER_NO_MARIA=${VER/-MariaDB/}
# We want the final zip to be named like this:
# mariadb-noinstall-5.1.38-win32.zip
ZIPNAME=mariadb-noinstall-$VER_NO_MARIA-win32
ZIPNAME=mariadb-noinstall-$VER_NO_MARIA-$ARCH
ZIPFILE=$ZIPNAME.zip
# The top directory inside the zip should be called like this:
# mariadb-5.1-38-win32
ZIPCONTENT=mariadb-$VER_NO_MARIA-win32
# mariadb-5.1-38-$ARCH
ZIPCONTENT=mariadb-$VER_NO_MARIA-$ARCH
# This will make $ZIPCONTENT.zip
sh -x scripts/make_win_bin_dist $ZIPCONTENT
......
......@@ -27,4 +27,6 @@ SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.
zutil.c zutil.h)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(zlib ${ZLIB_SOURCES})
INSTALL(TARGETS zlib DESTINATION lib/opt COMPONENT runtime) # TODO: Component
ENDIF(NOT SOURCE_SUBLIBS)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment