Commit 1bdd1d06 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Merge with 3.23.55

parents fa7a94ed 5758da14
......@@ -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
......
......@@ -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));
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
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