diff options
author | jimw@mysql.com <> | 2005-01-06 17:27:48 +0100 |
---|---|---|
committer | jimw@mysql.com <> | 2005-01-06 17:27:48 +0100 |
commit | d4b236fe8f7d3f3c57d3981806c9a67d3bb649b1 (patch) | |
tree | d6b903ab357703e3376609ff3ab445732cc882aa | |
parent | 4d025523e57572901547479942998ad10d11ee87 (diff) | |
parent | e3abb95228e5bcd2619126aeb40006a1505436e5 (diff) | |
download | mariadb-git-d4b236fe8f7d3f3c57d3981806c9a67d3bb649b1.tar.gz |
Merge mysql.com:/home/jwinstead2/mysql-4.1-7451
into mysql.com:/home/jwinstead2/mysql-4.1-clean
-rwxr-xr-x | BUILD/compile-dist | 1 | ||||
-rw-r--r-- | client/mysqladmin.cc | 8 | ||||
-rw-r--r-- | include/my_pthread.h | 2 | ||||
-rw-r--r-- | innobase/os/os0file.c | 16 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 4 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 |
6 files changed, 26 insertions, 6 deletions
diff --git a/BUILD/compile-dist b/BUILD/compile-dist index f27c218747c..7c177f54258 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -43,5 +43,6 @@ fi --with-berkeley-db \ --with-innodb \ --enable-thread-safe-client \ + --with-extra-charsets=complex \ --with-ndbcluster make diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 6916b4ea808..24cd461b1fa 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -33,7 +33,8 @@ #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define MAX_TRUNC_LENGTH 3 -char *host= NULL, *user= 0, *opt_password= 0; +char *host= NULL, *user= 0, *opt_password= 0, + *default_charset= NULL; char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH]; char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN]; ulonglong last_values[MAX_MYSQL_VAR]; @@ -145,6 +146,9 @@ static struct my_option my_long_options[] = {"character-sets-dir", OPT_CHARSETS_DIR, "Directory where character sets are.", (gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"default-character-set", OPT_DEFAULT_CHARSET, + "Set the default character set.", (gptr*) &default_charset, + (gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, @@ -343,6 +347,8 @@ int main(int argc,char *argv[]) if (shared_memory_base_name) mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif + if (default_charset) + mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); if (sql_connect(&mysql, option_wait)) { unsigned int err= mysql_errno(&mysql); diff --git a/include/my_pthread.h b/include/my_pthread.h index 40154f5b8d8..c4138a47b3c 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -639,7 +639,7 @@ extern int pthread_dummy(int); */ #define DEFAULT_THREAD_STACK (192*1024L) #else -#define DEFAULT_THREAD_STACK (192*1024L) +#define DEFAULT_THREAD_STACK (192*1024) #endif #endif diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index aa45030d93b..f02b81b8fd8 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -1763,7 +1763,21 @@ os_file_flush( #else int ret; -#ifdef HAVE_FDATASYNC +#ifdef HAVE_DARWIN_THREADS + /* Apple has disabled fsync() for internal disk drives in OS X. That + caused corruption for a user when he tested a power outage. Let us in + OS X use a nonstandard flush method recommended by an Apple + engineer. */ + + ret = fcntl(file, F_FULLFSYNC, NULL); + + if (ret) { + /* If we are not on a file system that supports this, then + fall back to a plain fsync. */ + + ret = fsync(file); + } +#elif HAVE_FDATASYNC ret = fdatasync(file); #else /* fprintf(stderr, "Flushing to file %p\n", file); */ diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 270c08679eb..f6b0169d230 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -86,7 +86,7 @@ parse_arguments() { MY_PWD=`pwd` # Check if we are starting this relative (for the binary release) -if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \ +if test -f ./share/mysql/english/errmsg.sys -a \ -x ./bin/mysqld then MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are @@ -97,7 +97,7 @@ then defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf" fi # Check if this is a 'moved install directory' -elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \ +elif test -f ./share/mysql/english/errmsg.sys -a \ -x ./libexec/mysqld then MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 55d26a68116..cd8e73c446d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2429,7 +2429,6 @@ mysql_execute_command(THD *thd) create_table_local); break; -create_error: res= 1; //error reported unsent_create_error: // put tables back for PS rexecuting |