| 17971 | */ |
| 17972 | |
| 17973 | static 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 | /** |
no test coverage detected