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
9ed3f9ed
Commit
9ed3f9ed
authored
May 12, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql
Docs/manual.texi: Auto merged sql/mysqld.cc: Auto merged
parents
eeedc049
26a61555
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
138 additions
and
77 deletions
+138
-77
Docs/manual.texi
Docs/manual.texi
+111
-68
innobase/pars/pars0grm.c
innobase/pars/pars0grm.c
+2
-1
mysys/mf_keycache.c
mysys/mf_keycache.c
+6
-6
sql-bench/crash-me.sh
sql-bench/crash-me.sh
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+16
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-1
No files found.
Docs/manual.texi
View file @
9ed3f9ed
...
@@ -514,13 +514,13 @@ MyISAM Table Formats
...
@@ -514,13 +514,13 @@ MyISAM Table Formats
BDB or Berkeley_DB Tables
BDB or Berkeley_DB Tables
* BDB overview::
* BDB overview::
Overview of BDB Tables
* BDB install::
* BDB install::
Installing BDB
* BDB start::
* BDB start::
BDB startup options
* BDB characteristic::
* BDB characteristic::
Some characteristic of @code{BDB} tables:
* BDB TODO::
* BDB TODO::
Some things we need to fix for BDB in the near future:
* BDB portability::
* BDB portability::
Operating systems supported by @strong{BDB}
* BDB errors::
* BDB errors::
Errors You May Get When Using BDB Tables
GEMINI Tables
GEMINI Tables
...
@@ -533,7 +533,7 @@ InnoDB Tables
...
@@ -533,7 +533,7 @@ InnoDB Tables
* InnoDB overview:: InnoDB tables overview
* InnoDB overview:: InnoDB tables overview
* InnoDB start:: InnoDB startup options
* InnoDB start:: InnoDB startup options
* Creating an InnoDB database:: Creating an InnoDB database.
* Creating an InnoDB database:: Creating an InnoDB database.
Creating an InnoDB database. Creating an InnoDB database.
* Using InnoDB tables:: Creating InnoDB tables
* Using InnoDB tables:: Creating InnoDB tables
* Adding and removing:: Adding and removing InnoDB data and log files
* Adding and removing:: Adding and removing InnoDB data and log files
* Backing up:: Backing up and recovering an InnoDB database
* Backing up:: Backing up and recovering an InnoDB database
...
@@ -1088,6 +1088,7 @@ Debugging a MySQL server
...
@@ -1088,6 +1088,7 @@ Debugging a MySQL server
* Compiling for debugging::
* Compiling for debugging::
* Making trace files::
* Making trace files::
* Using gdb on mysqld::
* Using stack trace::
* Using stack trace::
* Using log files::
* Using log files::
* Reproducable test case::
* Reproducable test case::
...
@@ -7395,7 +7396,7 @@ This will avoid problems with the @code{libstdc++} library and with C++
...
@@ -7395,7 +7396,7 @@ This will avoid problems with the @code{libstdc++} library and with C++
exceptions.
exceptions.
If this doesn't help, you should compile a debug version and run
If this doesn't help, you should compile a debug version and run
it with a trace file or under @code{gdb}. @xref{
Debugging server
}.
it with a trace file or under @code{gdb}. @xref{
Using gdb on mysqld
}.
@node SunOS, Linux, Solaris x86, Source install system issues
@node SunOS, Linux, Solaris x86, Source install system issues
@subsection SunOS 4 Notes
@subsection SunOS 4 Notes
...
@@ -8888,11 +8889,10 @@ If @code{mysqld} doesn't start, please check whether or not the
...
@@ -8888,11 +8889,10 @@ If @code{mysqld} doesn't start, please check whether or not the
try to start it with @code{mysqld --standalone}; In this case you may
try to start it with @code{mysqld --standalone}; In this case you may
get some useful information on the screen that may help solve this.
get some useful information on the screen that may help solve this.
The last option is to start @code{mysqld} with @code{--debug}. In this
The last option is to start @code{mysqld} with @code{--standalone
case @code{mysqld} will write a log file in @file{\mysqld.trace}
--debug}. In this case @code{mysqld} will write a log file in
that should contain the reason why @code{mysqld} doesn't start. If you
@file{C:\mysqld.trace} that should contain the reason why @code{mysqld}
make a bug report about this, please only send the lines to the mailing list
doesn't start. @xref{Making trace files}.
where something seems to go wrong!
@node NT start, Windows running, Win95 start, Windows
@node NT start, Windows running, Win95 start, Windows
@subsection Starting MySQL on NT or Windows 2000
@subsection Starting MySQL on NT or Windows 2000
...
@@ -8974,6 +8974,7 @@ C:\mysql\bin\mysqld --standalone --debug
...
@@ -8974,6 +8974,7 @@ C:\mysql\bin\mysqld --standalone --debug
@end example
@end example
The last version gives you a debug trace in @file{C:\mysqld.trace}.
The last version gives you a debug trace in @file{C:\mysqld.trace}.
@xref{Making trace files}.
@node Windows running, Windows and SSH, NT start, Windows
@node Windows running, Windows and SSH, NT start, Windows
@subsection Running MySQL on Windows
@subsection Running MySQL on Windows
...
@@ -9999,15 +10000,8 @@ this:
...
@@ -9999,15 +10000,8 @@ this:
This problem occurs only on systems that don't have a working thread
This problem occurs only on systems that don't have a working thread
library and for which @strong{MySQL} must be configured to use MIT-pthreads.
library and for which @strong{MySQL} must be configured to use MIT-pthreads.
On Windows, you can try to start @code{mysqld} as follows:
If you can't get mysqld to start you can try to make a trace file
to find the problem. @xref{Making trace files}.
@example
C:\mysql\bin\mysqld --standalone --debug
@end example
This will not run in the background and it should also write a trace in
@file{\mysqld.trace}, which may help you determine the source of your
problems. @xref{Windows}.
If you are using BDB (Berkeley DB) tables, you should familiarize
If you are using BDB (Berkeley DB) tables, you should familiarize
yourself with the different BDB specific startup options. @xref{BDB start}.
yourself with the different BDB specific startup options. @xref{BDB start}.
...
@@ -10140,7 +10134,7 @@ Set the default table type for tables. @xref{Table types}.
...
@@ -10140,7 +10134,7 @@ Set the default table type for tables. @xref{Table types}.
@item --debug[...]=
@item --debug[...]=
If @strong{MySQL} is configured with @code{--with-debug}, you can use this
If @strong{MySQL} is configured with @code{--with-debug}, you can use this
option to get a trace file of what @code{mysqld} is doing.
option to get a trace file of what @code{mysqld} is doing.
@xref{
The DBUG package
}.
@xref{
Making trace files
}.
@item --delay-key-write-for-all-tables
@item --delay-key-write-for-all-tables
Don't flush key buffers between writes for any @code{MyISAM} table.
Don't flush key buffers between writes for any @code{MyISAM} table.
...
@@ -13810,7 +13804,7 @@ it down and restarting it.
...
@@ -13810,7 +13804,7 @@ it down and restarting it.
If everything else fails, start the @code{mysqld} daemon with a debugging
If everything else fails, start the @code{mysqld} daemon with a debugging
option (for example, @code{--debug=d,general,query}). This will print host and
option (for example, @code{--debug=d,general,query}). This will print host and
user information about attempted connections, as well as information about
user information about attempted connections, as well as information about
each command issued. @xref{
Debugging server
}.
each command issued. @xref{
Making trace files
}.
@item
@item
If you have any other problems with the @strong{MySQL} grant tables and
If you have any other problems with the @strong{MySQL} grant tables and
...
@@ -24471,7 +24465,7 @@ NuSphere is working on removing these limitations.
...
@@ -24471,7 +24465,7 @@ NuSphere is working on removing these limitations.
@menu
@menu
* InnoDB overview:: InnoDB tables overview
* InnoDB overview:: InnoDB tables overview
* InnoDB start:: InnoDB startup options
* InnoDB start:: InnoDB startup options
* Creating an InnoDB database:: Creating an InnoDB database.
* Creating an InnoDB database:: Creating an InnoDB database.
Creating an InnoDB database. Creating an InnoDB database.
* Using InnoDB tables:: Creating InnoDB tables
* Using InnoDB tables:: Creating InnoDB tables
* Adding and removing:: Adding and removing InnoDB data and log files
* Adding and removing:: Adding and removing InnoDB data and log files
* Backing up:: Backing up and recovering an InnoDB database
* Backing up:: Backing up and recovering an InnoDB database
...
@@ -31719,7 +31713,7 @@ the following configure options:
...
@@ -31719,7 +31713,7 @@ the following configure options:
@multitable @columnfractions .3 .7
@multitable @columnfractions .3 .7
@item @strong{Option} @tab @strong{Comment}
@item @strong{Option} @tab @strong{Comment}
@item --with-server-suffix=-
M
ax @tab Add a suffix to the @code{mysqld} version string.
@item --with-server-suffix=-
m
ax @tab Add a suffix to the @code{mysqld} version string.
@item --with-bdb @tab Support for Berkeley DB (BDB) tables
@item --with-bdb @tab Support for Berkeley DB (BDB) tables
@item --with-innodb @tab Support for InnoDB tables.
@item --with-innodb @tab Support for InnoDB tables.
@item CFLAGS=-DUSE_SYMDIR @tab Symbolic links support for Windows.
@item CFLAGS=-DUSE_SYMDIR @tab Symbolic links support for Windows.
...
@@ -36124,6 +36118,7 @@ Try the following:
...
@@ -36124,6 +36118,7 @@ Try the following:
@enumerate
@enumerate
@item
@item
Start @code{mysqld} from @code{gdb} (or in another debugger).
Start @code{mysqld} from @code{gdb} (or in another debugger).
@xref{Using gdb on mysqld}.
@item
@item
Run your test scripts.
Run your test scripts.
...
@@ -37947,6 +37942,20 @@ file name is given, it defaults to the name of the host machine followed
...
@@ -37947,6 +37942,20 @@ file name is given, it defaults to the name of the host machine followed
by @code{-bin}. If file name is given, but it doesn't contain a path, the
by @code{-bin}. If file name is given, but it doesn't contain a path, the
file is written in the data directory.
file is written in the data directory.
You can use the following options to @code{mysqld} to affect what is logged
to the binary log:
@multitable @columnfractions .4 .6
@item @code{binlog-do-db=database_name} @tab
Tells the master it should log updates for the specified database, and
exclude all others not explicitly mentioned.
(Example: @code{binlog-do-db=some_database})
@item @code{binlog-ignore-db=database_name} @tab
Tells the master that updates to the given database should not be logged
to the binary log (Example: @code{binlog-ignore-db=some_database})
@end multitable
To the binary log filename @code{mysqld} will append an extension that is a
To the binary log filename @code{mysqld} will append an extension that is a
number that is incremented each time you execute @code{mysqladmin
number that is incremented each time you execute @code{mysqladmin
refresh}, execute @code{mysqladmin flush-logs}, execute the @code{FLUSH LOGS}
refresh}, execute @code{mysqladmin flush-logs}, execute the @code{FLUSH LOGS}
...
@@ -38283,7 +38292,7 @@ greater detail in the next section.
...
@@ -38283,7 +38292,7 @@ greater detail in the next section.
@multitable @columnfractions .3 .7
@multitable @columnfractions .3 .7
@item @strong{mysql_affected_rows()} @tab
@item @strong{mysql_affected_rows()} @tab
Returns the number of rows
affec
ted by the last @code{UPDATE},
Returns the number of rows
changed/deleted/inser
ted by the last @code{UPDATE},
@code{DELETE}, or @code{INSERT} query.
@code{DELETE}, or @code{INSERT} query.
@item @strong{mysql_close()} @tab
@item @strong{mysql_close()} @tab
...
@@ -38471,7 +38480,7 @@ expects a counted string. If the string contains binary data (which may
...
@@ -38471,7 +38480,7 @@ expects a counted string. If the string contains binary data (which may
include null bytes), you must use @code{mysql_real_query()}.
include null bytes), you must use @code{mysql_real_query()}.
For each non-@code{SELECT} query (for example, @code{INSERT}, @code{UPDATE},
For each non-@code{SELECT} query (for example, @code{INSERT}, @code{UPDATE},
@code{DELETE}), you can find out how many rows were
affected (chang
ed)
@code{DELETE}), you can find out how many rows were
changed (affect
ed)
by calling @code{mysql_affected_rows()}.
by calling @code{mysql_affected_rows()}.
For @code{SELECT} queries, you retrieve the selected rows as a result set.
For @code{SELECT} queries, you retrieve the selected rows as a result set.
...
@@ -38647,19 +38656,19 @@ A string representation of the error may be obtained by calling
...
@@ -38647,19 +38656,19 @@ A string representation of the error may be obtained by calling
@subsubheading Description
@subsubheading Description
Returns the number of rows affected (changed) by the last @code{UPDATE},
Returns the number of rows changed by the last @code{UPDATE}, deleted by
@code{DELETE} or @code{INSERT} query. May be called immediately after
the last @code{DELETE} or inserted by the last @code{INSERT}
@code{mysql_query()} for @code{UPDATE}, @code{DELETE}, or @code{INSERT}
statement. May be called immediately after @code{mysql_query()} for
statements. For @code{SELECT} statements, @code{mysql_affected_rows()}
@code{UPDATE}, @code{DELETE}, or @code{INSERT} statements. For
works like @code{mysql_num_rows()}.
@code{SELECT} statements, @code{mysql_affected_rows()} works like
@code{mysql_num_rows()}.
@code{mysql_affected_rows()} is currently implemented as a macro.
@subsubheading Return Values
@subsubheading Return Values
An integer greater than zero indicates the number of rows affected or
An integer greater than zero indicates the number of rows affected or
retrieved. Zero indicates that no records matched the @code{WHERE} clause in
retrieved. Zero indicates that no records where updated for an
the query or that no query has yet been executed. -1 indicates that the
@code{UPDATE} statement, no rows matched the @code{WHERE} clause in the
query or that no query has yet been executed. -1 indicates that the
query returned an error or that, for a @code{SELECT} query,
query returned an error or that, for a @code{SELECT} query,
@code{mysql_affected_rows()} was called prior to calling
@code{mysql_affected_rows()} was called prior to calling
@code{mysql_store_result()}.
@code{mysql_store_result()}.
...
@@ -38672,9 +38681,18 @@ None.
...
@@ -38672,9 +38681,18 @@ None.
@example
@example
mysql_query(&mysql,"UPDATE products SET cost=cost*1.25 WHERE group=10");
mysql_query(&mysql,"UPDATE products SET cost=cost*1.25 WHERE group=10");
printf("%
d products updated",
mysql_affected_rows(&mysql));
printf("%
ld products updated",(long)
mysql_affected_rows(&mysql));
@end example
@end example
If one specifies the flag @code{CLIENT_FOUND_ROWS} when connecting to
@code{mysqld}, @code{mysql_affected_rows()} will return the number of
rows matched by the @code{WHERE} statement for @code{UPDATE} statements.
Note that when one uses a @code{REPLACE} command,
@code{mysql_affected_rows()} will return 2 if the new row replaced and
old row. This is because in this case one row was inserted and then the
duplicate was deleted.
@findex @code{mysql_close()}
@findex @code{mysql_close()}
@node mysql_close, mysql_connect, mysql_affected_rows, C API functions
@node mysql_close, mysql_connect, mysql_affected_rows, C API functions
@subsubsection @code{mysql_close()}
@subsubsection @code{mysql_close()}
...
@@ -40490,6 +40508,12 @@ You must call @code{mysql_store_result()} or @code{mysql_use_result()}
...
@@ -40490,6 +40508,12 @@ You must call @code{mysql_store_result()} or @code{mysql_use_result()}
for every query that successfully retrieves data (@code{SELECT},
for every query that successfully retrieves data (@code{SELECT},
@code{SHOW}, @code{DESCRIBE}, @code{EXPLAIN}).
@code{SHOW}, @code{DESCRIBE}, @code{EXPLAIN}).
You don't have to call @code{mysql_store_result()} or
@code{mysql_use_result()} for other queries, but it will not do any
harm or cause any notable performance if you call @code{mysql_store_result()}
in all cases. You can detect if the query didn't have a result set by
checking if @code{mysql_store_result()} returns 0 (more about this later one).
If you want to know if the query should return a result set or not, you can
If you want to know if the query should return a result set or not, you can
use @code{mysql_field_count()} to check for this.
use @code{mysql_field_count()} to check for this.
@xref{mysql_field_count, @code{mysql_field_count}}.
@xref{mysql_field_count, @code{mysql_field_count}}.
...
@@ -42241,7 +42265,6 @@ with the @code{--gdb} and @code{--debug} options to @code{mysql-test-run}.
...
@@ -42241,7 +42265,6 @@ with the @code{--gdb} and @code{--debug} options to @code{mysql-test-run}.
If you have not compiled @strong{MySQL} for debugging you should probably
If you have not compiled @strong{MySQL} for debugging you should probably
do that. Just specify the @code{--with-debug} options to @code{configure}!
do that. Just specify the @code{--with-debug} options to @code{configure}!
@xref{Installing source}.
@xref{Installing source}.
@end itemize
@end itemize
@page
@page
...
@@ -44257,8 +44280,8 @@ as root.
...
@@ -44257,8 +44280,8 @@ as root.
Fixed bug when thread creation failed (could happen when doing a LOT
Fixed bug when thread creation failed (could happen when doing a LOT
of connections in a short time).
of connections in a short time).
@item
@item
Don't free the key cache on @code{FLUSH TABLES} as this will cause problems
Fixed some problems with @code{FLUSH TABLES} and @code{TEMPORARY} tables.
with temporary tables
.
(Problem with freeing the key cache and error @code{Can't reopen table...})
.
@item
@item
Fixed a problem in Innobase with other character sets than @code{latin1}
Fixed a problem in Innobase with other character sets than @code{latin1}
and another problem when using many columns.
and another problem when using many columns.
...
@@ -49925,6 +49948,7 @@ problems that may be unique to your environment.
...
@@ -49925,6 +49948,7 @@ problems that may be unique to your environment.
@menu
@menu
* Compiling for debugging::
* Compiling for debugging::
* Making trace files::
* Making trace files::
* Using gdb on mysqld::
* Using stack trace::
* Using stack trace::
* Using log files::
* Using log files::
* Reproducable test case::
* Reproducable test case::
...
@@ -49939,7 +49963,7 @@ If you have some very specific problem, you can always try to debug
...
@@ -49939,7 +49963,7 @@ If you have some very specific problem, you can always try to debug
whether or not @strong{MySQL} was compiled with debugging by doing:
whether or not @strong{MySQL} was compiled with debugging by doing:
@code{mysqld --help}. If the @code{--debug} flag is listed with the
@code{mysqld --help}. If the @code{--debug} flag is listed with the
options then you have debugging enabled. @code{mysqladmin ver} also
options then you have debugging enabled. @code{mysqladmin ver} also
lists the @code{mysqld} version as @code{mysql ... -debug} in this case.
lists the @code{mysqld} version as @code{mysql ... -
-
debug} in this case.
If you are using gcc or egcs, the recommended configure line is:
If you are using gcc or egcs, the recommended configure line is:
...
@@ -49978,22 +50002,50 @@ send mail to @email{mysql@@lists.mysql.com} and ask for help. Please use the
...
@@ -49978,22 +50002,50 @@ send mail to @email{mysql@@lists.mysql.com} and ask for help. Please use the
@code{mysqlbug} script for all bug reports or questions regarding the
@code{mysqlbug} script for all bug reports or questions regarding the
@strong{MySQL} version you are using!
@strong{MySQL} version you are using!
@node Making trace files, Using stack trace, Compiling for debugging, Debugging server
In the windows @strong{MySQL} distribution @code{mysqld.exe} is by
@appendixsubsec Creating trace files and using gdb on mysqld
default compiled with support for trace files.
@node Making trace files, Using gdb on mysqld, Compiling for debugging, Debugging server
@appendixsubsec Creating trace files
If you can cause the @code{mysqld} server to crash quickly, you can try to
If the @code{mysqld} server doesn't start or if you can cause the
create a trace file of this:
@code{mysqld} server to crash quickly, you can try to create a trace
file to find the problem.
Start the @code{mysqld} server with a trace log in @file{/tmp/mysqld.trace}.
To do this you have to have a @code{mysqld} that is compiled for debugging.
The log file will get very @emph{BIG}.
You can check this by executing @code{mysqld -V}. If the version number
ends with @code{-debug}, it's compiled with support for trace files.
@code{mysqld --debug --log}
Start the @code{mysqld} server with a trace log in @file{/tmp/mysqld.trace}
(or @file{C:\mysqld.trace} on windows):
or you can start it with
@code{mysqld --debug}
@code{mysqld --debug=d,info,error,query,general,where:O,/tmp/mysql.trace}
On Windows you should also use the @code{--standalone} flag to not start
@code{mysqld} as a service.
which only prints information with the most interesting tags.
Note that the trace file will get very @emph{BIG}!
If you want to have a smaller trace file, you can use something like:
@code{mysqld --debug=d,info,error,query,general,where:O,/tmp/mysqld.trace}
which only prints information with the most interesting tags in
@file{/tmp/mysqld.trace}.
If you make a bug report about this, please only send the lines from the
trace file to the appropriate mailing list where something seems to go
wrong! If you can't locate the wrong place, you can ftp the trace file,
together with a full bug report, to
@uref{ftp://support.mysql.com/pub/mysql/secret} so that a @strong{MySQL}
developer can take a look a this.
The trace file is made with the @strong{DBUG} package by Fred Fish.
@xref{The DBUG package}.
@cindex gdb, using
@node Using gdb on mysqld, Using stack trace, Making trace files, Debugging server
@appendixsubsec Debugging mysqld under gdb
On most system you can also start @code{mysqld} from @code{gdb} to get
On most system you can also start @code{mysqld} from @code{gdb} to get
more information if @code{mysqld} crashes.
more information if @code{mysqld} crashes.
...
@@ -50009,7 +50061,7 @@ It's very hard to debug @strong{MySQL} under @code{gdb} if you do a lot of
...
@@ -50009,7 +50061,7 @@ It's very hard to debug @strong{MySQL} under @code{gdb} if you do a lot of
new connections the whole time as @code{gdb} doesn't free the memory for
new connections the whole time as @code{gdb} doesn't free the memory for
old threads. You can avoid this problem by starting @code{mysqld} with
old threads. You can avoid this problem by starting @code{mysqld} with
@code{-O thread_cache_size= 'max_connections +1'}. In most cases just
@code{-O thread_cache_size= 'max_connections +1'}. In most cases just
using @code{-O thread_cache_size=
5'} will help a lot!
using @code{-O thread_cache_size=5'} will help a lot!
If you want to get a core dump on Linux if @code{mysqld} dies with a
If you want to get a core dump on Linux if @code{mysqld} dies with a
SIGSEGV signal, you can start mysqld with the @code{--core-file} option.
SIGSEGV signal, you can start mysqld with the @code{--core-file} option.
...
@@ -50018,8 +50070,7 @@ find out why @code{mysqld} died:
...
@@ -50018,8 +50070,7 @@ find out why @code{mysqld} died:
@example
@example
shell> gdb mysqld core
shell> gdb mysqld core
gdb> backtrace
gdb> backtrace full
gdb> info local
gdb> exit
gdb> exit
@end example
@end example
...
@@ -50051,15 +50102,7 @@ Here is an example how to debug mysqld:
...
@@ -50051,15 +50102,7 @@ Here is an example how to debug mysqld:
shell> gdb /usr/local/libexec/mysqld
shell> gdb /usr/local/libexec/mysqld
gdb> run
gdb> run
...
...
back # Do this when mysqld crashes
backtrace full # Do this when mysqld crashes
info locals
up
info locals
up
...
(until you get some information about local variables)
quit
@end example
@end example
Include the above output in a mail generated with @code{mysqlbug} and
Include the above output in a mail generated with @code{mysqlbug} and
...
@@ -50082,7 +50125,7 @@ debugging information by using the @code{trace} method or by
...
@@ -50082,7 +50125,7 @@ debugging information by using the @code{trace} method or by
setting the @code{DBI_TRACE} environment variable.
setting the @code{DBI_TRACE} environment variable.
@xref{Perl DBI Class, , Perl @code{DBI} Class}.
@xref{Perl DBI Class, , Perl @code{DBI} Class}.
@node Using stack trace, Using log files,
Making trace files
, Debugging server
@node Using stack trace, Using log files,
Using gdb on mysqld
, Debugging server
@appendixsubsec Using a stack trace
@appendixsubsec Using a stack trace
On some operating systems, the error log will contain a stack trace if
On some operating systems, the error log will contain a stack trace if
...
@@ -50297,7 +50340,7 @@ A very common mistake is to use an old @file{mysql.h} file from an old
...
@@ -50297,7 +50340,7 @@ A very common mistake is to use an old @file{mysql.h} file from an old
The @strong{MySQL} server and most @strong{MySQL} clients are compiled
The @strong{MySQL} server and most @strong{MySQL} clients are compiled
with the DBUG package originally made by Fred Fish. When one has configured
with the DBUG package originally made by Fred Fish. When one has configured
@strong{MySQL} for debugging, this package makes it possible to get a trace
@strong{MySQL} for debugging, this package makes it possible to get a trace
file of what the program is debugging.
file of what the program is debugging.
@xref{Making trace files}.
One uses the debug package by invoking the program with the
One uses the debug package by invoking the program with the
@code{--debug="..."} or the @code{-#...} option.
@code{--debug="..."} or the @code{-#...} option.
innobase/pars/pars0grm.c
View file @
9ed3f9ed
...
@@ -95,9 +95,10 @@
...
@@ -95,9 +95,10 @@
/* The value of the semantic attribute is a pointer to a query tree node
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
que_node_t */
#define YYSTYPE que_node_t*
#define YYSTYPE que_node_t*
#define alloca mem_alloc
#include "univ.i"
#include "univ.i"
#undef alloca
#define alloca mem_alloc
#include <math.h>
#include <math.h>
#include "pars0pars.h"
#include "pars0pars.h"
#include "mem0mem.h"
#include "mem0mem.h"
...
...
mysys/mf_keycache.c
View file @
9ed3f9ed
...
@@ -327,7 +327,7 @@ int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
...
@@ -327,7 +327,7 @@ int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
}
}
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"start of key_cache_write"
,
1
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"start of key_cache_write"
,
1
););
#endif
#endif
if
(
_my_disk_blocks
>
0
)
if
(
_my_disk_blocks
>
0
)
{
/* We have key_cacheing */
{
/* We have key_cacheing */
...
@@ -367,7 +367,7 @@ int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
...
@@ -367,7 +367,7 @@ int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
}
}
end:
end:
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"end of key_cache_write"
,
1
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"end of key_cache_write"
,
1
););
#endif
#endif
return
(
error
);
return
(
error
);
}
/* key_cache_write */
}
/* key_cache_write */
...
@@ -381,7 +381,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
...
@@ -381,7 +381,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
reg1
SEC_LINK
*
next
,
**
start
;
reg1
SEC_LINK
*
next
,
**
start
;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"start of find_key_block"
,
0
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"start of find_key_block"
,
0
););
#endif
#endif
*
error
=
0
;
*
error
=
0
;
...
@@ -459,7 +459,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
...
@@ -459,7 +459,7 @@ static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
}
}
_my_used_last
=
next
;
_my_used_last
=
next
;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"end of find_key_block"
,
0
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"end of find_key_block"
,
0
););
#endif
#endif
return
next
;
return
next
;
}
/* find_key_block */
}
/* find_key_block */
...
@@ -529,7 +529,7 @@ int flush_key_blocks(File file, enum flush_type type)
...
@@ -529,7 +529,7 @@ int flush_key_blocks(File file, enum flush_type type)
pthread_mutex_lock
(
&
THR_LOCK_keycache
);
pthread_mutex_lock
(
&
THR_LOCK_keycache
);
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"start of flush_key_blocks"
,
0
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"start of flush_key_blocks"
,
0
););
#endif
#endif
cache
=
cache_buff
;
/* If no key cache */
cache
=
cache_buff
;
/* If no key cache */
if
(
_my_disk_blocks
>
0
&&
if
(
_my_disk_blocks
>
0
&&
...
@@ -607,7 +607,7 @@ int flush_key_blocks(File file, enum flush_type type)
...
@@ -607,7 +607,7 @@ int flush_key_blocks(File file, enum flush_type type)
}
}
}
}
#ifndef DBUG_OFF
#ifndef DBUG_OFF
DBUG_EXECUTE
(
"
exec
"
,
test_key_cache
(
"end of flush_key_blocks"
,
0
););
DBUG_EXECUTE
(
"
check_keycache
"
,
test_key_cache
(
"end of flush_key_blocks"
,
0
););
#endif
#endif
pthread_mutex_unlock
(
&
THR_LOCK_keycache
);
pthread_mutex_unlock
(
&
THR_LOCK_keycache
);
if
(
cache
!=
cache_buff
)
if
(
cache
!=
cache_buff
)
...
...
sql-bench/crash-me.sh
View file @
9ed3f9ed
#!@PERL@
-w
#!@PERL@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
#
# This library is free software; you can redistribute it and/or
# This library is free software; you can redistribute it and/or
...
...
sql/mysqld.cc
View file @
9ed3f9ed
...
@@ -152,6 +152,22 @@ static uint handler_count;
...
@@ -152,6 +152,22 @@ static uint handler_count;
static
bool
opt_console
=
0
,
start_mode
=
0
;
static
bool
opt_console
=
0
,
start_mode
=
0
;
#endif
#endif
/* Set prefix for windows binary */
#ifdef __WIN__
#undef MYSQL_SERVER_SUFFIX
#ifdef __NT__
#if defined(HAVE_INNOBASE_DB) || defined(HAVE_BERKELEY_DB)
#define MYSQL_SERVER_SUFFIX "-max-nt"
#else
#define MYSQL_SERVER_SUFFIX "-nt"
#endif
/* ...DB */
#elif defined(HAVE_INNOBASE_DB) || defined(HAVE_BERKELEY_DB)
#define MYSQL_SERVER_SUFFIX "-max"
#else
#define MYSQL_SERVER_SUFFIX ""
#endif
/* __NT__ */
#endif
#ifdef HAVE_BERKELEY_DB
#ifdef HAVE_BERKELEY_DB
SHOW_COMP_OPTION
have_berkeley_db
=
SHOW_OPTION_YES
;
SHOW_COMP_OPTION
have_berkeley_db
=
SHOW_OPTION_YES
;
#else
#else
...
...
sql/sql_select.cc
View file @
9ed3f9ed
...
@@ -5371,7 +5371,8 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
...
@@ -5371,7 +5371,8 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
ulong
offset
,
Item
*
having
)
ulong
offset
,
Item
*
having
)
{
{
handler
*
file
=
table
->
file
;
handler
*
file
=
table
->
file
;
char
*
org_record
,
*
new_record
,
*
record
;
char
*
org_record
,
*
new_record
;
byte
*
record
;
int
error
;
int
error
;
ulong
reclength
=
table
->
reclength
-
offset
;
ulong
reclength
=
table
->
reclength
-
offset
;
DBUG_ENTER
(
"remove_dup_with_compare"
);
DBUG_ENTER
(
"remove_dup_with_compare"
);
...
...
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