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

Function clear_tables

sql/sql_select.cc:17973–17993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17971*/
17972
17973static void clear_tables(JOIN *join, table_map *cleared_tables)
17974{
17975 DBUG_ASSERT(cleared_tables);
17976 for (uint i= 0 ; i < join->table_count ; i++)
17977 {
17978 TABLE *table= join->table[i];
17979
17980 if (table->null_row)
17981 continue; // Nothing more to do
17982 (*cleared_tables)|= (((table_map) 1) << i);
17983 if (table->s->null_bytes)
17984 {
17985 /*
17986 Remember null bits for the record so that we can restore the
17987 original const record in unclear_tables()
17988 */
17989 memcpy(table->record[1], table->null_flags, table->s->null_bytes);
17990 }
17991 mark_as_null_row(table); // All fields are NULL
17992 }
17993}
17994
17995
17996/**

Callers 3

~table_mappingMethod · 0.85
do_selectFunction · 0.85
clearMethod · 0.85

Calls 1

mark_as_null_rowFunction · 0.85

Tested by

no test coverage detected