summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--client/mysqladmin.c8
-rw-r--r--innobase/os/os0file.c23
-rw-r--r--libmysql/libmysql.c6
-rw-r--r--scripts/make_binary_distribution.sh2
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_parse.cc2
7 files changed, 34 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index 7949e7be776..d3d50e9638f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,7 +24,7 @@ EXTRA_DIST = INSTALL-SOURCE README \
SUBDIRS = . include @docs_dirs@ @readline_dir@ \
@thread_dirs@ pstack @sql_client_dirs@ \
@sql_server_dirs@ scripts man tests \
- BUILD os2 libmysql_r @libmysqld_dirs@ \
+ BUILD os2 @libmysqld_dirs@ \
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
# Relink after clean
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 5446718dea6..95bc17e880b 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -24,8 +24,8 @@
#endif
#include <sys/stat.h>
-#define ADMIN_VERSION "8.39"
-#define MAX_MYSQL_VAR 128
+#define ADMIN_VERSION "8.40"
+#define MAX_MYSQL_VAR 256
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
@@ -976,7 +976,7 @@ static void print_relative_row(MYSQL_RES *result, MYSQL_ROW cur, uint row)
printf("| %-*s|", (int) field->max_length + 1, cur[0]);
field = mysql_fetch_field(result);
- tmp = cur[1] ? strtoull(cur[1], NULL, 0) : (ulonglong) 0;
+ tmp = cur[1] ? strtoull(cur[1], NULL, 10) : (ulonglong) 0;
printf(" %-*s|\n", (int) field->max_length + 1,
llstr((tmp - last_values[row]), buff));
last_values[row] = tmp;
@@ -994,7 +994,7 @@ static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)),
if (!row)
putchar('|');
- tmp = cur[1] ? strtoull(cur[1], NULL, 0) : (ulonglong) 0;
+ tmp = cur[1] ? strtoull(cur[1], NULL, 10) : (ulonglong) 0;
printf(" %-*s|", ex_val_max_len[row] + 1,
llstr((tmp - last_values[row]), buff));
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index fa5482a8cd1..293ced92c42 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -8,6 +8,7 @@ Created 10/21/1995 Heikki Tuuri
#include "os0file.h"
#include "os0sync.h"
+#include "os0thread.h"
#include "ut0mem.h"
#include "srv0srv.h"
#include "fil0fil.h"
@@ -1093,6 +1094,7 @@ os_file_write(
DWORD low;
DWORD high;
ulint i;
+ ulint n_retries = 0;
ut_a((offset & 0xFFFFFFFF) == offset);
@@ -1101,7 +1103,7 @@ os_file_write(
ut_ad(file);
ut_ad(buf);
ut_ad(n > 0);
-
+retry:
low = offset;
high = offset_high;
@@ -1145,6 +1147,19 @@ os_file_write(
return(TRUE);
}
+ /* If some background file system backup tool is running, then, at
+ least in Windows 2000, we may get here a specific error. Let us
+ retry the operation 100 times, with 1 second waits. */
+
+ if (GetLastError() == ERROR_LOCK_VIOLATION && n_retries < 100) {
+
+ os_thread_sleep(1000000);
+
+ n_retries++;
+
+ goto retry;
+ }
+
if (!os_has_said_disk_full) {
ut_print_timestamp(stderr);
@@ -1157,7 +1172,7 @@ os_file_write(
"InnoDB: what the error number means.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
- name, offset_high, offset, n, len,
+ name, offset_high, offset, n, (ulint)len,
(ulint)GetLastError());
os_has_said_disk_full = TRUE;
@@ -1180,13 +1195,13 @@ os_file_write(
fprintf(stderr,
" InnoDB: Error: Write to file %s failed at offset %lu %lu.\n"
-"InnoDB: %lu bytes should have been written, only %lu were written.\n"
+"InnoDB: %lu bytes should have been written, only %ld were written.\n"
"InnoDB: Operating system error number %lu.\n"
"InnoDB: Look from section 13.2 at http://www.innodb.com/ibman.html\n"
"InnoDB: what the error number means or use the perror program of MySQL.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
- name, offset_high, offset, n, (ulint)ret,
+ name, offset_high, offset, n, (long int)ret,
(ulint)errno);
os_has_said_disk_full = TRUE;
}
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 152177c0fbe..130e6b1556a 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -485,6 +485,12 @@ simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
length ? length : (ulong) strlen(arg)))
{
DBUG_PRINT("error",("Can't send command to server. Error: %d",socket_errno));
+ if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
+ {
+ net->last_errno=CR_NET_PACKET_TOO_LARGE;
+ strmov(net->last_error,ER(net->last_errno));
+ goto end;
+ }
end_server(mysql);
if (mysql_reconnect(mysql))
goto end;
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index c2b1a0cb2b3..b7fa94d493c 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -196,7 +196,7 @@ which_1 ()
# Create the result tar file
#
-tar=`which_1 gtar`
+tar=`which_1 gnutar gtar`
if test "$?" = "1" -o "$tar" = ""
then
tar=tar
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 46fbee0a7ea..ee3eb13d833 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3836,8 +3836,8 @@ struct show_var_st status_vars[]= {
{"Not_flushed_key_blocks", (char*) &_my_blocks_changed, SHOW_LONG_CONST},
{"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use, SHOW_LONG_CONST},
{"Open_tables", (char*) 0, SHOW_OPENTABLES},
- {"Open_files", (char*) &my_file_opened, SHOW_INT_CONST},
- {"Open_streams", (char*) &my_stream_opened, SHOW_INT_CONST},
+ {"Open_files", (char*) &my_file_opened, SHOW_LONG_CONST},
+ {"Open_streams", (char*) &my_stream_opened, SHOW_LONG_CONST},
{"Opened_tables", (char*) &opened_tables, SHOW_LONG},
{"Questions", (char*) 0, SHOW_QUESTION},
#ifdef HAVE_QUERY_CACHE
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 4a7fc78ee7f..0a5ebc585b2 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -977,6 +977,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
char *save_user= thd->user;
char *save_priv_user= thd->priv_user;
char *save_db= thd->db;
+ thd->user=0;
USER_CONN *save_uc= thd->user_connect;
if ((uint) ((uchar*) db - net->read_pos) > packet_length)
@@ -987,7 +988,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (check_user(thd, COM_CHANGE_USER, user, passwd, db, 0))
{ // Restore old user
x_free(thd->user);
- x_free(thd->db);
thd->master_access=save_master_access;
thd->db_access=save_db_access;
thd->db=save_db;