1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#19995 (Extreneous table maps generated for statements that do not generate rows):

Switched to writing out table maps for tables that are locked when
the first row in a statement is seen.


mysql-test/include/master-slave.inc:
  Moved code to reset master and slave into separate file.
mysql-test/r/binlog_row_blackhole.result:
  Result change
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change
mysql-test/r/ndb_binlog_ignore_db.result:
  Result change
mysql-test/r/rpl_ndb_charset.result:
  Result change
mysql-test/r/rpl_row_basic_11bugs.result:
  Result change
mysql-test/r/rpl_row_charset.result:
  Result change
mysql-test/r/rpl_row_create_table.result:
  Result change
mysql-test/t/rpl_row_basic_11bugs.test:
  Added test to check that no events are generated when no rows are changed.
mysql-test/t/rpl_row_create_table.test:
  Master log position changed
sql/handler.cc:
  Adding function write_locked_table_maps() that will write table maps for all
  tables locked for write.
  Using "table->in_use" instead of "current_thd" since tables are now locked
  when the function is called.
  Removing old code to write table map.
sql/log_event.cc:
  Added assertion
sql/sql_class.cc:
  Removing code to write "dummy termination event".
sql/sql_class.h:
  Adding getter for binlog_table_maps.
sql/sql_insert.cc:
  Setting thd->lock before calling write_record for the execution of
  CREATE-SELECT and INSERT-SELECT since they keep multiple locks in the
  air at the same time.
mysql-test/include/master-slave-reset.inc:
  New BitKeeper file ``mysql-test/include/master-slave-reset.inc''
This commit is contained in:
unknown
2006-05-31 19:21:52 +02:00
parent 39b6d186e8
commit e9b5cafa8b
16 changed files with 197 additions and 166 deletions

View File

@ -127,7 +127,7 @@ NULL 5 10
NULL 6 12
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
SHOW BINLOG EVENTS FROM 1326;
SHOW BINLOG EVENTS FROM 1256;
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
@ -137,11 +137,11 @@ a b
1 2
2 4
3 6
SHOW BINLOG EVENTS FROM 1326;
SHOW BINLOG EVENTS FROM 1256;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1326 Query 1 1426 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1426 Table_map 1 1466 table_id: # (test.t7)
master-bin.000001 1466 Write_rows 1 1522 table_id: # flags: STMT_END_F
master-bin.000001 1256 Query 1 1356 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
master-bin.000001 1356 Table_map 1 1396 table_id: # (test.t7)
master-bin.000001 1396 Write_rows 1 1452 table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@ -154,10 +154,10 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SHOW BINLOG EVENTS FROM 1522;
SHOW BINLOG EVENTS FROM 1452;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1522 Table_map 1 1562 table_id: # (test.t7)
master-bin.000001 1562 Write_rows 1 1618 table_id: # flags: STMT_END_F
master-bin.000001 1452 Table_map 1 1492 table_id: # (test.t7)
master-bin.000001 1492 Write_rows 1 1548 table_id: # flags: STMT_END_F
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@ -191,10 +191,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW BINLOG EVENTS FROM 1618;
SHOW BINLOG EVENTS FROM 1548;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 1618 Query 1 1704 use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 1704 Query 1 1843 use `test`; CREATE TABLE `t9` (
master-bin.000001 1548 Query 1 1634 use `test`; CREATE TABLE t8 LIKE t4
master-bin.000001 1634 Query 1 1773 use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
)