summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-27 22:26:58 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-27 22:26:58 +0100
commitcb67dcb6184535349ca4ff3d7c64eba9c63a0688 (patch)
tree10d38ccf7fe60d5ea5c866d37292833b77dfcdae /sql/log_event.h
parent44002a34e680c79c01df879b540458c2885e97e8 (diff)
parentfaec0e2f4aecfc902e354ae7af991779d6bfc4a7 (diff)
downloadmariadb-git-cb67dcb6184535349ca4ff3d7c64eba9c63a0688.tar.gz
mysql-5.5.37 selective merge
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 1d90111f1ca..c10380618a8 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3910,6 +3910,20 @@ protected:
return ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols,
&m_curr_row_end, &m_master_reclength, m_rows_end);
}
+
+ /**
+ Helper function to check whether there is an auto increment
+ column on the table where the event is to be applied.
+
+ @return true if there is an autoincrement field on the extra
+ columns, false otherwise.
+ */
+ inline bool is_auto_inc_in_extra_columns()
+ {
+ DBUG_ASSERT(m_table);
+ return (m_table->next_number_field &&
+ m_table->next_number_field->field_index >= m_width);
+ }
#endif
private: