MCPcopy Create free account
hub / github.com/MariaDB/server / ddl_log_write

Function ddl_log_write

sql/ddl_log.cc:3084–3107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3082*/
3083
3084static bool ddl_log_write(DDL_LOG_STATE *ddl_state,
3085 DDL_LOG_ENTRY *ddl_log_entry)
3086{
3087 int error;
3088 DDL_LOG_MEMORY_ENTRY *log_entry;
3089 DBUG_ENTER("ddl_log_write");
3090
3091 mysql_mutex_lock(&LOCK_gdl);
3092 error= ((ddl_log_write_entry(ddl_log_entry, &log_entry)) ||
3093 ddl_log_write_execute_entry(log_entry->entry_pos, 0,
3094 &ddl_state->execute_entry));
3095 DBUG_EXECUTE_IF("ddl_log_write_fail", error= true;);
3096 if (error)
3097 {
3098 if (log_entry)
3099 ddl_log_release_memory_entry(log_entry);
3100 mysql_mutex_unlock(&LOCK_gdl);
3101 DBUG_RETURN(1);
3102 }
3103 mysql_mutex_unlock(&LOCK_gdl);
3104 ddl_log_add_entry(ddl_state, log_entry);
3105 ddl_state->flags|= ddl_log_entry->flags; // Update cache
3106 DBUG_RETURN(0);
3107}
3108
3109
3110/**

Callers 10

ddl_log_rename_tableFunction · 0.85
ddl_log_rename_viewFunction · 0.85
ddl_log_drop_initFunction · 0.85
ddl_log_drop_triggerFunction · 0.85
ddl_log_drop_dbFunction · 0.85
ddl_log_create_tableFunction · 0.85
ddl_log_create_viewFunction · 0.85
ddl_log_delete_tmp_fileFunction · 0.85
ddl_log_create_triggerFunction · 0.85
ddl_log_alter_tableFunction · 0.85

Calls 4

ddl_log_write_entryFunction · 0.85
ddl_log_add_entryFunction · 0.85

Tested by

no test coverage detected