binlog coordinates corresponding to the dump".
The good news is that now mysqldump can be used to get an online backup of InnoDB *which works for
point-in-time recovery and replication slave creation*. Formerly, mysqldump --master-data --single-transaction
used to call in fact mysqldump --master-data, so the dump was not an online dump (took big lock all time of dump).
The only lock which is now taken in this patch is at the beginning of the dump: mysqldump does:
FLUSH TABLES WITH READ LOCK; START TRANSACTION WITH CONSISTENT SNAPSHOT; SHOW MASTER STATUS; UNLOCK TABLES;
so the lock time is in fact the time FLUSH TABLES WITH READ LOCK takes to return (can be 0 or very long, if
a table is undergoing a huge update).
I have done some more minor changes listed in the paragraph of mysqldump.c.
WL#2237 "WITH CONSISTENT SNAPSHOT clause for START TRANSACTION":
it's a START TRANSACTION which additionally starts a consistent read on all
capable storage engine (i.e. InnoDB). So, can serve as a replacement for
BEGIN; SELECT * FROM some_innodb_table LIMIT 1; which starts a consistent read too.
client/mysqldump.c:
Main change: mysqldump --single-transaction --master-data is now able to, at the same time,
take an online dump of InnoDB (using consistent read) AND get the binlog position corresponding to this dump
(before, using the two options used to silently cancel --single-transaction).
This uses the new START TRANSACTION WITH CONSISTENT SNAPSHOT syntax.
Additional changes:
a) cleanup:
- DBerror calls exit() so some code was unneeded
- no need to call COMMIT at end, leave disconnection do the job
- mysql_query_with_error_report()
b) requirements I had heard from colleagues:
- --master-data now requires an argument, to comment out ("--") the CHANGE MASTER or not
(commenting had been asked for point-in-time recovery when replication is not necessary).
- --first-slave is renamed to --lock-all-tables
c) more sensible behaviours (has been discussed internally):
- if used with --master-data, --flush-logs is probably intended to get a flush synchronous
with the dump, not one random flush per dumped db.
- disabled automatic reconnection as, at least, SQL_MODE would be lost (and also, depending
on options, LOCK TABLES, BEGIN, FLUSH TABLES WITH READ LOCK).
include/mysqld_error.h:
an error if START TRANSACTION WITH CONSISTENT SNAPSHOT is called and there is no consistent-read capable storage engine
(idea ((C) PeterG) is that it's a bit like CREATE TABLE ENGINE=InnoDB when there is no support for InnoDB).
sql/handler.cc:
new ha_start_consistent_snapshot(), which, inside an existing transaction, starts a consistent read
(offers an alternative to SELECTing any InnoDB table). Does something only for InnoDB.
Warning if no suitable engine supported.
sql/handler.h:
declarations
sql/lex.h:
symbols for lex
sql/share/czech/errmsg.txt:
new message
sql/share/danish/errmsg.txt:
new message
sql/share/dutch/errmsg.txt:
new message
sql/share/english/errmsg.txt:
new message
sql/share/estonian/errmsg.txt:
new message
sql/share/french/errmsg.txt:
new message
sql/share/german/errmsg.txt:
new message
sql/share/greek/errmsg.txt:
new message
sql/share/hungarian/errmsg.txt:
new message
sql/share/italian/errmsg.txt:
new message
sql/share/japanese/errmsg.txt:
new message
sql/share/korean/errmsg.txt:
new message
sql/share/norwegian-ny/errmsg.txt:
new message
sql/share/norwegian/errmsg.txt:
new message
sql/share/polish/errmsg.txt:
new message
sql/share/portuguese/errmsg.txt:
new message
sql/share/romanian/errmsg.txt:
new message
sql/share/russian/errmsg.txt:
new message
sql/share/serbian/errmsg.txt:
new message
sql/share/slovak/errmsg.txt:
new message
sql/share/spanish/errmsg.txt:
new message
sql/share/swedish/errmsg.txt:
new message
sql/share/ukrainian/errmsg.txt:
new message
sql/sql_lex.h:
new option in lex (transaction options)
sql/sql_parse.cc:
warning comment (never make UNLOCK TABLES commit a transaction, please);
support for starting consistent snapshot.
sql/sql_yacc.yy:
new clause WITH CONSISTENT SNAPSHOT (syntax ok'd by PeterG) for START TRANSACTION.
not know there's rollback (if it's because of a dupl row), better warn
that it's happening. It can also be of use for a DBA killing a
connection and wondering what this connection is still doing now. Example:
| 5 | root | localhost | test | Killed | 10 | Rolling back | insert into i select * from j |
sql/handler.cc:
As rollback can be 30 times slower than insert in InnoDB, and user may
not know there's rollback (if it's because of a dupl row), better warn.
Do not print to .err log about discarding ibuf entries in DISCARD TABLESPACE; removed compiler warning about unused variable
innobase/ibuf/ibuf0ibuf.c:
Do not print to .err log about discarding ibuf entries in DISCARD TABLESPACE; removed compiler warning about unused variable
ndb/src/ndbapi/ndberror.c:
826 error text
mysql-test/r/ndb_blob.result:
result displayed error
mysql-test/t/ndb_blob.test:
result displayed error
ndb/src/ndbapi/NdbBlob.cpp:
update head+inline earlier
ndb/src/ndbapi/NdbOperationExec.cpp:
blob IgnoreError bug
ndb/test/ndbapi/testBlobs.cpp:
tried to set non-nullable to null, causing a complex abort case
ndb/src/ndbapi/NdbConnection.cpp:
prepared ops CAN be left in complex abort
The idea of the fix is that the administrative statements
OPTIMIZE TABLE, REPAIR TABLE and ANALYZE TABLE should not
generate binlog errors if there is no errors on the master.
sql/sql_parse.cc:
No binlog error generated
sql/sql_table.cc:
Documentation
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Bug #6045: Binary Comparison regression in MySQL 4.1
Binary searches didn't use a case insensitive index, now they do.
mysql-test/t/range.test:
Bug #6045: Binary Comparison regression in MySQL 4.1
Binary searches didn't use a case insensitive index, now they do.
mysql-test/r/range.result:
Bug #6045: Binary Comparison regression in MySQL 4.1
Binary searches didn't use a case insensitive index, now they do.
sql/opt_range.cc:
Bug #6045: Binary Comparison regression in MySQL 4.1
Binary searches didn't use a case insensitive index, now they do.
remove compiler warning
patch for my_vsnprintf not dully implemented
patch for platfroms that return -1 on snprintf overflow
compile fix for hpux
configure.in:
add compile flad -DSNPRINTF_RETURN_TRUNC on hp ux 11
ndb/src/common/editline/sysunix.c:
remove compiler warning
ndb/src/common/util/basestring_vsnprintf.c:
patch for my_vsnprintf not dully implemented
patch for platfroms that return -1 on snprintf overflow
ndb/src/kernel/vm/Emulator.hpp:
compile fix for hpux
ndb/src/mgmsrv/Services.cpp:
compile fix for hp ux
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
remove compiler warning
Added protocol::flush() for easier embedded-server code
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
Added option --silent to client_test
client/mysqltest.c:
Removed compiler warning
Fixed identation & comments from earlier push
Renamed variable 'disable_abort_on_error' to 'abort_on_error'
Ensure that '$mysql_errno' also with --ps-protocol
include/mysql_com.h:
Removed special handling of net_flush for embedded server
mysql-test/r/mysqltest.result:
Remove usage of !$ in tests
mysql-test/t/client_test.test:
Use --silent
mysql-test/t/comments.test:
Remove usage of !$ in tests
mysql-test/t/join_outer.test:
Remove usage of !$ in tests
mysql-test/t/key.test:
Remove usage of !$ in tests
mysql-test/t/mysqltest.test:
Remove usage of !$ in tests
mysql-test/t/show_check.test:
Remove usage of !$ in tests
mysql-test/t/temp_table.test:
Remove usage of !$ in tests
mysql-test/t/type_ranges.test:
Remove usage of !$ in tests
sql/mysqld.cc:
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
sql/net_serv.cc:
Remove special usage of net_flush in embedded server
sql/protocol.cc:
Added protocol::flush() for easier embedded-server code
sql/protocol.h:
Added protocol::flush() for easier embedded-server code
sql/sql_prepare.cc:
Added protocol::flush() for easier embedded-server code
Remove one extra flush() for prepared statements
sql/sql_show.cc:
Added protocol::flush() for easier embedded-server code
tests/client_test.c:
Added option --silent
mysql-test/r/ps_10nestset.result:
Result of expanded test: "MOD" on non-integral first operand.
mysql-test/t/ps_10nestset.test:
Use the newly expanded "MOD" operator (non-integral first operand, bug#6138).
Fix so that signed/unsigned char does not matter in comparision
ndb/src/ndbapi/NdbOperationExec.cpp:
Fix so that signed/unsigned char does not matter in comparision
Allow mixing of different character sets for more SQL functions.
item_func.h:
Allow mixing of different character sets for more SQL functions..
sql/item_cmpfunc.cc:
Allow mixing of different character sets for more SQL functions.
sql/item_func.cc:
Allow mixing of different character sets for more SQL functions.
sql/item_func.h:
Allow mixing of different character sets for more SQL functions..
sql/item_strfunc.cc:
Allow mixing of different character sets for more SQL functions.
sql/item.cc:
Allow mixing of different character sets for more SQL functions.
sql/item.h:
Allow mixing of different character sets for more SQL functions.
mysql-test/t/ctype_recoding.test:
Allow mixing of different character sets for more SQL functions.
mysql-test/r/ctype_recoding.result:
Allow mixing of different character sets for more SQL functions.
bug #6380: mysqlcheck --help prints wrong --debug msg for non-debug version).
client/mysqlcheck.c:
A fix (bug #6380: mysqlcheck --help prints wrong --debug msg for non-debug version).
myisam/myisamchk.c:
A fix (bug #6309: myisamchk compiled without debug support , --help shows vise versa).
Raise fatal semaphore wait timeout to 2 hours when we are printing the InnoDB table monitor output
innobase/dict/dict0load.c:
Raise fatal semaphore wait timeout to 2 hours when we are printing the InnoDB table monitor output
Build-tools/mysql-copyright:
Auto merged
Docs/Support/texi2html:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/eval/eval0eval.c:
Auto merged
innobase/pars/pars0pars.c:
Auto merged
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
strings/ctype-sjis.c:
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
mysql-test/t/ctype_sjis.test:
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
mysql-test/r/ctype_sjis.result:
Bug #6223 Japanese half-width kana characters get truncated. Bytes 0xA1..0xDF were not treated as a single byte sequence in a mistake.
having approval for it since 4.1.4, I also have some assurance that
very few people actually used this: to enable these calls a user
had to #define HAVE_DEPRECATED_411_API and recompile the client library.
include/mysql.h:
remove defines for obsolete 4.1 prepared statements C API names
libmysql/libmysql.c:
Remove #ifdefed implementation of obsolete mysql_prepare call.
added flag on sun forte, -instances=static
(check is only made for "non-gcc", hopefully enough)
configure.in:
added flag on sun forte, -instances=static
(check is only made for "non-gcc", hopefully enough)
changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC
added define NDB_INIT
removed getarg, strlcat, strlcpy
aligned ndb version with mysql version
cpcd: removed old way of reading config file and replaced with mysql load_defaults
changed from using getarg to my_getopts
use mysql my_progname
moved getarg to test
BitKeeper/deleted/.del-strlcat.c~250851f8f1ac1c2c:
Delete: ndb/src/common/util/strlcat.c
BitKeeper/deleted/.del-strlcpy.c~43266e312d11c47b:
Delete: ndb/src/common/util/strlcpy.c
ndb/test/include/getarg.h:
Rename: ndb/include/util/getarg.h -> ndb/test/include/getarg.h
configure.in:
aligned ndb versioning with mysql
changed define SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC
ndb/include/ndb_global.h:
added define NDB_INIT
removed strlcpy, strlcat
ndb/src/common/editline/sysunix.c:
removed usage of strlcat
ndb/src/common/util/Makefile.am:
removed getarg, strlcat, strlcpy
ndb/src/common/util/basestring_vsnprintf.c:
changed define from SNPRINTF_RETURN_ZERO to SNPRINTF_RETURN_TRUNC
ndb/src/common/util/socket_io.cpp:
removed usage of strlcat
ndb/src/common/util/version.c:
aligned ndb version with mysql version
ndb/src/cw/cpcd/common.cpp:
removed old way of reading config file and replaced with mysql load_defaults
ndb/src/cw/cpcd/common.hpp:
removed old way of reading config file and replaced with mysql load_defaults
ndb/src/cw/cpcd/main.cpp:
changed from usin getarg to my_opts
ndb/src/kernel/blocks/backup/restore/main.cpp:
changed from usin getarg to my_opts
ndb/src/kernel/error/ErrorReporter.cpp:
use mysql my_progname
ndb/src/kernel/main.cpp:
removed const in main declaration
ndb/src/kernel/vm/Configuration.cpp:
changed from usin getarg to my_opts
ndb/src/kernel/vm/Configuration.hpp:
removed const in main declaration
ndb/src/mgmclient/main.cpp:
changed from usin getarg to my_opts
ndb/src/mgmsrv/main.cpp:
changed from usin getarg to my_opts
ndb/src/ndbapi/Ndb.cpp:
fixed compiler warnings
ndb/test/run-test/Makefile.am:
moved getarg to test
ndb/test/src/Makefile.am:
moved getarg to test
ndb/test/src/getarg.c:
moved strlcat and strlcpy into getarg.c
ndb/tools/delete_all.cpp:
changed from usin getarg to my_opts
ndb/tools/desc.cpp:
changed from usin getarg to my_opts
ndb/tools/drop_index.cpp:
changed from usin getarg to my_opts
ndb/tools/drop_tab.cpp:
changed from usin getarg to my_opts
ndb/tools/listTables.cpp:
changed from usin getarg to my_opts
ndb/tools/select_all.cpp:
changed from usin getarg to my_opts
ndb/tools/select_count.cpp:
changed from usin getarg to my_opts
ndb/tools/waiter.cpp:
changed from usin getarg to my_opts