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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
294cc196
Commit
294cc196
authored
Apr 24, 2003
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents
1d9d1221
8c2bda2d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
189 deletions
+186
-189
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+2
-0
Docs/internals.texi
Docs/internals.texi
+138
-184
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+4
-0
include/config-win.h
include/config-win.h
+3
-0
sql/log_event.cc
sql/log_event.cc
+21
-1
sql/log_event.h
sql/log_event.h
+18
-4
No files found.
BitKeeper/etc/logging_ok
View file @
294cc196
...
...
@@ -45,6 +45,7 @@ miguel@hegel.br
miguel@hegel.local
miguel@light.
miguel@light.local
mmatthew@markslaptop.
monty@bitch.mysql.fi
monty@butch.
monty@donna.mysql.fi
...
...
@@ -67,6 +68,7 @@ paul@teton.kitebird.com
pem@mysql.com
peter@linux.local
peter@mysql.com
peterg@mysql.com
pgulutzan@linux.local
ram@mysql.r18.ru
ram@ram.(none)
...
...
Docs/internals.texi
View file @
294cc196
...
...
@@ -1994,7 +1994,7 @@ When you say:
@*
MySQL creates files named Table1.MYD ("MySQL Data"), Table1.MYI
("MySQL Index"), and Table1.
FRM
("Format"). These files will be in the
("MySQL Index"), and Table1.
frm
("Format"). These files will be in the
directory: @*
/<datadir>/<database>/
@*
...
...
@@ -2030,6 +2030,12 @@ The minimal record header is a set of flags:
@end table
@*
The length of the record header is thus:@*
(1 + number of NULL columns + 7) / 8 bytes@*
After the header, all columns are stored in
the order that they were created, which is the
same order that you would get from SHOW COLUMNS.
Here's an example. Suppose you say:
@*
...
...
@@ -2072,8 +2078,8 @@ right is @code{on}, and (b) remember that the first flag bit is the X bit.)
There are complications -- the record header is more complex if there
are variable-length fields -- but the simple display shown in the
example is exactly what you'd see if you
took a debugger and looked
at the MySQL Data file
.
example is exactly what you'd see if you
looked at the MySQL Data file
with a debugger or a hexadecimal file dumper
.
@*
@section Physical Attributes of Columns
...
...
@@ -2106,8 +2112,8 @@ Example: a VARCHAR(7) column containing 'A' looks like:@*
@item The numeric data types
Important: MySQL
stores all multi-byte binary numbers with the
high
byte first. This is called "little-endian" numeric storage;
Important: MySQL
almost always stores multi-byte binary numbers with
the low
byte first. This is called "little-endian" numeric storage;
it's normal on Intel x86 machines; MySQL uses it even for non-Intel
machines so that databases will be portable.
@*
...
...
@@ -2282,7 +2288,7 @@ Example: a SET('A','B','C') column containing 'A' looks like:@*
Storage: one byte if less than 256 alternatives, else two bytes.
@item
This is an index. The value 1 corresponds to the first listed
alternative. (Note: ENUM always reserves 0 for a
blank ''
value. This
alternative. (Note: ENUM always reserves 0 for a
n erroneous
value. This
explains why 'A' is 1 instead of 0.)
@item
Example: an ENUM('A','B','C') column containing 'A' looks like:@*
...
...
@@ -2368,6 +2374,9 @@ Storage: same as LONGBLOB.
@strong
{
References:
}
@*
Most of the formatting work for MyISAM columns is visible
in the program /sql/field.cc in the source code directory.
And in the MyISAM directory, the files that do formatting
work for different record formats are: /myisam/mi
_
statrec.c,
/myisam/mi
_
dynrec.c, and /myisam/mi
_
packrec.c.
@*
@node InnoDB Record Structure,InnoDB Page Structure,MyISAM Record Structure,Top
...
...
@@ -3112,7 +3121,7 @@ page0page.ic, and page0page.h in \page directory.
This is a description of the files that you get when you download the
source code of MySQL. This description begins with a list
of the
43
directories and a short comment about each one. Then, for
of the
main
directories and a short comment about each one. Then, for
each directory, in alphabetical order, a longer description is
supplied. When a directory contains significant program files, a list of each C
program is given along with an explanation of its intended function.
...
...
@@ -3124,43 +3133,37 @@ program is given along with an explanation of its intended function.
@item
bdb -- The Berkeley Database table handler
@item
BitKeeper -- BitKeeper administration
BitKeeper -- BitKeeper administration
(not part of the source distribution)
@item
BUILD --
Build switches
BUILD --
Some very often used build scripts
@item
Build-tools -- Build tools
@item
client -- Client library
@item
cmd-line-utils -- Command-line utilities
cmd-line-utils -- Command-line utilities
(libedit and readline)
@item
dbug -- Fred Fish's dbug library
@item
div -- Deadlock test
@item
Docs -- Preliminary documents about internals and new modules
@item
extra -- Eight minor standalone utility programs
@item
fs -- File System
extra -- Some minor standalone utility programs
@item
heap -- The HEAP table handler
@item
Images -- Empty directory
@item
include -- Include (*.h) files
@item
innobase -- The Innobase (InnoDB) table handler
@item
isam -- The ISAM (MySQL) table handler
@item
libmysql -- For producing
MySQL as a library (e.g. a Windows DLL)
libmysql -- For producing
a thread-safe libmysql library
@item
libmysql
_
r -- Only one file, a makefile
@item
libmysqld -- The MySQL
Library
libmysqld -- The MySQL
Server as an embeddable library
@item
man --
Manual pages
man --
Some user-contributed manual pages
@item
merge -- The MERGE table handler (see Reference Manual section 7.2)
@item
...
...
@@ -3170,24 +3173,21 @@ myisammrg -- The MyISAM Merge table handler
@item
mysql-test -- A test suite for mysqld
@item
mysys -- MySQL system library (Low level routines for file access
etc.)
mysys -- MySQL system library (Low level routines for file access etc.)
@item
netware -- Files related to the Novell NetWare version of MySQL
@item
NEW-RPMS --
New "RPM Package Manager" files
NEW-RPMS --
Directory to place RPMS while making a distribution
@item
os2 -- Routines for working with the OS/2 operating system
@item
pstack -- Process stack display
@item
regex -- Regular Expression library for support of REGEXP function
pstack -- Process stack display (not currently used)
@item
re
pl-tests -- Test cases for replication
re
gex -- Henry Spencer's Regular Expression library for support of REGEXP function
@item
SCCS -- Source Code Control System
SCCS -- Source Code Control System
(not part of source distribution)
@item
scripts -- SQL batches, e.g.
for converting msql to MySQL
scripts -- SQL batches, e.g.
mysqlbug and mysql
_
install
_
db
@item
sql -- Programs for handling SQL commands. The "core" of MySQL
@item
...
...
@@ -3197,18 +3197,17 @@ SSL -- Secure Sockets Layer
@item
strings -- Library for C string routines, e.g. atof, strchr
@item
support-files --
15 files used for building, containing switches?
support-files --
Files used to build MySQL on different systems
@item
tests -- Tests in Perl
@item
tools -- mysqlmanager.c
tools -- mysqlmanager.c
(under development, not yet useful)
@item
VC++Files -- Includes this entire directory, repeated for VC++
(Windows) use
VC++Files -- Includes this entire directory, repeated for VC++ (Windows) use
@item
vio -- Virtual I/O Library
@item
zlib -- data compression library
zlib -- data compression library
, used on Windows
@end itemize
@subsection bdb
...
...
@@ -3217,6 +3216,8 @@ The Berkeley Database table handler.
@*@*
The Berkeley Database (BDB) is maintained by Sleepycat Software.
MySQL AB maintains only a few small patches to make BDB work
better with MySQL.
@*@*
The documentation for BDB is available at
...
...
@@ -3236,6 +3237,10 @@ BitKeeper directory are for maintenance purposes only -- they are not
part of the MySQL package.
@*@*
The MySQL Reference Manual explains how to use Bitkeeper to get the
MySQL source.
@*@*
@subsection BUILD
Build switches.
...
...
@@ -3262,9 +3267,10 @@ Build tools.
@*@*
This directory contains batch files for extracting, making
directories, and making programs from source files. There are several
subdirectories -- for building Linux executables, for compiling, for
performing all build steps, etc.
directories, and making programs from source files. There are
several subdirectories with different scripts -- for building
Linux executables, for compiling, for performing all build steps,
and so on.
@*@*
@subsection client
...
...
@@ -3296,18 +3302,17 @@ mysqladmin.c -- maintenance of MYSQL databases
@item
mysqlcheck.c -- check all databases, check connect, etc.
@item
mysqldump.c -- dump table's contents
in ascii
mysqldump.c -- dump table's contents
as SQL statements
@item
mysqlimport.c -- import
file into a table
mysqlimport.c -- import
text files in different formats into tables
@item
mysqlmanager-pwgen.c -- pwgen seems to stand for "password
generation"
mysqlmanager-pwgen.c -- pwgen stands for "password generation" (not currently maintained)
@item
mysqlmanagerc.c -- entry point for mysql manager
mysqlmanagerc.c -- entry point for mysql manager
(not currently maintained)
@item
mysqlshow.c -- show databases, tables or columns
@item
mysqltest.c -- test program
mysqltest.c -- test program
used by the mysql-test suite, mysql-test-run
@item
password.c -- password checking routines
@item
...
...
@@ -3341,7 +3346,10 @@ Software Foundation.
@*@*
The
\libedit
(library of edit functions) subdirectory has files
written by Christos Zoulas. They are for editing the line contents.
written by Christos Zoulas. They are distributed and modifed under
the BSD License. These files are for editing the line contents.
@*@*
These are the program files in the
\libedit
subdirectory:
@itemize @bullet
@item
...
...
@@ -3396,6 +3404,8 @@ Fred Fish's dbug library.
This is not really part of the MySQL package. Rather, it's a set of
public-domain routines which are useful for debugging MySQL programs.
The MySQL Server and all .c and .cc programs support the use of this
package.
@*@*
How it works: One inserts a function call that begins with DBUG
_
* in
...
...
@@ -3405,7 +3415,8 @@ DBUG_ENTER("get_tty_password"); @*
at the start of a routine, and this line: @*
DBUG
_
RETURN(my
_
strdup(to,MYF(MY
_
FAE))); @*
at the end of the routine. These lines don't affect production code.
Features of the dbug library include profiling and state pushing.
Features of the dbug library include extensive reporting and profiling
(the latter has not been used by the MySQL team).
@*@*
The C programs in this directory are:
...
...
@@ -3429,14 +3440,6 @@ sanity.c -- Declaration of a variable
@end itemize
@*@*
@subsection div
Deadlock test.
@*@*
This file contains only one program, deadlock
_
test.c.
@*@*
@subsection Docs
Preliminary documents about internals and new modules.
...
...
@@ -3445,7 +3448,8 @@ Preliminary documents about internals and new modules.
This directory doesn't have much at present that's very useful to the
student, but the plan is that some documentation related to the source
files and the internal workings of MySQL, including perhaps some
documentation from developers themselves, will be placed here.
documentation from developers themselves, will be placed here. Some of
these files will eventually be moved to the MySQL documentation repository.
@*@*
These sub-directories are part of this directory:
...
...
@@ -3461,8 +3465,7 @@ mysql-logos -- more MySQL-related logos, some of them moving
@item
raw-flags -- more country flags, all .gif files
@item
support -- various files for generating texinfo/docbook
documentation
support -- various files for generating texinfo/docbook documentation
@item
to-be-included... -- an empty subdirectory
@item
...
...
@@ -3489,7 +3492,7 @@ make their own JDBC drivers, or just sniff).
Eight minor standalone utility programs.
@*@*
These
eight
programs are all standalone utilities, that is, they have
These programs are all standalone utilities, that is, they have
a main() function and their main role is to show information that the
MySQL server needs or produces. Most are unimportant. They are as
follows:
...
...
@@ -3503,7 +3506,7 @@ mysql_waitpid.c -- wait for a program to terminate
@item
perror.c -- "print error" -- given error number, display message
@item
replace.c -- replace strings in text files
replace.c -- replace strings in text files
or pipe
@item
resolve
_
stack
_
dump.c -- show symbolic info from a stack dump
@item
...
...
@@ -3562,7 +3565,7 @@ an "*" in the following list. For example, you will find that
@item
hp
_
block.c -- Read/write a block (i.e. a page)
@item
hp
_
clear.c -- Remove all records in the
database
hp
_
clear.c -- Remove all records in the
table
@item
hp
_
close.c -- * close database
@item
...
...
@@ -3578,7 +3581,7 @@ hp_info.c -- * Information about database status
@item
hp
_
open.c -- * open database
@item
hp
_
panic.c -- * the hp
_
panic routine,
probably for sudden shutdowns
hp
_
panic.c -- * the hp
_
panic routine,
for shutdowns and flushes
@item
hp
_
rename.c -- * rename a table
@item
...
...
@@ -3590,8 +3593,7 @@ hp_rlast.c -- * read last row with same key as previously-read row
@item
hp
_
rnext.c -- * read next row with same key as previously-read row
@item
hp
_
rprev.c -- * read previous row with same key as previously-read
row
hp
_
rprev.c -- * read previous row with same key as previously-read row
@item
hp
_
rrnd.c -- * read a row based on position
@item
...
...
@@ -3618,14 +3620,6 @@ for a \myisam\mi_cache.c equivalent (to cache reads) or a
\myisam\log
.c equivalent (to log statements).
@*@*
@subsection Images
Empty directory.
@*@*
There are no files in this directory.
@*@*
@subsection include
Include (*.h) files.
...
...
@@ -3940,25 +3934,23 @@ mi_dynrec.c -- functions to handle space-packed records and blobs
@item
mi
_
extra.c -- setting options and buffer sizes when optimizing
@item
mi
_
info.c --
"Ger tillbaka en struct med information om isam-filen"
mi
_
info.c --
return useful base information for an open table
@item
mi
_
key.c -- for handling keys
@item
mi
_
locking.c -- lock database
@item
mi
_
log.c -- save commands in log file which myisamlog program can
read
mi
_
log.c -- save commands in log file which myisamlog program can read
@item
mi
_
open.c -- open database
@item
mi
_
packrec.c --
compress records
mi
_
packrec.c --
read from a data file compresed with myisampack
@item
mi
_
page.c -- read and write pages containing keys
@item
mi
_
panic.c -- the mi
_
panic routine, probably for sudden shutdowns
@item
mi
_
range.c -- approximate count of how many records lie between two
keys
mi
_
range.c -- approximate count of how many records lie between two keys
@item
mi
_
rename.c -- rename a table
@item
...
...
@@ -4107,8 +4099,6 @@ There are other tests in these directories:
@item
sql-bench
@item
repl-tests
@item
tests
@end itemize
...
...
@@ -4275,8 +4265,7 @@ free"
@item
my
_
open.c -- Open a file
@item
my
_
os2cond.c -- OS2-specific: "A simple implementation of posix
conditions"
my
_
os2cond.c -- OS2-specific: "A simple implementation of posix conditions"
@item
my
_
os2dirsrch.c -- OS2-specific: Emulate a Win32 directory search
@item
...
...
@@ -4290,12 +4279,11 @@ my_os2thread.c -- OS2-specific: For thread handling
@item
my
_
os2tls.c -- OS2-specific: For thread-local storage
@item
my
_
port.c --
AIX-specific: my
_
ulonglong2double()
my
_
port.c --
OS/machine-dependent porting functions, e.g. AIX-specific my
_
ulonglong2double()
@item
my
_
pread.c -- Read a specified number of bytes from a file
@item
my
_
pthread.c -- A wrapper for thread-handling functions in different
OSs
my
_
pthread.c -- A wrapper for thread-handling functions in different OSs
@item
my
_
quick.c -- Read/write (labelled a "quicker" interface, perhaps
obsolete)
...
...
@@ -4317,15 +4305,13 @@ support them
@item
my
_
sleep.c -- Wait n microseconds
@item
my
_
static.c -- Static
-variable definitions
my
_
static.c -- Static
variables used by the mysys library
@item
my
_
symlink.c -- Read a symbolic link (symlinks are a UNIX thing, I
guess)
my
_
symlink.c -- Read a symbolic link (symlinks are a UNIX thing, I guess)
@item
my
_
symlink2.c -- Part 2 of my
_
symlink.c
@item
my
_
tempnam.c -- Obsolete temporary-filename routine used by ISAM
table handler
my
_
tempnam.c -- Obsolete temporary-filename routine used by ISAM table handler
@item
my
_
thr
_
init.c -- initialize/allocate "all mysys
&
debug thread
variables"
...
...
@@ -4442,9 +4428,8 @@ NetWare AMP" at:
New "RPM Package Manager" files.
@*@*
This directory is not part of the Windows distribution. Perhaps in
MYSQL's Linux distribution it has files for use with Red Hat
installations -- a point that needs checking someday.
This directory is not part of the Windows distribution. It is
a temporary directory used during RPM builds with Linux distributions.
@*@*
@subsection os2
...
...
@@ -4517,28 +4502,6 @@ This program calls the 'regcomp' function, which is the entry point in
\regex\regexp
.c.
@*@*
@subsection repl-tests
Test cases for replication.
@*@*
There are six short and trivial-looking tests in these subdirectories:
@itemize @bullet
@item
\test
-auto-inc -- Do auto-Increment columns work?
@item
\test
-bad-query -- Does insert in PK column work?
@item
\test
-dump -- Do LOAD statements work?
@item
\test
-repl -- Does replication work?
@item
\test
-repl-alter -- Does ALTER TABLE work?
@item
\test
-repl-ts -- Does TIMESTAMP column work?
@end itemize
@*@*
@subsection SCCS
Source Code Control System.
...
...
@@ -4554,8 +4517,8 @@ administration and are not of interest to application programmers.
SQL batches, e.g. for converting msql to MySQL.
@*@*
The *.sh filename extension
apparently stands for "shell script".
Linux
programmers use it where Windows programmers would use a *.bat
The *.sh filename extension
stands for "shell script". Linux
programmers use it where Windows programmers would use a *.bat
(batch filename extension).
@*@*
...
...
@@ -4564,10 +4527,9 @@ The *.sh files on this directory are:
@item
fill
_
help
_
tables.sh -- Create help-information tables and insert
@item
make
_
binary
_
distribution.sh -- Get configure information, make,
produce tar
make
_
binary
_
distribution.sh -- Get configure information, make, produce tar
@item
msql2mysql.sh -- Convert mSQL
to MySQL
msql2mysql.sh -- Convert mSQL
programs and scripts to MySQL, partly
@item
mysqlbug.sh -- Create a bug report and mail it
@item
...
...
@@ -4581,21 +4543,17 @@ mysqldumpslow.sh -- Parse and summarize the slow query log
@item
mysqlhotcopy.sh -- Hot backup
@item
mysql
_
config.sh -- Get configur
e information that client might need
mysql
_
config.sh -- Get configur
ation information that might be needed to compile a client
@item
mysql
_
convert
_
table
_
format.sh -- Conversion, e.g. from ISAM to
MyISAM
mysql
_
convert
_
table
_
format.sh -- Conversion, e.g. from ISAM to MyISAM
@item
mysql
_
explain
_
log.sh -- Put a log (made with --log) into a MySQL
table
mysql
_
explain
_
log.sh -- Put a log (made with --log) into a MySQL table
@item
mysql
_
find
_
rows.sh -- Search for queries containing <regexp>
@item
mysql
_
fix
_
extensions.sh -- Renames some file extensions, not
recommended
mysql
_
fix
_
extensions.sh -- Renames some file extensions, not recommended
@item
mysql
_
fix
_
privilege
_
tables.sh -- Fix mysql.user etc. if upgrading to
MySQL 3.23.14+
mysql
_
fix
_
privilege
_
tables.sh -- Fix mysql.user etc. if upgrading to MySQL 3.23.14+
@item
mysql
_
install
_
db.sh -- Create privilege tables and func table
@item
...
...
@@ -4629,16 +4587,15 @@ des_key_file.cc -- load DES keys from plaintext file
@item
field.cc -- "implement classes defined in field.h" (long)
@item
field
_
conv.cc -- functions to copy data
to or from fields
field
_
conv.cc -- functions to copy data
between fields
@item
filesort.cc -- sort
file
filesort.cc -- sort
a result set, using memory or temporary files
@item
frm
_
crypt.cc -- contains only one short function: get
_
crypt
_
for
_
frm
@item
gen
_
lex
_
hash.cc -- Knuth's algorithm from Vol 3 Sorting and
Searching, Chapter 6.3
gen
_
lex
_
hash.cc -- Knuth's algorithm from Vol 3 Sorting and Searching, Chapter 6.3
@item
gstream.cc -- GTextReadStream
gstream.cc -- GTextReadStream
, used to read GIS objects
@item
handler.cc -- handler-calling functions
@item
...
...
@@ -4674,7 +4631,7 @@ item_func.cc -- Numerical functions
@item
item
_
row.cc -- Row items for comparing rows and for IN on rows
@item
item
_
sum.cc -- Set functions (
sum, avg
, etc.)
item
_
sum.cc -- Set functions (
SUM, AVG
, etc.)
@item
item
_
strfunc.cc -- String functions
@item
...
...
@@ -4694,10 +4651,9 @@ log_event.cc -- Log event
@item
matherr.c -- Handling overflow, underflow, etc.
@item
mf
_
iocache.cc -- Caching of (sequential) reads
mf
_
iocache.cc -- Caching of (sequential) reads
and writes
@item
mini
_
client.cc -- Client included in server for server-server
messaging
mini
_
client.cc -- Client included in server for server-server messaging
@item
mysqld.cc -- Source of mysqld.exe
@item
...
...
@@ -4708,7 +4664,8 @@ net_serv.cc -- Read/write of packets on a network socket
nt
_
servc.cc -- Initialize/register/remove an NT service
@item
opt
_
ft.cc -- Create a FT or QUICK RANGE based on a key (very short)
* opt
_
range.cc -- Range of keys
@item
opt
_
range.cc -- Range of keys
@item
opt
_
sum.cc -- Optimize functions in presence of (implied) GROUP BY
@item
...
...
@@ -4716,17 +4673,15 @@ password.c -- Password checking
@item
procedure.cc -- Procedure
@item
protocol.cc -- Low level functions for storing data to be sent to
client
protocol.cc -- Low level functions for storing data to be sent to client
@item
records.cc -- Functions
to read, write, and lock records
records.cc -- Functions
for easy reading of records, possible through a cache
@item
repl
_
failsafe.cc -- Replication fail-save
repl
_
failsafe.cc -- Replication fail-save
(not yet implemented)
@item
set
_
var.cc --
MySQL variables
set
_
var.cc --
Set and retrieve MySQL user variables
@item
slave.cc -- Procedures for a slave in a master/slave (replication?)
relation
slave.cc -- Procedures for a slave in a master/slave (replication) relation
@item
spatial.cc -- Geometry stuff (lines, points, etc.)
@item
...
...
@@ -4736,8 +4691,7 @@ sql_analyse.cc -- Analyse an input string (?)
@item
sql
_
base.cc -- Basic functions needed by many modules
@item
sql
_
cache.cc -- SQL cache, with long comments about how caching
works
sql
_
cache.cc -- SQL query cache, with long comments about how caching works
@item
sql
_
class.cc -- SQL class
@item
...
...
client/mysqlbinlog.cc
View file @
294cc196
...
...
@@ -43,6 +43,7 @@ static const char* default_dbug_option = "d:t:o,/tmp/mysqlbinlog.trace";
void
sql_print_error
(
const
char
*
format
,
...);
static
bool
one_database
=
0
;
static
bool
force_opt
=
0
;
static
const
char
*
database
;
static
bool
short_form
=
0
;
static
ulonglong
offset
=
0
;
...
...
@@ -73,6 +74,9 @@ static struct my_option my_long_options[] =
{
"database"
,
'd'
,
"List entries for just this database (local log only)"
,
(
gptr
*
)
&
database
,
(
gptr
*
)
&
database
,
0
,
GET_STR_ALLOC
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"force-read"
,
'f'
,
"Force reading unknown binlog events"
,
(
gptr
*
)
&
force_opt
,
(
gptr
*
)
&
force_opt
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"help"
,
'?'
,
"Display this help and exit"
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"host"
,
'h'
,
"Get the binlog from server"
,
(
gptr
*
)
&
host
,
(
gptr
*
)
&
host
,
...
...
include/config-win.h
View file @
294cc196
...
...
@@ -145,6 +145,9 @@ typedef uint rf_SetTimer;
#define USE_MB_IDENT 1
#define USE_STRCOLL 1
/* If LOAD DATA LOCAL INFILE should be enabled by default */
#define ENABLED_LOCAL_INFILE 1
/* Convert some simple functions to Posix */
#define sigset(A,B) signal((A),(B))
...
...
sql/log_event.cc
View file @
294cc196
...
...
@@ -659,10 +659,19 @@ Log_event* Log_event::read_log_event(const char* buf, int event_len,
}
if
(
!
ev
||
!
ev
->
is_valid
())
{
*
error
=
"Found invalid event in binary log"
;
delete
ev
;
#ifdef MYSQL_CLIENT
if
(
!
force_opt
)
{
*
error
=
"Found invalid event in binary log"
;
return
0
;
}
ev
=
new
Unknown_log_event
(
buf
,
old_format
);
#else
*
error
=
"Found invalid event in binary log"
;
return
0
;
#endif
}
ev
->
cached_event_len
=
event_len
;
return
ev
;
}
...
...
@@ -1695,6 +1704,17 @@ void Execute_load_log_event::pack_info(String* packet)
}
#endif
#ifdef MYSQL_CLIENT
void
Unknown_log_event
::
print
(
FILE
*
file
,
bool
short_form
,
char
*
last_db
)
{
if
(
short_form
)
return
;
print_header
(
file
);
fputc
(
'\n'
,
file
);
fprintf
(
file
,
"# %s"
,
"Unknown event
\n
"
);
}
#endif
#ifndef MYSQL_CLIENT
int
Query_log_event
::
exec_event
(
struct
st_relay_log_info
*
rli
)
{
...
...
sql/log_event.h
View file @
294cc196
...
...
@@ -201,10 +201,10 @@ struct sql_ex_info
enum
Log_event_type
{
START_EVENT
=
1
,
QUERY_EVENT
=
2
,
STOP_EVENT
=
3
,
ROTATE_EVENT
=
4
,
INTVAR_EVENT
=
5
,
LOAD_EVENT
=
6
,
SLAVE_EVENT
=
7
,
CREATE_FILE_EVENT
=
8
,
APPEND_BLOCK_EVENT
=
9
,
EXEC_LOAD_EVENT
=
10
,
DELETE_FILE_EVENT
=
11
,
NEW_LOAD_EVENT
=
12
,
RAND_EVENT
=
13
UNKNOWN_EVENT
=
0
,
START_EVENT
=
1
,
QUERY_EVENT
=
2
,
STOP_EVENT
=
3
,
ROTATE_EVENT
=
4
,
INTVAR_EVENT
=
5
,
LOAD_EVENT
=
6
,
SLAVE_EVENT
=
7
,
CREATE_FILE_EVENT
=
8
,
APPEND_BLOCK_EVENT
=
9
,
EXEC_LOAD_EVENT
=
10
,
DELETE_FILE_EVENT
=
11
,
NEW_LOAD_EVENT
=
12
,
RAND_EVENT
=
13
};
enum
Int_event_type
...
...
@@ -714,4 +714,18 @@ public:
int
write_data
(
IO_CACHE
*
file
);
};
#ifdef MYSQL_CLIENT
class
Unknown_log_event
:
public
Log_event
{
public:
Unknown_log_event
(
const
char
*
buf
,
bool
old_format
)
:
Log_event
(
buf
,
old_format
)
{}
~
Unknown_log_event
()
{}
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
char
*
last_db
=
0
);
Log_event_type
get_type_code
()
{
return
UNKNOWN_EVENT
;}
bool
is_valid
()
{
return
1
;
}
};
#endif
#endif
/* _log_event_h */
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