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

Method send_list_fields

libmysqld/lib_sql.cc:1226–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1224
1225
1226bool Protocol::send_list_fields(List<Field> *list, const TABLE_LIST *table_list)
1227{
1228 DBUG_ENTER("send_result_set_metadata");
1229 Protocol_text prot(thd);
1230 List_iterator_fast<Field> it(*list);
1231 Field *fld;
1232
1233 if (!thd->mysql) // bootstrap file handling
1234 DBUG_RETURN(0);
1235
1236 if (begin_dataset(thd, list->elements))
1237 goto err;
1238
1239 for (uint pos= 0 ; (fld= it++); pos++)
1240 {
1241 if (prot.store_field_metadata_for_list_fields(thd, fld, table_list, pos))
1242 goto err;
1243 list_fields_send_default(thd, this, fld, pos);
1244 }
1245
1246 DBUG_RETURN(prepare_for_send(list->elements));
1247err:
1248 my_error(ER_OUT_OF_RESOURCES, MYF(0));
1249 DBUG_RETURN(1);
1250}
1251
1252
1253bool Protocol::write()

Callers

nothing calls this directly

Calls 4

begin_datasetFunction · 0.85
my_errorFunction · 0.85
list_fields_send_defaultFunction · 0.70

Tested by

no test coverage detected