Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b084cf19
Commit
b084cf19
authored
Feb 15, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql into donna.mysql.com:/home/my/bk/mysql
parents
dfa2a76c
b6b1bfab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
42 deletions
+87
-42
Docs/manual.texi
Docs/manual.texi
+52
-29
sql/handler.cc
sql/handler.cc
+2
-4
sql/mysqld.cc
sql/mysqld.cc
+11
-8
sql/sql_parse.cc
sql/sql_parse.cc
+2
-1
sql/sql_select.cc
sql/sql_select.cc
+20
-0
No files found.
Docs/manual.texi
View file @
b084cf19
...
@@ -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 --silen
t /path/to/datadir/*/*.MYI
myisamchk --
silent --fas
t /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 xx
x
@end example
@end example
This means one of the following things:
This means one of the following things:
sql/handler.cc
View file @
b084cf19
...
@@ -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
...
...
sql/mysqld.cc
View file @
b084cf19
...
@@ -2450,7 +2450,7 @@ static struct option long_options[] = {
...
@@ -2450,7 +2450,7 @@ static struct option long_options[] = {
#ifdef HAVE_INNOBASE_DB
#ifdef HAVE_INNOBASE_DB
{
"innobase_data_home_dir"
,
required_argument
,
0
,
{
"innobase_data_home_dir"
,
required_argument
,
0
,
OPT_INNOBASE_DATA_HOME_DIR
},
OPT_INNOBASE_DATA_HOME_DIR
},
{
"innobase_data_file_path"
,
required_argument
,
0
,
{
"innobase_data_file_path"
,
required_argument
,
0
,
OPT_INNOBASE_DATA_FILE_PATH
},
OPT_INNOBASE_DATA_FILE_PATH
},
{
"innobase_log_group_home_dir"
,
required_argument
,
0
,
{
"innobase_log_group_home_dir"
,
required_argument
,
0
,
OPT_INNOBASE_LOG_GROUP_HOME_DIR
},
OPT_INNOBASE_LOG_GROUP_HOME_DIR
},
...
@@ -2575,15 +2575,15 @@ CHANGEABLE_VAR changeable_vars[] = {
...
@@ -2575,15 +2575,15 @@ CHANGEABLE_VAR changeable_vars[] = {
#ifdef HAVE_INNOBASE_DB
#ifdef HAVE_INNOBASE_DB
{
"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
},
{
"innobase_log_buffer_size"
,
{
"innobase_log_buffer_size"
,
(
long
*
)
&
innobase_log_buffer_size
,
1024
*
1024L
,
256
*
1024L
,
(
long
*
)
&
innobase_log_buffer_size
,
1024
*
1024L
,
256
*
1024L
,
~
0L
,
0
,
1024
},
~
0L
,
0
,
1024
},
{
"innobase_buffer_pool_size"
,
{
"innobase_buffer_pool_size"
,
(
long
*
)
&
innobase_buffer_pool_size
,
8
*
1024
*
1024L
,
1024
*
1024L
,
(
long
*
)
&
innobase_buffer_pool_size
,
8
*
1024
*
1024L
,
1024
*
1024L
,
~
0L
,
0
,
1024
*
1024L
},
~
0L
,
0
,
1024
*
1024L
},
{
"innobase_additional_mem_pool_size"
,
{
"innobase_additional_mem_pool_size"
,
...
@@ -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
...
...
sql/sql_parse.cc
View file @
b084cf19
...
@@ -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
);
...
...
sql/sql_select.cc
View file @
b084cf19
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment