Commit 299d0a87 authored by unknown's avatar unknown

Merge mysql.com:/home/jwinstead2/mysql-4.1-7451

into mysql.com:/home/jwinstead2/mysql-4.1-clean


client/mysqladmin.cc:
  Auto merged
parents 190f7a6f 9a8c1ee3
...@@ -43,5 +43,6 @@ fi ...@@ -43,5 +43,6 @@ fi
--with-berkeley-db \ --with-berkeley-db \
--with-innodb \ --with-innodb \
--enable-thread-safe-client \ --enable-thread-safe-client \
--with-extra-charsets=complex \
--with-ndbcluster --with-ndbcluster
make make
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3 #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 truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN]; char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
ulonglong last_values[MAX_MYSQL_VAR]; ulonglong last_values[MAX_MYSQL_VAR];
...@@ -145,6 +146,9 @@ static struct my_option my_long_options[] = ...@@ -145,6 +146,9 @@ static struct my_option my_long_options[] =
{"character-sets-dir", OPT_CHARSETS_DIR, {"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir, "Directory where character sets are.", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (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, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR, {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
...@@ -343,6 +347,8 @@ int main(int argc,char *argv[]) ...@@ -343,6 +347,8 @@ int main(int argc,char *argv[])
if (shared_memory_base_name) if (shared_memory_base_name)
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif #endif
if (default_charset)
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
if (sql_connect(&mysql, option_wait)) if (sql_connect(&mysql, option_wait))
{ {
unsigned int err= mysql_errno(&mysql); unsigned int err= mysql_errno(&mysql);
......
...@@ -639,7 +639,7 @@ extern int pthread_dummy(int); ...@@ -639,7 +639,7 @@ extern int pthread_dummy(int);
*/ */
#define DEFAULT_THREAD_STACK (192*1024L) #define DEFAULT_THREAD_STACK (192*1024L)
#else #else
#define DEFAULT_THREAD_STACK (192*1024L) #define DEFAULT_THREAD_STACK (192*1024)
#endif #endif
#endif #endif
......
...@@ -1763,7 +1763,21 @@ os_file_flush( ...@@ -1763,7 +1763,21 @@ os_file_flush(
#else #else
int ret; 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); ret = fdatasync(file);
#else #else
/* fprintf(stderr, "Flushing to file %p\n", file); */ /* fprintf(stderr, "Flushing to file %p\n", file); */
......
...@@ -86,7 +86,7 @@ parse_arguments() { ...@@ -86,7 +86,7 @@ parse_arguments() {
MY_PWD=`pwd` MY_PWD=`pwd`
# Check if we are starting this relative (for the binary release) # 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 -x ./bin/mysqld
then then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
...@@ -97,7 +97,7 @@ then ...@@ -97,7 +97,7 @@ then
defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf" defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf"
fi fi
# Check if this is a 'moved install directory' # 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 -x ./libexec/mysqld
then then
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
......
...@@ -2429,7 +2429,6 @@ mysql_execute_command(THD *thd) ...@@ -2429,7 +2429,6 @@ mysql_execute_command(THD *thd)
create_table_local); create_table_local);
break; break;
create_error:
res= 1; //error reported res= 1; //error reported
unsent_create_error: unsent_create_error:
// put tables back for PS rexecuting // put tables back for PS rexecuting
......
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