| 7322 | |
| 7323 | |
| 7324 | void Discovered_table_list::remove_duplicates() |
| 7325 | { |
| 7326 | LEX_CSTRING **src= tables->front(); |
| 7327 | LEX_CSTRING **dst= src; |
| 7328 | sort(); |
| 7329 | while (++dst <= tables->back()) |
| 7330 | { |
| 7331 | LEX_CSTRING *s= *src, *d= *dst; |
| 7332 | DBUG_ASSERT(strncmp(s->str, d->str, MY_MIN(s->length, d->length)) <= 0); |
| 7333 | if ((s->length != d->length || strncmp(s->str, d->str, d->length))) |
| 7334 | { |
| 7335 | src++; |
| 7336 | if (src != dst) |
| 7337 | *src= *dst; |
| 7338 | } |
| 7339 | } |
| 7340 | tables->elements(src - tables->front() + 1); |
| 7341 | } |
| 7342 | |
| 7343 | struct st_discover_names_args |
| 7344 | { |
no test coverage detected