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

Method remove_duplicates

sql/handler.cc:7324–7341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7322
7323
7324void 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
7343struct st_discover_names_args
7344{

Callers 1

ha_discover_table_namesFunction · 0.45

Calls 3

frontMethod · 0.45
backMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected