summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2019-07-15 13:30:10 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2019-07-15 13:30:10 +0530
commit10ebdb7f1d7a3f6aa6a91b40a9d90f482da08e58 (patch)
tree93f0f6a2db5cd1457796944e1dacaeddcfd4b452 /client
parentaba2b41e9ed3a309bdbe8a1efe0f27c5b71cae8d (diff)
downloadmariadb-git-10ebdb7f1d7a3f6aa6a91b40a9d90f482da08e58.tar.gz
MDEV-11154: Write_on_release_cache(log_event.cc) function will not write "COMMIT", if use "mysqlbinlog ... | mysql ..."
Problem: ======= Executing command, "mysqlbinlog --read-from-remote-server --host='xx.xx.xx.xx' --port=3306 --user=xxx --password=xxx --database=mysql --to-last-log mysql-bin.000001 --start-position=1098699 --stop-never |mysql -uxxx -pxxx", we found that last data read from remote couldn't commit. Analysis: ======== The purpose of 'Write_on_release_cache' is that the contents of the Cache will automatically be written to a dedicated result file on destruction. Flush operation on the result file is controlled by a flag 'FLUSH_F'. Events which require force flush upon their destruction will have to enable this 'Write_on_release_cache::FLUSH_F'. At present the 'FLUSH_F' flag is defined as an enum as shown below. enum flag { FLUSH_F }; Since 'FLUSH_F' is the first member without initialization it get the default value '0'. Because of this the following flush condition never succeeds. if (m_flags & FLUSH_F) fflush(m_file); At present the file gets flushed only during my_fclose(result_file) operation. When continuous streaming is enabled through --stop-never option it never gets flushed and hence events are not replicated. Fix: === Initialize the enum value to non zero value.
Diffstat (limited to 'client')
0 files changed, 0 insertions, 0 deletions