| 6231 | |
| 6232 | |
| 6233 | static void |
| 6234 | list_fields_send_default(THD *thd, Protocol_local *p, Field *fld, uint pos) |
| 6235 | { |
| 6236 | char buff[80]; |
| 6237 | String tmp(buff, sizeof(buff), default_charset_info), *res; |
| 6238 | MYSQL_FIELD *client_field= &p->cur_data->embedded_info->fields_list[pos]; |
| 6239 | |
| 6240 | if (fld->is_null() || !(res= fld->val_str(&tmp))) |
| 6241 | { |
| 6242 | client_field->def_length= 0; |
| 6243 | client_field->def= strmake_root(&p->cur_data->alloc, "", 0); |
| 6244 | } |
| 6245 | else |
| 6246 | { |
| 6247 | client_field->def_length= res->length(); |
| 6248 | client_field->def= strmake_root(&p->cur_data->alloc, res->ptr(), |
| 6249 | client_field->def_length); |
| 6250 | } |
| 6251 | } |
| 6252 | |
| 6253 | |
| 6254 | bool Protocol_local::send_list_fields(List<Field> *list, const TABLE_LIST *table_list) |
no test coverage detected