mariadb/client
unknown 313ce62f70 WL#1596 "make mysqldump --master-data --single-transaction able to do online dump of InnoDB AND report reliable
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.
2004-11-10 17:56:45 +01:00
..
.cvsignore
client_priv.h Dumping BLOBs in HEX notation. The patch was orinigally 2004-10-19 10:40:59 +05:00
completion_hash.cc upgrade readline to version 4.3 2002-11-19 18:26:53 +04:00
completion_hash.h upgrade readline to version 4.3 2002-11-19 18:26:53 +04:00
get_password.c Merge with 4.0.14 2003-08-11 22:44:43 +03:00
Makefile.am A lot of fixes for prepared statements (PS): 2004-10-26 19:30:01 +03:00
my_readline.h mysql.cc: 2004-05-05 22:47:09 +02:00
mysql.cc Fix compiler warnings (detected by Intel's C++ compiler) 2004-10-22 18:44:51 +03:00
mysqladmin.c Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1 2004-10-07 22:09:14 +03:00
mysqlbinlog.cc Merge with 4.0 2004-09-01 04:12:09 +03:00
mysqlcheck.c A fix (bug #6309: myisamchk compiled without debug support , --help shows vise versa 2004-11-02 13:14:07 +04:00
mysqldump.c WL#1596 "make mysqldump --master-data --single-transaction able to do online dump of InnoDB AND report reliable 2004-11-10 17:56:45 +01:00
mysqlimport.c Review of all code pushed since last review 2004-10-20 01:28:42 +03:00
mysqlmanager-pwgen.c Merge with 4.0 2004-09-01 04:12:09 +03:00
mysqlmanagerc.c Added global my_getopt_error_reporter function pointer which is 2004-08-31 21:27:58 +05:00
mysqlshow.c Fixed a bug in password handling. All related to Bug#5955. 2004-10-07 22:08:17 +03:00
mysqltest.c Remove usage of !$ from mysql-tests 2004-11-02 20:13:27 +02:00
readline.cc mysql.cc: 2004-05-05 22:47:09 +02:00
sql_string.cc just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
sql_string.h Cleanup after split of libmysql.c to client.c and libmysql.c. A 4.1 master/slave will now use the 4.1 protocol 2003-06-14 11:37:42 +03:00