List:Internals« Previous MessageNext Message »
From:Jan Lindström Date:March 6 2007 9:24am
Subject:Adding new funtions to handler interface
View as plain text  
Hi,

I propose few additional functions to MySQL storage engine handler
interface:

::add_foreign_keys(THD* thd, TABLE *table_arg, foreign_key* fk_key, uint
n_fkeys); 
	Assuming that HA_CAN_ADD_FOREIGN_KEYS is set this 
	function is used for implementing alter table add
	foreign key ...
   
::drop_foreign_keys(THD* thd, TABLE *table_arg, char* fk_names, uint
n_fkeys);    

	Assuming that HA_CAN_DROP_FOREIGN_KEYS is set
	this function is used to implement alter table drop foreign
	key...

::set_column_defaults(THD* thd, TABLE *table_arg, char* field_names,
mysql_byte* default_values, uint n_defvalues);    

	Assuming that HA_CAN_SET_DEFAUL_CASCADE is set this function
	is used to modify column default value in alter table modify
	column a set default ...

	Note that this would require that storage engine can in ::create
	determine default value for the column (e.g. 
	Field->get_default_value())

::add_columns(THD* thd, TABLE *table_arg, Field* fields, uint n_fields);

	Assuming that HA_CAN_ADD_COLUMNS is set this function is used
	to implement alter table add column ...

::drop_columns(THD* thd, TABLE *table_arg, char* field_names, uint
n_fields);
	Assuming that HA_CAN_DROP_COLUMNS is set this function is used
	to implement alter table drop column ...

R: Jan Lindström
Solid Information Technology Ltd

Thread
Adding new funtions to handler interfaceJan Lindström6 Mar
  • Re: Adding new funtions to handler interfaceMartin Skold6 Mar
    • Re: Adding new funtions to handler interfaceJan Lindström8 Mar
    • New online alter table interface [Re: Adding new funtions to handlerinterface]Martin Skold19 Sep
      • Re: New online alter table interface [Re: Adding new funtions tohandler interface]Marko Mäkelä19 Sep
        • RE: New online alter table interface [Re: Adding new funtions tohandler interface]Rick James19 Sep
        • Re: New online alter table interface [Re: Adding new funtions tohandler interface]Martin Skold20 Sep