Commit b3f988d2 authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

Add const to get_foreign_key_list/get_parent_foreign_key_list

parent 500787c7
...@@ -4431,7 +4431,7 @@ class handler :public Sql_alloc ...@@ -4431,7 +4431,7 @@ class handler :public Sql_alloc
@return The handler error code or zero for success. @return The handler error code or zero for success.
*/ */
virtual int virtual int
get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) get_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
{ return 0; } { return 0; }
/** /**
Get the list of foreign keys referencing this table. Get the list of foreign keys referencing this table.
...@@ -4445,7 +4445,7 @@ class handler :public Sql_alloc ...@@ -4445,7 +4445,7 @@ class handler :public Sql_alloc
@return The handler error code or zero for success. @return The handler error code or zero for success.
*/ */
virtual int virtual int
get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) get_parent_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
{ return 0; } { return 0; }
virtual uint referenced_by_foreign_key() { return 0;} virtual uint referenced_by_foreign_key() { return 0;}
virtual void init_table_handle_for_HANDLER() virtual void init_table_handle_for_HANDLER()
......
...@@ -15365,7 +15365,7 @@ static ...@@ -15365,7 +15365,7 @@ static
FOREIGN_KEY_INFO* FOREIGN_KEY_INFO*
get_foreign_key_info( get_foreign_key_info(
/*=================*/ /*=================*/
THD* thd, /*!< in: user thread handle */ const THD* thd, /*!< in: user thread handle */
dict_foreign_t* foreign)/*!< in: foreign key constraint */ dict_foreign_t* foreign)/*!< in: foreign key constraint */
{ {
FOREIGN_KEY_INFO f_key_info; FOREIGN_KEY_INFO f_key_info;
...@@ -15501,7 +15501,7 @@ Gets the list of foreign keys in this table. ...@@ -15501,7 +15501,7 @@ Gets the list of foreign keys in this table.
int int
ha_innobase::get_foreign_key_list( ha_innobase::get_foreign_key_list(
/*==============================*/ /*==============================*/
THD* thd, /*!< in: user thread handle */ const THD* thd, /*!< in: user thread handle */
List<FOREIGN_KEY_INFO>* f_key_list) /*!< out: foreign key list */ List<FOREIGN_KEY_INFO>* f_key_list) /*!< out: foreign key list */
{ {
update_thd(ha_thd()); update_thd(ha_thd());
...@@ -15539,7 +15539,7 @@ Gets the set of foreign keys where this table is the referenced table. ...@@ -15539,7 +15539,7 @@ Gets the set of foreign keys where this table is the referenced table.
int int
ha_innobase::get_parent_foreign_key_list( ha_innobase::get_parent_foreign_key_list(
/*=====================================*/ /*=====================================*/
THD* thd, /*!< in: user thread handle */ const THD* thd, /*!< in: user thread handle */
List<FOREIGN_KEY_INFO>* f_key_list) /*!< out: foreign key list */ List<FOREIGN_KEY_INFO>* f_key_list) /*!< out: foreign key list */
{ {
update_thd(ha_thd()); update_thd(ha_thd());
......
...@@ -213,11 +213,11 @@ class ha_innobase final : public handler ...@@ -213,11 +213,11 @@ class ha_innobase final : public handler
char* get_foreign_key_create_info() override; char* get_foreign_key_create_info() override;
int get_foreign_key_list(THD *thd, int get_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) override; List<FOREIGN_KEY_INFO> *f_key_list) override;
int get_parent_foreign_key_list( int get_parent_foreign_key_list(
THD* thd, const THD* thd,
List<FOREIGN_KEY_INFO>* f_key_list) override; List<FOREIGN_KEY_INFO>* f_key_list) override;
bool can_switch_engines() override; bool can_switch_engines() override;
......
...@@ -16676,7 +16676,7 @@ bool ha_mroonga::can_switch_engines() ...@@ -16676,7 +16676,7 @@ bool ha_mroonga::can_switch_engines()
DBUG_RETURN(res); DBUG_RETURN(res);
} }
int ha_mroonga::wrapper_get_foreign_key_list(THD *thd, int ha_mroonga::wrapper_get_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
...@@ -16690,7 +16690,7 @@ int ha_mroonga::wrapper_get_foreign_key_list(THD *thd, ...@@ -16690,7 +16690,7 @@ int ha_mroonga::wrapper_get_foreign_key_list(THD *thd,
} }
#ifdef MRN_SUPPORT_FOREIGN_KEYS #ifdef MRN_SUPPORT_FOREIGN_KEYS
int ha_mroonga::storage_get_foreign_key_list(THD *thd, int ha_mroonga::storage_get_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
int error; int error;
...@@ -16800,7 +16800,7 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, ...@@ -16800,7 +16800,7 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd,
} }
#endif #endif
int ha_mroonga::get_foreign_key_list(THD *thd, int ha_mroonga::get_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
...@@ -16814,7 +16814,7 @@ int ha_mroonga::get_foreign_key_list(THD *thd, ...@@ -16814,7 +16814,7 @@ int ha_mroonga::get_foreign_key_list(THD *thd,
DBUG_RETURN(res); DBUG_RETURN(res);
} }
int ha_mroonga::wrapper_get_parent_foreign_key_list(THD *thd, int ha_mroonga::wrapper_get_parent_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
...@@ -16827,7 +16827,7 @@ int ha_mroonga::wrapper_get_parent_foreign_key_list(THD *thd, ...@@ -16827,7 +16827,7 @@ int ha_mroonga::wrapper_get_parent_foreign_key_list(THD *thd,
DBUG_RETURN(res); DBUG_RETURN(res);
} }
int ha_mroonga::storage_get_parent_foreign_key_list(THD *thd, int ha_mroonga::storage_get_parent_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
...@@ -16835,7 +16835,7 @@ int ha_mroonga::storage_get_parent_foreign_key_list(THD *thd, ...@@ -16835,7 +16835,7 @@ int ha_mroonga::storage_get_parent_foreign_key_list(THD *thd,
DBUG_RETURN(res); DBUG_RETURN(res);
} }
int ha_mroonga::get_parent_foreign_key_list(THD *thd, int ha_mroonga::get_parent_foreign_key_list(const THD *thd,
List<FOREIGN_KEY_INFO> *f_key_list) List<FOREIGN_KEY_INFO> *f_key_list)
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
......
...@@ -621,8 +621,8 @@ protected: ...@@ -621,8 +621,8 @@ protected:
char *get_tablespace_name(THD *thd, char *name, uint name_len); char *get_tablespace_name(THD *thd, char *name, uint name_len);
#endif #endif
bool can_switch_engines() mrn_override; bool can_switch_engines() mrn_override;
int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override; int get_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override;
int get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override; int get_parent_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override;
uint referenced_by_foreign_key() mrn_override; uint referenced_by_foreign_key() mrn_override;
void init_table_handle_for_HANDLER() mrn_override; void init_table_handle_for_HANDLER() mrn_override;
void free_foreign_key_create_info(char* str) mrn_override; void free_foreign_key_create_info(char* str) mrn_override;
...@@ -1273,10 +1273,10 @@ private: ...@@ -1273,10 +1273,10 @@ private:
#endif #endif
bool wrapper_can_switch_engines(); bool wrapper_can_switch_engines();
bool storage_can_switch_engines(); bool storage_can_switch_engines();
int wrapper_get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list); int wrapper_get_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
int storage_get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list); int storage_get_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
int wrapper_get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list); int wrapper_get_parent_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
int storage_get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list); int storage_get_parent_foreign_key_list(const THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
uint wrapper_referenced_by_foreign_key(); uint wrapper_referenced_by_foreign_key();
uint storage_referenced_by_foreign_key(); uint storage_referenced_by_foreign_key();
void wrapper_init_table_handle_for_HANDLER(); void wrapper_init_table_handle_for_HANDLER();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment