- 21 Dec, 2006 1 commit
-
-
unknown authored
from log): When row-based logging is used, the CREATE-SELECT is written as two parts: as a CREATE TABLE statement and as the rows for the table. For both transactional and non-transactional tables, the CREATE TABLE statement was written to the transaction cache, as were the rows, and on statement end, the entire transaction cache was written to the binary log if the table was non-transactional. For transactional tables, the events were kept in the transaction cache until end of transaction (or statement that were not part of a transaction). For the case when AUTOCOMMIT=0 and we are creating a transactional table using a create select, we would then keep the CREATE TABLE statement and the rows for the CREATE-SELECT, while executing the following statements. On a rollback, the transaction cache would then be cleared, which would also remove the CREATE TABLE statement. Hence no table would be created on the slave, while there is an empty table on the master. This relates to BUG#22865 where the table being created exists on the master, but not on the slave during insertion of rows into the newly created table. This occurs since the CREATE TABLE statement were still in the transaction cache until the statement finished executing, and possibly longer if the table was transactional. This patch changes the behaviour of the CREATE-SELECT statement by adding an implicit commit at the end of the statement when creating non-temporary tables. Hence, non-temporary tables will be written to the binary log on completion, and in the even of AUTOCOMMIT=0, a new transaction will be started. Temporary tables do not commit an ongoing transaction: neither as a pre- not a post-commit. The events for both transactional and non-transactional tables are saved in the transaction cache, and written to the binary log at end of the statement. mysql-test/r/rpl_row_create_table.result: Result change mysql-test/t/rpl_row_create_table.test: Requring InnoDB for slave as well. Adding test CREATE-SELECT that is rolled back explicitly. Changing binlog positions. sql/log.cc: Adding helper class to handle lock/unlock of mutexes using RAII. Factoring out code into write_cache() function to transaction cache to binary log. Adding function THD::binlog_flush_transaction_cache() to flush the transaction cache to the binary log file. Factoring out code into binlog_set_stmt_begin() to set the beginning of statement savepoint. Clearing before statement point when transaction cache is truncated so that these points are out of range. sql/log.h: Adding method MYSQL_BIN_LOG::write_cache() sql/log_event.h: Replicating OPTION_NOT_AUTOCOMMIT flag (see changeset comment) sql/mysql_priv.h: Although left-shifting signed integer values is well-defined, it has potential for strange errors. Using unsigned long long instead of signed long long since this is the type of the options flags. sql/slave.cc: Adding printout of transaction-critical thread flags. sql/sql_class.h: Adding function THD::binlog_flush_transaction_cache() Adding function THD::binlog_set_stmt_begin() sql/sql_insert.cc: Adding code to cache events for a CREATE-SELECT statement. Disabling binlog for SBR (but not RBR) when sending error for select part of CREATE-SELECT statement. Adding implicit commit at end of statement for non-temporary tables. mysql-test/t/rpl_row_create_table-slave.opt: New BitKeeper file ``mysql-test/t/rpl_row_create_table-slave.opt''
-
- 12 Oct, 2006 1 commit
-
-
unknown authored
into mysql.com:/usr/home/bar/mysql-5.1-rpl mysql-test/r/ctype_ucs.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/mi_open.c: Auto merged
-
- 11 Oct, 2006 1 commit
-
-
unknown authored
into mysql.com:/usr/home/bar/mysql-5.0-rpl.b22052
-
- 10 Oct, 2006 13 commits
-
-
unknown authored
into mysql.com:/home/bk/MERGE/mysql-5.1-merge include/my_sys.h: Auto merged mysql-test/t/view.test: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/share/errmsg.txt: Auto merged sql/slave.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged
-
unknown authored
into mysql.com:/home/bk/MERGE/mysql-5.0-merge
-
unknown authored
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb storage/ndb/tools/restore/restore_main.cpp: Auto merged
-
unknown authored
ndb_restore Return OK even if temporary errors (otherwise mysql-test-run/ndb_restore can fail on really slow machines) storage/ndb/tools/restore/restore_main.cpp: Return OK even if temporary errors
-
unknown authored
into romeo.(none):/home/bk/b21474-mysql-5.1-new-rpl sql/log_event.cc: Auto merged
-
unknown authored
Removing code to step the group log position and just stepping the event log position. If the group log position were stepped one time too many, it might be that the group starts at a position that is not possible, e.g., at a Rows_log_event, or between an Intvar_log_event and the following associated Query_log_event. sql/log_event.cc: Removing code to step the group log position and just stepping the event log position. If the group log position were stepped one time too many, it might be that the group starts at a position that is not possible, e.g., at a Rows_log_event, or between an Intvar_log_event and the following associated Query_log_event. sql/slave.cc: Removing code to step the group log position and just stepping the event log position when executing a Format_description_log_event. If the group log position were stepped one time too many, it might be that the group starts at a position that is not possible, e.g., at a Rows_log_event, or between an Intvar_log_event and the following associated Query_log_event.
-
unknown authored
sql/log_event.cc: Adding casts to make it compile on Windows.
-
unknown authored
Replacing C++ code with C code in a C file. mysys/mf_iocache2.c: There shall not be C++ code in C files.
-
unknown authored
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged mysql-test/r/csv.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_time.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_view.cc: Auto merged sql/table.cc: Auto merged storage/csv/ha_tina.cc: Auto merged storage/innobase/btr/btr0btr.c: Auto merged storage/innobase/buf/buf0buf.c: Auto merged storage/innobase/dict/dict0dict.c: Auto merged storage/innobase/fil/fil0fil.c: Auto merged storage/innobase/fsp/fsp0fsp.c: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged storage/innobase/include/btr0cur.ic: Auto merged storage/innobase/log/log0log.c: Auto merged storage/innobase/log/log0recv.c: Auto merged storage/innobase/os/os0file.c: Auto merged storage/innobase/row/row0mysql.c: Auto merged storage/innobase/row/row0sel.c: Auto merged storage/innobase/srv/srv0start.c: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged tests/mysql_client_test.c: Auto merged
-
unknown authored
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
-
unknown authored
into perch.ndb.mysql.com:/home/jonas/src/51-work storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged storage/ndb/test/ndbapi/testTimeout.cpp: Auto merged
-
unknown authored
fix bug in test prg
-
unknown authored
fix bug in handling of inactive timeout for scan, when all is delivered ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: 1) set timeout if all scans are at api 2) Use c_appl_timeout_value when getting scan timeout ndb/test/ndbapi/testTimeout.cpp: test program
-
- 09 Oct, 2006 1 commit
-
-
unknown authored
mysql-test/t/view.test: Switching to using symbolic error numbers instead of numbers. Using numbers caused test to fail.
-
- 08 Oct, 2006 3 commits
-
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/engines/mysql-5.1-engines storage/myisammrg/ha_myisammrg.cc: Auto merged
-
unknown authored
-
unknown authored
into may.pils.ru:/home/svoj/devel/bk/mysql-5.1-engines sql/sql_update.cc: Auto merged sql/share/errmsg.txt: Auto merged storage/csv/ha_tina.cc: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged mysql-test/r/windows.result: Use remote. mysql-test/t/windows.test: Use remote.
-
- 06 Oct, 2006 15 commits
-
-
unknown authored
into romeo.(none):/home/bk/b19459-mysql-5.1-new client/mysqlbinlog.cc: Auto merged include/my_sys.h: Auto merged mysys/base64.c: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged sql/share/errmsg.txt: SCCS merged
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.1-engines storage/myisammrg/ha_myisammrg.cc: Auto merged
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.0-engines sql/ha_myisammrg.cc: Manual merge.
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines
-
unknown authored
This is addition to fix for bug21617. Valgrind reports an error when opening merge table that has underlying tables with less indexes than in a merge table itself. Copy at most min(file->keys, table->key_parts) elements from rec_per_key array. This fixes problems when merge table and subtables have different number of keys. sql/ha_myisammrg.cc: Copy at most min(file->keys, table->key_parts) elements from rec_per_key array. This fixes problems when merge table and subtables have different number of keys.
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.1-engines mysql-test/r/ndb_update.result: SCCS merged
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines mysql-test/r/ndb_update.result: Auto merged mysql-test/t/ndb_update.test: Auto merged
-
unknown authored
-
unknown authored
crash for, e.g., NDB): Before, mysqlbinlog printed table map events as a separate statement, so when executing the event, the opened table was subsequently closed when the statement ended. Instead, the row-based events that make up a statement are now printed as *one* BINLOG statement, which means that the table maps and the following *_rows_log_event events are executed fully before the statement ends. Changing implementation of BINLOG statement to be able to read the emitted format, which now consists of several chunks of BASE64-encoded data. client/mysqlbinlog.cc: Using IO_CACHE to print events instead of directly to file. Factoring out code to write event header and base64 representation into separate function. mysys/mf_iocache2.c: Correcting name in documentation. sql/log_event.cc: Adding class Write_on_release_cache that holds an IO_CACHE and that will write contents of IO_CACHE to a designated file on destruction. Changing signature of event printing functions print_header() and print_base64() to write to IO_CACHE and changing *all* calls in those functions in accordance. This means that all printing functions now print to an IO_CACHE instead of to a file, and that the IO_CACHE is then copied to the file. The print() function have the same signature as before, but since it is using print_header() and print_base64(), the data will now be printed to an IO_CACHE and then copied to the file. Changing row-based replication events to incrementally build one BINLOG statement for all events making up a statement. sql/log_event.h: Changing signature of event printing functions print_header() and print_base64() to write to an IO_CACHE instead of a file. Changing row-based replication events to incrementally build one BINLOG statement for all events making up a statement. Adding a head_cache and a body_cache to cache statement comment and statement body respectively. In addition, the head_cache is used when printing other events than the RBR events. sql/sql_binlog.cc: Changing code to be able to decode several pieces of base64-encoded data for a BINLOG statement. The BINLOG statement now consists of several pieces of BASE64-encoded data, so once a block has been decoded and executed, the next block has to be read from the statement until there is no more data to read.
-
unknown authored
> sizeof(unsigned long). sql/log.cc: Replacing enum constant that contained an unsigned long long constant on some platforms with a macro (an enumeration constant is limited to the range of values covered by signed or unsigned long).
-
unknown authored
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.1-engines mysql-test/r/merge.result: Manual merge. sql/share/errmsg.txt: Manual merge.
-
unknown authored
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.0-engines BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e: Auto merged mysql-test/r/merge.result: Manual merge.
-
unknown authored
-
- 05 Oct, 2006 5 commits
-
-
unknown authored
-
unknown authored
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.1-engines mysql-test/r/ndb_update.result: Auto merged sql/sql_update.cc: Manual merge.
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines mysql-test/r/ndb_update.result: Auto merged mysql-test/t/ndb_update.test: Auto merged sql/sql_update.cc: Manual merge.
-
unknown authored
into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-4.1-engines
-