diff options
author | unknown <kostja@bodhi.(none)> | 2008-05-18 01:51:18 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2008-05-18 01:51:18 +0400 |
commit | 1cf0b5cb892569de4e07252e578542aa8f691039 (patch) | |
tree | 31e6f0685e8b284f4281aff2fb0f2220836e22ab /sql/table.h | |
parent | 954787376f0943c14f64f48eb43520ed10f9b3d7 (diff) | |
download | mariadb-git-1cf0b5cb892569de4e07252e578542aa8f691039.tar.gz |
Implement some code review fixes for the fix for Bug#27430
"Crash in subquery code when in PS and table DDL changed after PREPARE"
include/my_sys.h:
Add two new flags for my_error(). These flags help parameterize
behavoiur of my_message_sql()
sql/item.cc:
Update comments.
Fix a typo in Item_param::set_param_type_and_swap_value()
sql/mysqld.cc:
Implement two additional flags for my_error():
- if ME_NO_SP_HANDLER is specified, ignore stored procedure continue/
exit handlers
- if ME_NO_WARNING_FOR_ERROR is specified, do not push warning
sql/sql_base.cc:
Update comments.
Rename a few methods.
sql/sql_class.h:
Update and improve comments.
sql/sql_prepare.cc:
Update comments.
Style changes.
sql/table.h:
Update comments.
Style changes.
Rename a few methods.
tests/mysql_client_test.c:
Zero the bind array, to follow C API requirements.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/table.h b/sql/table.h index eccb5d85be2..d31b4930afb 100644 --- a/sql/table.h +++ b/sql/table.h @@ -478,10 +478,10 @@ typedef struct st_table_share Let's try to explain why and how this limited solution allows to validate prepared statements. - Firstly, spaces (in mathematical sense) of version numbers + Firstly, sets (in mathematical sense) of version numbers never intersect for different metadata types. Therefore, version id of a temporary table is never compared with - a version id of a view or a temporary table, and vice versa. + a version id of a view, and vice versa. Secondly, for base tables, we know that each DDL flushes the respective share from the TDC. This ensures that whenever @@ -530,11 +530,11 @@ typedef struct st_table_share with a base table, a base table is replaced with a temporary table and so on. - @sa TABLE_LIST::is_metadata_version_equal() + @sa TABLE_LIST::is_metadata_id_equal() */ ulong get_metadata_version() const { - return tmp_table == SYSTEM_TMP_TABLE || is_view ? 0 : table_map_id; + return (tmp_table == SYSTEM_TMP_TABLE || is_view) ? 0 : table_map_id; } } TABLE_SHARE; @@ -1340,7 +1340,7 @@ struct TABLE_LIST @sa check_and_update_table_version() */ inline - bool is_metadata_version_equal(TABLE_SHARE *s) const + bool is_metadata_id_equal(TABLE_SHARE *s) const { return (m_metadata_type == s->get_metadata_type() && m_metadata_version == s->get_metadata_version()); @@ -1353,7 +1353,7 @@ struct TABLE_LIST @sa check_and_update_table_version() */ inline - void set_metadata_version(TABLE_SHARE *s) + void set_metadata_id(TABLE_SHARE *s) { m_metadata_type= s->get_metadata_type(); m_metadata_version= s->get_metadata_version(); @@ -1369,9 +1369,9 @@ private: /* Remembered MERGE child def version. See top comment in ha_myisammrg.cc */ ulong child_def_version; - /** See comments for set_metadata_version() */ + /** See comments for set_metadata_id() */ enum enum_metadata_type m_metadata_type; - /** See comments for set_metadata_version() */ + /** See comments for set_metadata_id() */ ulong m_metadata_version; }; |