Commit graph

15643 commits

Author SHA1 Message Date
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
unknown
c4d04e9ec1 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
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.
2004-11-08 21:45:23 +01:00
unknown
6449cd15e6 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-clean
2004-11-03 23:41:41 +01:00
unknown
66191b2244 ibuf0ibuf.c:
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
2004-11-04 00:10:00 +02:00
unknown
64233859cd Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-clean
2004-11-03 22:44:51 +01:00
unknown
35ded49263 NDB blobs - try to handle insert-update-delete under autocommit=0
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
2004-11-03 20:21:56 +01:00
unknown
dc1e7edb7f Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b5551-4.1-v4
2004-11-03 18:24:44 +01:00
unknown
539e2130b0 Fix for bug#5551 (Version 4).
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
2004-11-03 18:23:58 +01:00
unknown
0afed4c3eb opt_range.cc, range.result, 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/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.
2004-11-03 15:22:33 +04:00
unknown
78c4faa297 bad automerge (?) fixed 2004-11-02 23:34:40 +01:00
unknown
a614bc9b59 one more name clash in public includes fixed
http://lists.mysql.com/internals/18149
2004-11-02 22:46:55 +01:00
unknown
5ff32da265 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/mysqld.cc:
  Auto merged
configure.in:
  Auto merged
2004-11-02 21:40:55 +02:00
unknown
bc0988c2d3 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-11-02 19:40:54 +00:00
unknown
5c6cd1f796 add compile flad -DSNPRINTF_RETURN_TRUNC on hp ux 11
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
2004-11-02 19:40:10 +00:00
unknown
505caa2879 Remove usage of !$ from mysql-tests
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
2004-11-02 20:13:27 +02:00
unknown
0920d479a1 Merge build.mysql.com:/home/bk/mysql-4.1
into build.mysql.com:/users/rburnett/mysql-4.1-current
2004-11-02 18:37:25 +01:00
unknown
55de702588 Bug# 5303 Windows --log-error option doesn't work correctly
sql/mysqld.cc:
  changed to open log_error_file instead of "mysql.err" on Windows
2004-11-02 18:18:21 +01:00
unknown
3200d66f85 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


innobase/dict/dict0load.c:
  Auto merged
2004-11-02 18:54:16 +02:00
unknown
2ddf5682e1 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/mysql-4.1
2004-11-02 16:25:48 +01:00
unknown
6b53505f60 Test expansion: "MOD" on non-integral first operand.
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).
2004-11-02 15:09:57 +01:00
unknown
03a91f9bb7 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/pekka/ndb/version/my41
2004-11-02 14:25:30 +01:00
unknown
5f154fa090 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
2004-11-02 14:03:23 +01:00
unknown
edca1f6a0c build issue
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
2004-11-02 13:58:22 +01:00
unknown
d5121051f2 NDB fix blob parts distribution - backwards compatible
ndb/src/ndbapi/NdbBlob.cpp:
  fix blob parts distribution - backwards compatible
2004-11-02 13:15:55 +01:00
unknown
37e92c9b3c Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1
2004-11-02 16:02:52 +04:00
unknown
fc04692c8b Many files:
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.
2004-11-02 16:02:12 +04:00
unknown
502300b800 Merge heikki@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-4.1
2004-11-02 13:35:14 +02:00
unknown
b3042ccbb4 ha_innodb.cc:
Correct English grammar


sql/ha_innodb.cc:
  Correct English grammar
2004-11-02 13:34:11 +02:00
unknown
0d92f0c777 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b6309
2004-11-02 14:50:26 +04:00
unknown
7e06386ae1 A fix (bug #6309: myisamchk compiled without debug support , --help shows vise versa
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).
2004-11-02 13:14:07 +04:00
unknown
6a0ce3adbc dict0load.c:
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
2004-11-02 09:46:23 +02:00
unknown
94839ddf5e merge with 4.0
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
2004-11-02 08:58:45 +02:00
unknown
46aa022aa6 ctype_sjis.result, ctype_sjis.test, 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.


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.
2004-11-02 09:00:46 +04:00
unknown
f8a875a238 removed unused member variable (probably causing some of the problems we've seen with ndb_mgmd) 2004-11-01 22:27:29 +00:00
unknown
b41b45309f Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-11-01 18:26:57 +00:00
unknown
727f7a85c8 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-11-01 18:22:34 +00:00
unknown
bf30b006d3 fix for solaris forte -instances=static
added libNDBT.a
   removed printout
    fixed error that ndb_show_tables required table name


configure.in:
  fix for solaris forte -instances=static
ndb/test/run-test/Makefile.am:
  added libNDBT.a
ndb/tools/drop_tab.cpp:
  removed printout
ndb/tools/listTables.cpp:
  removed printout
  fixed error that ndb_show_tables required table name
ndb/tools/waiter.cpp:
  removed printout
2004-11-01 18:21:57 +00:00
unknown
55974b50bf Remove support for obsolete 4.1.1 prepared statements C API names:
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.
2004-11-01 19:01:50 +03:00
unknown
04ff58d5e4 NDB blobs restore backwards compatibility
ndb/src/ndbapi/NdbBlob.cpp:
  restore backwards compatibility
2004-11-01 16:04:36 +01:00
unknown
62f23cadd8 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/pekka/ndb/version/my41
2004-11-01 15:43:54 +01:00
unknown
a38490bb03 fix call of string::copy() if HAVE_FCONVERT is set 2004-11-01 14:43:53 +00:00
unknown
33db63505d Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-11-01 14:28:29 +00:00
unknown
740fc88e7f Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-11-01 14:25:40 +00:00
unknown
075cee0d49 configure.in:
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)
2004-11-01 14:25:07 +00:00
unknown
206281e421 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-11-01 13:58:35 +00:00
unknown
3302dee5c6 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-11-01 13:56:15 +00:00
unknown
a2e4768f20 aligned ndb versioning with mysql
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
2004-11-01 13:55:43 +00:00
unknown
52487afa1f NDB blob fixes. INCOMPATIBLE with existing blobs
ndb/src/ndbapi/NdbBlob.cpp:
  misplaced code line + change blob tabledist
ndb/test/ndbapi/testBlobs.cpp:
  misplaced code line + change blob tabledist
2004-11-01 13:01:20 +01:00
unknown
3ba04dced3 Removed old not used/illegal declaration 2004-11-01 12:49:38 +01:00
unknown
77974c3ada Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
2004-11-01 10:51:44 +01:00