| 1224 | |
| 1225 | |
| 1226 | bool 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)); |
| 1247 | err: |
| 1248 | my_error(ER_OUT_OF_RESOURCES, MYF(0)); |
| 1249 | DBUG_RETURN(1); |
| 1250 | } |
| 1251 | |
| 1252 | |
| 1253 | bool Protocol::write() |
nothing calls this directly
no test coverage detected