From 1402275a53db6fc931739de46f88121924de1e02 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Wed, 12 Aug 2009 14:57:41 +0400 Subject: [PATCH 1/2] A follow up patch for Bug#45829 "CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing" Remove unused code that would lead to warnings when compiling sql_yacc.yy. sql/handler.h: Remove unused defines. sql/sql_yacc.yy: Remove unused grammar. sql/table.h: Remove unused TABLE members. --- sql/handler.h | 6 ------ sql/sql_yacc.yy | 8 -------- sql/table.h | 4 ---- 3 files changed, 18 deletions(-) diff --git a/sql/handler.h b/sql/handler.h index 01f673ecd51..726926bcb46 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -895,8 +895,6 @@ class partition_info; struct st_partition_iter; #define NOT_A_PARTITION_ID ((uint32)-1) -enum ha_choice { HA_CHOICE_UNDEF, HA_CHOICE_NO, HA_CHOICE_YES }; - typedef struct st_ha_create_information { CHARSET_INFO *table_charset, *default_table_charset; @@ -918,14 +916,10 @@ typedef struct st_ha_create_information uint options; /* OR of HA_CREATE_ options */ uint merge_insert_method; uint extra_size; /* length of extra data segment */ - /** Transactional or not. Unused; reserved for future versions. */ - enum ha_choice transactional; bool table_existed; /* 1 in create if table existed */ bool frm_only; /* 1 if no ha_create_table() */ bool varchar; /* 1 if table has a VARCHAR */ enum ha_storage_media storage_media; /* DEFAULT, DISK or MEMORY */ - /** Per-page checksums or not. Unused; reserved for future versions. */ - enum ha_choice page_checksum; } HA_CREATE_INFO; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 320b43c8e5c..11250404da6 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -494,7 +494,6 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal, enum enum_tx_isolation tx_isolation; enum Cast_target cast_type; enum Item_udftype udf_type; - enum ha_choice choice; CHARSET_INFO *charset; thr_lock_type lock_type; interval_type interval, interval_time_st; @@ -1164,8 +1163,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type ulonglong_num real_ulonglong_num size_number -%type choice - %type part_bit_expr @@ -9066,11 +9063,6 @@ dec_num: | FLOAT_NUM ; -choice: - ulong_num { $$= $1 != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; } - | DEFAULT { $$= HA_CHOICE_UNDEF; } - ; - procedure_clause: /* empty */ | PROCEDURE ident /* Procedure name */ diff --git a/sql/table.h b/sql/table.h index 653d04b149e..3b6a0871d09 100644 --- a/sql/table.h +++ b/sql/table.h @@ -361,10 +361,6 @@ typedef struct st_table_share } enum row_type row_type; /* How rows are stored */ enum tmp_table_type tmp_table; - /** Transactional or not. Unused; reserved for future versions. */ - enum ha_choice transactional; - /** Per-page checksums or not. Unused; reserved for future versions. */ - enum ha_choice page_checksum; uint ref_count; /* How many TABLE objects uses this */ uint open_count; /* Number of tables in open list */ From b28f09bd8cf65a0ce7dbe8fb04033cdf7f9323ff Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Wed, 12 Aug 2009 17:11:06 +0400 Subject: [PATCH 2/2] A follow up patch for the follow up patch for Bug#45829 "CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing". Put back stubs for members of structures that are shared between sql/ and pluggable storage engines. to not break ABI unnecessarily. To be NULL-merged into 5.4, where we do break the ABI already. --- sql/handler.h | 4 ++++ sql/table.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sql/handler.h b/sql/handler.h index 726926bcb46..f76f940fd37 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -895,6 +895,8 @@ class partition_info; struct st_partition_iter; #define NOT_A_PARTITION_ID ((uint32)-1) +enum enum_ha_unused { HA_CHOICE_UNDEF, HA_CHOICE_NO, HA_CHOICE_YES }; + typedef struct st_ha_create_information { CHARSET_INFO *table_charset, *default_table_charset; @@ -916,10 +918,12 @@ typedef struct st_ha_create_information uint options; /* OR of HA_CREATE_ options */ uint merge_insert_method; uint extra_size; /* length of extra data segment */ + enum enum_ha_unused unused1; bool table_existed; /* 1 in create if table existed */ bool frm_only; /* 1 if no ha_create_table() */ bool varchar; /* 1 if table has a VARCHAR */ enum ha_storage_media storage_media; /* DEFAULT, DISK or MEMORY */ + enum enum_ha_unused unused2; } HA_CREATE_INFO; diff --git a/sql/table.h b/sql/table.h index 3b6a0871d09..40372fa91cf 100644 --- a/sql/table.h +++ b/sql/table.h @@ -361,6 +361,8 @@ typedef struct st_table_share } enum row_type row_type; /* How rows are stored */ enum tmp_table_type tmp_table; + enum enum_ha_unused unused1; + enum enum_ha_unused unused2; uint ref_count; /* How many TABLE objects uses this */ uint open_count; /* Number of tables in open list */