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

Function update_server_record_in_cache

sql/sql_servers.cc:915–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913*/
914
915int update_server_record_in_cache(FOREIGN_SERVER *existing,
916 FOREIGN_SERVER *altered)
917{
918 int error= 0;
919 DBUG_ENTER("update_server_record_in_cache");
920
921 /*
922 update the members that haven't been change in the altered server struct
923 with the values of the existing server struct
924 */
925 merge_server_struct(existing, altered);
926
927 /*
928 delete the existing server struct from the server cache
929 */
930 my_hash_delete(&servers_cache, (uchar*)existing);
931
932 /*
933 Insert the altered server struct into the server cache
934 */
935 if (my_hash_insert(&servers_cache, (uchar*)altered))
936 {
937 DBUG_PRINT("info", ("had a problem inserting server %s at %p",
938 altered->server_name,altered));
939 error= ER_OUT_OF_RESOURCES;
940 }
941
942 DBUG_RETURN(error);
943}
944
945
946/*

Callers 1

update_serverFunction · 0.85

Calls 3

merge_server_structFunction · 0.85
my_hash_deleteFunction · 0.85
my_hash_insertFunction · 0.85

Tested by

no test coverage detected