Commit f5fefc94 authored by unknown's avatar unknown

Updates for innobase

Removed a ' that casued 'make paper' to fail


Docs/manual.texi:
  Updated myisamchk section;  Removed a ' that casued 'make paper' to fail
sql/handler.cc:
  Updates for innobase
sql/mysqld.cc:
  Updates for innobase
sql/sql_parse.cc:
  Fixed possible overrun if the mysqld server name is too big
sql/sql_select.cc:
  Updates for innobase
parent dcd26ca7
...@@ -30719,6 +30719,10 @@ of real fatal errors) as @code{myisamchk}. On the other hand, ...@@ -30719,6 +30719,10 @@ of real fatal errors) as @code{myisamchk}. On the other hand,
flushing tables. flushing tables.
@xref{OPTIMIZE TABLE, , @code{OPTIMIZE TABLE}}. @xref{OPTIMIZE TABLE, , @code{OPTIMIZE TABLE}}.
Even that the repair in @code{myisamchk} is quite secure, it's always a
good idea to make a backup BEFORE doing a repair (or anything that could
make a lot of changes to a table)
@menu @menu
* myisamchk syntax:: @code{myisamchk} invocation syntax * myisamchk syntax:: @code{myisamchk} invocation syntax
* myisamchk memory:: @code{myisamchk} memory usage * myisamchk memory:: @code{myisamchk} memory usage
...@@ -30739,7 +30743,7 @@ described below. (You can also get a list of options by invoking ...@@ -30739,7 +30743,7 @@ described below. (You can also get a list of options by invoking
table. To get more information or to tell @code{myisamchk} to take corrective table. To get more information or to tell @code{myisamchk} to take corrective
action, specify options as described below and in the following sections. action, specify options as described below and in the following sections.
@code{tbl_name} is the database table you want to check. If you run @code{tbl_name} is the database table you want to check/repair. If you run
@code{myisamchk} somewhere other than in the database directory, you must @code{myisamchk} somewhere other than in the database directory, you must
specify the path to the file, because @code{myisamchk} has no idea where your specify the path to the file, because @code{myisamchk} has no idea where your
database is located. Actually, @code{myisamchk} doesn't care whether or not database is located. Actually, @code{myisamchk} doesn't care whether or not
...@@ -30775,18 +30779,19 @@ shell> myisamchk /path/to/datadir/*/*.MYI ...@@ -30775,18 +30779,19 @@ shell> myisamchk /path/to/datadir/*/*.MYI
The recommended way to quickly check all tables is: The recommended way to quickly check all tables is:
@example @example
myisamchk --fast --silent /path/to/datadir/*/*.MYI myisamchk --silent --fast /path/to/datadir/*/*.MYI
isamchk --silent /path/to/datadir/*/*.ISM isamchk --silent /path/to/datadir/*/*.ISM
@end example @end example
@code{myisamchk} supports the following options. If you want to check all tables and repair all tables that are corrupted,
you can use the following line:
@menu @example
* myisamchk general options:: myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /path/to/datadir/*/*.MYI
* myisamchk check options:: isamchk --silent --force -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /path/to/datadir/*/*.ISM
* myisamchk repair options:: @end example
* myisamchk other options::
@end menu The above assumes that you have more than 64 M free.
Note that if you get an error like: Note that if you get an error like:
...@@ -30804,11 +30809,20 @@ tables while you are running @code{myisamchk}. In @strong{MySQL} Version 3.23 ...@@ -30804,11 +30809,20 @@ tables while you are running @code{myisamchk}. In @strong{MySQL} Version 3.23
the easiest way to avoid this problem is to use @code{CHECK TABLE} the easiest way to avoid this problem is to use @code{CHECK TABLE}
instead of @code{myisamchk} to check tables. instead of @code{myisamchk} to check tables.
@menu
* myisamchk general options::
* myisamchk check options::
* myisamchk repair options::
* myisamchk other options::
@end menu
@cindex options, @code{myisamchk} @cindex options, @code{myisamchk}
@cindex @code{myisamchk}, options @cindex @code{myisamchk}, options
@node myisamchk general options, myisamchk check options, myisamchk syntax, myisamchk syntax @node myisamchk general options, myisamchk check options, myisamchk syntax, myisamchk syntax
@subsubsection General Options for @code{myisamchk} @subsubsection General Options for @code{myisamchk}
@code{myisamchk} supports the following options.
@table @code @table @code
@item -# or --debug=debug_options @item -# or --debug=debug_options
Output debug log. The @code{debug_options} string often is Output debug log. The @code{debug_options} string often is
...@@ -33535,26 +33549,29 @@ Here are some reasons the @code{Can't connect to local MySQL server} ...@@ -33535,26 +33549,29 @@ Here are some reasons the @code{Can't connect to local MySQL server}
error might occur: error might occur:
@itemize @bullet @itemize @bullet
@item @code{mysqld} is not running. @item
@item You are running on a system that uses MIT-pthreads. @code{mysqld} is not running.
If you are running on a system that doesn't have native threads, @code{mysqld} @item
uses the MIT-pthreads package. You are running on a system that uses MIT-pthreads.
@xref{Which OS}. If you are running on a system that doesn't have native threads,
However, MIT-pthreads doesn't support Unix sockets, so on such a system you @code{mysqld} uses the MIT-pthreads package. @xref{Which OS}. However,
must always specify the hostname explicitly when connecting to the server. all MIT-pthreads versions doesn't support Unix sockets. On a system
Try using this command to check the connection to the server: without sockets support you must always specify the hostname explicitly
when connecting to the server. Try using this command to check the
connection to the server:
@example @example
shell> mysqladmin -h `hostname` version shell> mysqladmin -h `hostname` version
@end example @end example
@item Someone has removed the Unix socket that @code{mysqld} uses (default @item
@file{/tmp/mysqld.sock}). You might have a @code{cron} job that removes the Someone has removed the Unix socket that @code{mysqld} uses (default
@strong{MySQL} socket (for example, a job that removes old files from the @file{/tmp} @file{/tmp/mysqld.sock}). You might have a @code{cron} job that removes
directory). You can always run @code{mysqladmin version} and the @strong{MySQL} socket (for example, a job that removes old files
check that the socket @code{mysqladmin} is trying to use really exists. from the @file{/tmp} directory). You can always run @code{mysqladmin
The fix in this case is to change the @code{cron} job to not remove version} and check that the socket @code{mysqladmin} is trying to use
@file{mysqld.sock} or to place the socket somewhere else. You can specify really exists. The fix in this case is to change the @code{cron} job to
a different socket location at @strong{MySQL} configuration time with this not remove @file{mysqld.sock} or to place the socket somewhere else. You
command: can specify a different socket location at @strong{MySQL} configuration
time with this command:
@example @example
shell> ./configure --with-unix-socket-path=/path/to/socket shell> ./configure --with-unix-socket-path=/path/to/socket
@end example @end example
...@@ -33562,7 +33579,8 @@ You can also start @code{safe_mysqld} with the ...@@ -33562,7 +33579,8 @@ You can also start @code{safe_mysqld} with the
@code{--socket=/path/to/socket} option and set the environment variable @code{--socket=/path/to/socket} option and set the environment variable
@code{MYSQL_UNIX_PORT} to the socket pathname before starting your @code{MYSQL_UNIX_PORT} to the socket pathname before starting your
@strong{MySQL} clients. @strong{MySQL} clients.
@item You have started the @code{mysqld} server with @item
You have started the @code{mysqld} server with
the @code{--socket=/path/to/socket} option. If you change the socket the @code{--socket=/path/to/socket} option. If you change the socket
pathname for the server, you must also notify the @strong{MySQL} clients pathname for the server, you must also notify the @strong{MySQL} clients
about the new path. You can do this by setting the environment variable about the new path. You can do this by setting the environment variable
...@@ -33577,6 +33595,11 @@ You are using Linux and one thread has died (core dumped). In this case ...@@ -33577,6 +33595,11 @@ You are using Linux and one thread has died (core dumped). In this case
you must kill the other @code{mysqld} threads (for example, with the you must kill the other @code{mysqld} threads (for example, with the
@code{mysql_zap} script before you can start a new @strong{MySQL} @code{mysql_zap} script before you can start a new @strong{MySQL}
server. @xref{Crashing}. server. @xref{Crashing}.
@item
You may not have read and write privilege to either the directory that holds
the socket file or privilege to the socket file itself. In this case you
have to either change the privilege for the directory / file or restart
@code{mysqld} so that it uses a directory that you can access.
@end itemize @end itemize
If you get the error message @code{Can't connect to MySQL server on If you get the error message @code{Can't connect to MySQL server on
...@@ -33871,12 +33894,12 @@ You can check which tables you have in the current database with ...@@ -33871,12 +33894,12 @@ You can check which tables you have in the current database with
@cindex multibyte character sets @cindex multibyte character sets
@node Cannot initialize character set, , Cannot find table, Common errors @node Cannot initialize character set, , Cannot find table, Common errors
@subsection @code{Can't initialize character set 'xxx'} error. @subsection @code{Can@'t initialize character set xxx} error.
If you get an error like: If you get an error like:
@example @example
MySQL Connection Failed: Can't initialize character set xx MySQL Connection Failed: Can't initialize character set xxx
@end example @end example
This means one of the following things: This means one of the following things:
...@@ -178,7 +178,7 @@ void ha_close_connection(THD* thd) ...@@ -178,7 +178,7 @@ void ha_close_connection(THD* thd)
{ {
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
if (!innobase_skip) if (!innobase_skip)
innobase_close_connection(THD* thd); innobase_close_connection(thd);
#endif #endif
} }
...@@ -236,7 +236,6 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) ...@@ -236,7 +236,6 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
my_error(ER_ERROR_DURING_COMMIT, MYF(0), error); my_error(ER_ERROR_DURING_COMMIT, MYF(0), error);
error=1; error=1;
} }
trans->innobase_tid=0;
} }
#endif #endif
if (error && trans == &thd->transaction.all && mysql_bin_log.is_open()) if (error && trans == &thd->transaction.all && mysql_bin_log.is_open())
...@@ -263,12 +262,11 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans) ...@@ -263,12 +262,11 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
if (trans->innobase_tid) if (trans->innobase_tid)
{ {
if ((error=innobase_rollback(thd))) if ((error=innobase_rollback(thd, trans->innobase_tid)))
{ {
my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), error); my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), error);
error=1; error=1;
} }
trans->innobase_tid=0;
} }
#endif #endif
#ifdef USING_TRANSACTIONS #ifdef USING_TRANSACTIONS
......
...@@ -2576,7 +2576,7 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -2576,7 +2576,7 @@ CHANGEABLE_VAR changeable_vars[] = {
{"innobase_mirrored_log_groups", {"innobase_mirrored_log_groups",
(long*) &innobase_mirrored_log_groups, 1, 1, 10, 0, 1}, (long*) &innobase_mirrored_log_groups, 1, 1, 10, 0, 1},
{"innobase_log_files_in_group", {"innobase_log_files_in_group",
(long*) &innobase_mirrored_log_groups, 2, 2, 100, 0, 1}, (long*) &innobase_log_files_in_group, 2, 2, 100, 0, 1},
{"innobase_log_file_size", {"innobase_log_file_size",
(long*) &innobase_log_file_size, 5*1024*1024L, 1*1024*1024L, (long*) &innobase_log_file_size, 5*1024*1024L, 1*1024*1024L,
~0L, 0, 1024*1024L}, ~0L, 0, 1024*1024L},
...@@ -2591,6 +2591,9 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -2591,6 +2591,9 @@ CHANGEABLE_VAR changeable_vars[] = {
~0L, 0, 1024}, ~0L, 0, 1024},
{"innobase_file_io_threads", {"innobase_file_io_threads",
(long*) &innobase_file_io_threads, 9, 4, 64, 0, 1}, (long*) &innobase_file_io_threads, 9, 4, 64, 0, 1},
{"innobase_lock_wait_timeout",
(long*) &innobase_lock_wait_timeout, 1024 * 1024 * 1024, 1,
1024 * 1024 * 1024, 0, 1},
#endif #endif
{ "interactive_timeout", (long*) &net_interactive_timeout, { "interactive_timeout", (long*) &net_interactive_timeout,
NET_WAIT_TIMEOUT, 1, 31*24*60*60, 0, 1 }, NET_WAIT_TIMEOUT, 1, 31*24*60*60, 0, 1 },
...@@ -3463,13 +3466,13 @@ static void get_options(int argc,char **argv) ...@@ -3463,13 +3466,13 @@ static void get_options(int argc,char **argv)
case OPT_GEMINI_SKIP: case OPT_GEMINI_SKIP:
#ifdef HAVE_GEMINI_DB #ifdef HAVE_GEMINI_DB
gemini_skip=1; gemini_skip=1;
have_gemini_db=SHOW_OPTION_DISABLED; have_gemini=SHOW_OPTION_DISABLED;
#endif #endif
break; break;
case OPT_INNOBASE_SKIP: case OPT_INNOBASE_SKIP:
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
innobase_skip=1; innobase_skip=1;
have_innobase_db=SHOW_HAVE_DISABLED; have_innobase=SHOW_OPTION_DISABLED;
#endif #endif
break; break;
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
......
...@@ -209,7 +209,8 @@ check_connections(THD *thd) ...@@ -209,7 +209,8 @@ check_connections(THD *thd)
/* nasty, but any other way? */ /* nasty, but any other way? */
uint pkt_len = 0; uint pkt_len = 0;
{ {
char buff[60],*end; /* buff[] needs to big enough to hold the server_version variable */
char buff[SERVER_VERSION_LENGTH + SCRAMBLE_LENGTH+32],*end;
int client_flags = CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB | int client_flags = CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB |
CLIENT_TRANSACTIONS; CLIENT_TRANSACTIONS;
LINT_INIT(pkt_len); LINT_INIT(pkt_len);
......
...@@ -475,6 +475,26 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, ...@@ -475,6 +475,26 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
make_join_readinfo(&join, make_join_readinfo(&join,
(select_options & SELECT_DESCRIBE) | SELECT_USE_CACHE); (select_options & SELECT_DESCRIBE) | SELECT_USE_CACHE);
/* Need to tell Innobase that to play it safe, it should fetch all
columns of the tables: this is because MySQL
may build row pointers for the rows, and for all columns of the primary
key the field->query_id has not necessarily been set to thd->query_id
by MySQL. */
#ifdef HAVE_INNOBASE_DB
if (need_tmp || select_distinct || group || order)
{
for (uint i_h = join.const_tables; i_h < join.tables; i_h++)
{
JOIN_TAB* tab_h = join.join_tab + i_h;
TABLE* table_h = tab_h->table;
if (table_h->db_type == DB_TYPE_INNOBASE)
table_h->file->extra(HA_EXTRA_RESTORE_POS);
}
}
#endif
DBUG_EXECUTE("info",TEST_join(&join);); DBUG_EXECUTE("info",TEST_join(&join););
/* /*
Because filesort always does a full table scan or a quick range scan Because filesort always does a full table scan or a quick range scan
......
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