mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	Cut number 6. Move code from sql_show.cc to event_db_repository.cc that more belongs to the latter. sql/event_db_repository.cc: move code that works with mysql.event from sql_show.cc to event_db_repository.cc . Route through Event_db_repository's interface which is proxied by class Events. The code relies on a function from sql_show.cc which does the actual storage in the schema table. I think it's better to leave the function there because the structure of I_S.EVENTS is defined in sql_show.cc sql/event_db_repository.h: I_S / SHOW EVENTS handling hooks sql/event_scheduler.cc: use the pointer to db_repository which Event_scheduler already has sql/events.cc: Put a comment to get_instance sql/events.h: callback for I_S (sql_show.cc) sql/sql_show.cc: move code that belongs more to Event_db_repository than to here. Use a callback of class Events. Only 1 function is left here, because it copies data into the actual rows of I_S.EVENTS and belongs to this file. sql/sql_show.h: export this function will be called from event_db_repository.cc
		
			
				
	
	
		
			20 lines
		
	
	
		
			537 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			537 B
		
	
	
	
		
			C++
		
	
	
	
	
	
 | 
						|
#ifndef SQL_SHOW_H
 | 
						|
#define SQL_SHOW_H
 | 
						|
 | 
						|
/* Forward declarations */
 | 
						|
class String;
 | 
						|
class THD;
 | 
						|
struct st_ha_create_information;
 | 
						|
struct st_table_list;
 | 
						|
typedef st_ha_create_information HA_CREATE_INFO;
 | 
						|
typedef st_table_list TABLE_LIST;
 | 
						|
 | 
						|
int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
 | 
						|
                      HA_CREATE_INFO  *create_info_arg);
 | 
						|
int view_store_create_info(THD *thd, TABLE_LIST *table, String *buff);
 | 
						|
 | 
						|
int copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table);
 | 
						|
 | 
						|
#endif /* SQL_SHOW_H */
 |