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

Function update_server

sql/sql_servers.cc:860–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858*/
859
860int update_server(THD *thd, FOREIGN_SERVER *existing, FOREIGN_SERVER *altered)
861{
862 int error;
863 TABLE *table;
864 TABLE_LIST tables;
865 DBUG_ENTER("update_server");
866
867 tables.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_SERVERS_NAME, 0, TL_WRITE);
868
869 table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT);
870 if (!table || !servers_table_is_valid(table))
871 {
872 error= my_errno;
873 goto end;
874 }
875
876 if (unlikely((error= update_server_record(table, altered))))
877 goto end;
878
879 error= update_server_record_in_cache(existing, altered);
880
881 /*
882 Perform a reload so we don't have a 'hole' in our mem_root
883 */
884 servers_load(thd, &tables);
885
886end:
887 DBUG_RETURN(error);
888}
889
890
891/*

Callers 1

alter_serverFunction · 0.85

Calls 6

open_ltableFunction · 0.85
servers_table_is_validFunction · 0.85
update_server_recordFunction · 0.85
servers_loadFunction · 0.85
init_one_tableMethod · 0.80

Tested by

no test coverage detected