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

Function alter_server

sql/sql_servers.cc:1205–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203*/
1204
1205int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options)
1206{
1207 int error= ER_FOREIGN_SERVER_DOESNT_EXIST;
1208 FOREIGN_SERVER altered, *existing;
1209 DBUG_ENTER("alter_server");
1210 DBUG_PRINT("info", ("server_options->server_name %s",
1211 server_options->server_name.str));
1212
1213 mysql_rwlock_wrlock(&THR_LOCK_servers);
1214
1215 if (!(existing= (FOREIGN_SERVER *) my_hash_search(&servers_cache,
1216 (uchar*) server_options->server_name.str,
1217 server_options->server_name.length)))
1218 goto end;
1219
1220 prepare_server_struct_for_update(server_options, existing, &altered);
1221
1222 error= update_server(thd, existing, &altered);
1223
1224 close_mysql_tables(thd);
1225
1226end:
1227 DBUG_PRINT("info", ("error returned %d", error));
1228 mysql_rwlock_unlock(&THR_LOCK_servers);
1229 DBUG_RETURN(error);
1230}
1231
1232
1233static void copy_option_list(MEM_ROOT *mem, FOREIGN_SERVER *server,

Callers 1

sql_parse.ccFile · 0.85

Calls 4

my_hash_searchFunction · 0.85
update_serverFunction · 0.85
close_mysql_tablesFunction · 0.85

Tested by

no test coverage detected