diff options
author | unknown <kostja@bodhi.(none)> | 2007-12-19 22:15:02 +0300 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-12-19 22:15:02 +0300 |
commit | 226700ee51a827bf1271225394628a3d65a0dc79 (patch) | |
tree | c2e3e4b89a84e607beb2229dcc3a4660d78f89e3 /sql/handler.h | |
parent | 554599e854a8a15d8ca12631182b376b818fdf3a (diff) | |
download | mariadb-git-226700ee51a827bf1271225394628a3d65a0dc79.tar.gz |
Make handler::{write,delete,update}_row private. It's critical
that the entire server uses their public ha_* counterparts instead,
since only then we can ensure proper tracing of these calls that
is necessary for Bug#12713.
A pre-requisite for Bug#12713 "Error in a stored function called from
a SELECT doesn't cause ROLLBACK of statem"
sql/ha_partition.cc:
Use ha_write_row, ha_update_row, ha_delete_row instead of now-private
write_row, update_row, delete_row.
In future ha_* calls will contain more than just a call to the binary
log, so it's essential they are used consistently everywhere in the server.
Disable the undesired effect of double binary logging of changes
to partitioned tables with tmp_disable_binlog.
sql/handler.h:
Make write_row, update_row, delete_row private. It's critical
that the entire code base uses ha_write_row, ha_update_row, ha_delete_row
instead -- in future, ha_* counterparts will have more common
functionality than just a call to the binary log.
sql/sql_select.cc:
Use ha_write_row, ha_update_row, ha_delete_row instead of
write_row, update_row, delete_row respectively.
The change affects the join execution code that works with an
intermediate internal temporary table. Do not disable binary logging,
since it's unnecessary - temporary tables are not replicated
by row level replication.
sql/sql_table.cc:
Use ha_write_row in copy_data_between_tables - the function
that writes data from the original table to a temporary copy
when executing ALTER TABLE. Do not disable binary logging
since temporary tables are not replicated by row level
replication anyway.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/sql/handler.h b/sql/handler.h index c5b867e315f..f3b37fa796b 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1674,22 +1674,6 @@ public: uint table_changes) { return COMPATIBLE_DATA_NO; } - /** These are only called from sql_select for internal temporary tables */ - virtual int write_row(uchar *buf __attribute__((unused))) - { - return HA_ERR_WRONG_COMMAND; - } - - virtual int update_row(const uchar *old_data __attribute__((unused)), - uchar *new_data __attribute__((unused))) - { - return HA_ERR_WRONG_COMMAND; - } - - virtual int delete_row(const uchar *buf __attribute__((unused))) - { - return HA_ERR_WRONG_COMMAND; - } /** use_hidden_primary_key() is called in case of an update/delete when (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined @@ -1721,6 +1705,21 @@ private: */ virtual int rnd_init(bool scan)= 0; virtual int rnd_end() { return 0; } + virtual int write_row(uchar *buf __attribute__((unused))) + { + return HA_ERR_WRONG_COMMAND; + } + + virtual int update_row(const uchar *old_data __attribute__((unused)), + uchar *new_data __attribute__((unused))) + { + return HA_ERR_WRONG_COMMAND; + } + + virtual int delete_row(const uchar *buf __attribute__((unused))) + { + return HA_ERR_WRONG_COMMAND; + } /** Reset state of file to after 'open'. This function is called after every statement for all tables used |