mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added missing include file to sql_acl.cc (bug in last changeset)
Docs/manual.texi: Updated Table is full section. client/mysql.cc: Applied patch for fixing tee() sql/sql_acl.cc: Added include file
This commit is contained in:
@ -46661,12 +46661,16 @@ than you have alloacated for @code{mysqld}. @xref{Packet too large}.
|
||||
|
||||
@cindex table is full
|
||||
|
||||
This error occurs in older MySQL versions when an in-memory temporary
|
||||
table becomes larger than @code{tmp_table_size} bytes. To avoid this
|
||||
problem, you can use the @code{-O tmp_table_size=#} option to
|
||||
@code{mysqld} to increase the temporary table size or use the SQL
|
||||
option @code{SQL_BIG_TABLES} before you issue the problematic
|
||||
query. @xref{SET OPTION, , @code{SET OPTION}}.
|
||||
There is a couple of different cases when you can get this error:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
You are using an older MySQL versions ( < 3.23.0) when an in-memory
|
||||
temporary table becomes larger than @code{tmp_table_size} bytes. To
|
||||
avoid this problem, you can use the @code{-O tmp_table_size=#} option to
|
||||
@code{mysqld} to increase the temporary table size or use the SQL option
|
||||
@code{SQL_BIG_TABLES} before you issue the problematic query. @xref{SET
|
||||
OPTION, , @code{SET OPTION}}.
|
||||
|
||||
You can also start @code{mysqld} with the @code{--big-tables} option.
|
||||
This is exactly the same as using @code{SQL_BIG_TABLES} for all queries.
|
||||
@ -46674,6 +46678,30 @@ This is exactly the same as using @code{SQL_BIG_TABLES} for all queries.
|
||||
In MySQL Version 3.23, in-memory temporary tables will automatically be
|
||||
converted to a disk-based @code{MyISAM} table after the table size gets
|
||||
bigger than @code{tmp_table_size}.
|
||||
@item
|
||||
You are using InnoDB tables and run out of room in the InnoDB tablespace.
|
||||
In this case the solution is to add extend the InnoDB table space.
|
||||
@item
|
||||
You are using ISAM/MyISAM tables on a OS that only supports 2G files
|
||||
and you have hit this limit for the data or index file.
|
||||
@item
|
||||
You are using MyISAM tables and the needed data or index size is bigger
|
||||
than what MySQL has allocated pointers for. (If you don't specify
|
||||
@code{MAX_ROWS} to @code{CREATE TABLE} MySQL will only allocate pointers
|
||||
to hold 4G of data).
|
||||
|
||||
One can check the maximum data/index sizes by doing @code{SHOW TABLE
|
||||
STATUS FROM database LIKE 'table_name} or using @code{myisamchk -dv
|
||||
database/table_name}.
|
||||
|
||||
If this is the problem, you can fix it by doing something like:
|
||||
|
||||
@code{ALTER TABLE table_name MAX_ROWS=1000000000 AVG_ROW_LENGTH=XXX}.
|
||||
|
||||
You only have to specify @code{AVG_ROW_LENGTH} for tables with BLOB/TEXT
|
||||
fields as in this case MySQL can't optimise the needed space just based
|
||||
on the number of rows.
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Cannot create, Commands out of sync, Full table, Common errors
|
||||
@ -51432,7 +51460,7 @@ now can be specified in octal by beginning the value with a zero.
|
||||
Added @code{RIGHT JOIN}. This makes @code{RIGHT} a reserved word.
|
||||
@item
|
||||
Added @code{@@@@IDENTITY} as a synonym for @code{LAST_INSERT_ID()}.
|
||||
(This is for Visual Basic compatibility.)
|
||||
(This is for MSSQL compatibility.)
|
||||
@item
|
||||
Fixed a bug in @code{myisamchk} and @code{REPAIR} when using @code{FULLTEXT}
|
||||
index.
|
||||
|
@ -186,7 +186,7 @@ static void safe_put_field(const char *pos,ulong length);
|
||||
static void xmlencode_print(const char *src, uint length);
|
||||
static void init_pager();
|
||||
static void end_pager();
|
||||
static void init_tee();
|
||||
static int init_tee(char *);
|
||||
static void end_tee();
|
||||
static const char* construct_prompt();
|
||||
static void init_username();
|
||||
@ -619,11 +619,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
end_tee();
|
||||
}
|
||||
else
|
||||
if (!opt_outfile)
|
||||
{
|
||||
strmov(outfile, argument);
|
||||
init_tee();
|
||||
}
|
||||
opt_outfile= init_tee(argument);
|
||||
break;
|
||||
case OPT_NOTEE:
|
||||
printf("WARNING: option deprecated; use --disable-tee instead.\n");
|
||||
@ -1517,19 +1513,21 @@ static void end_pager()
|
||||
#endif
|
||||
}
|
||||
|
||||
static void init_tee()
|
||||
|
||||
static int init_tee(char* newfile)
|
||||
{
|
||||
FILE* new_outfile;
|
||||
if (!(new_outfile= my_fopen(newfile, O_APPEND | O_WRONLY, MYF(MY_WME))))
|
||||
return 0;
|
||||
if (opt_outfile)
|
||||
end_tee(); // This resets opt_outfile
|
||||
if (!(OUTFILE= my_fopen(outfile, O_APPEND | O_WRONLY, MYF(MY_WME))))
|
||||
{
|
||||
init_pager();
|
||||
return;
|
||||
}
|
||||
opt_outfile= 1;
|
||||
end_tee();
|
||||
OUTFILE = new_outfile;
|
||||
strmake(outfile,newfile,FN_REFLEN-1);
|
||||
tee_fprintf(stdout, "Logging to file '%s'\n", outfile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static void end_tee()
|
||||
{
|
||||
my_fclose(OUTFILE, MYF(0));
|
||||
@ -1841,29 +1839,39 @@ com_tee(String *buffer, char *line __attribute__((unused)))
|
||||
if (!strlen(outfile))
|
||||
{
|
||||
printf("No previous outfile available, you must give a filename!\n");
|
||||
opt_outfile= 0;
|
||||
return 0;
|
||||
}
|
||||
else if (opt_outfile)
|
||||
{
|
||||
tee_fprintf(stdout, "Currently logging to file '%s'\n", outfile);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
param = outfile; //resume using the old outfile
|
||||
}
|
||||
else
|
||||
{
|
||||
while (isspace(*param))
|
||||
param++;
|
||||
end= strmake(file_name, param, sizeof(file_name) - 1);
|
||||
while (end > file_name && (isspace(end[-1]) || iscntrl(end[-1])))
|
||||
end--;
|
||||
end[0]= 0;
|
||||
strmov(outfile, file_name);
|
||||
}
|
||||
|
||||
/* eliminate the spaces before the parameters */
|
||||
while (isspace(*param))
|
||||
param++;
|
||||
end= strmake(file_name, param, sizeof(file_name) - 1);
|
||||
/* remove end space from command line */
|
||||
while (end > file_name && (isspace(end[-1]) || iscntrl(end[-1])))
|
||||
end--;
|
||||
end[0]= 0;
|
||||
if (!strlen(outfile))
|
||||
{
|
||||
printf("No outfile specified!\n");
|
||||
return 0;
|
||||
}
|
||||
init_tee();
|
||||
opt_outfile= init_tee(file_name);
|
||||
if (opt_outfile)
|
||||
tee_fprintf(stdout, "Logging to file '%s'\n", outfile);
|
||||
else
|
||||
tee_fprintf(stdout, "Error logging to file '%s'\n",file_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
com_notee(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)))
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "sql_acl.h"
|
||||
#include "hash_filo.h"
|
||||
#include <m_ctype.h>
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
struct acl_host_and_ip
|
||||
|
Reference in New Issue
Block a user