diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-08-01 13:12:50 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-10-23 13:37:26 +0200 |
commit | e64084d5a3a72462fa6263d1d0a86e72c0ba0d47 (patch) | |
tree | 123beda4bb88dbce9a4f3fe3ab4b659a95caeef6 /storage/heap | |
parent | 6cefe7d31ef43cadb905d71be743462825c7b4ff (diff) | |
download | mariadb-git-e64084d5a3a72462fa6263d1d0a86e72c0ba0d47.tar.gz |
MDEV-21201 No records produced in information_schema query, depending on projection
Reimplement MDEV-14275 Improving memory utilization for information schema
Postpone temp table instantiation until after setup_fields().
Replace all unused (not marked in read_set) columns in an I_S table
with CHAR(0). This can drastically reduce the footprint of a MEMORY
table (a TABLE_CATALOG alone is 1538 bytes per row).
This does not change the engine. If the table was decided to be Aria
(because of, say, blobs) then after optimization it'll stay Aria
even if all blobs were removed.
Note 1: when transforming table structure, share->blob_fields is
preserved, otherwise Aria might switch from DYNAMIC to STATIC row format
and expect a special field for a deleted mark, which create_tmp_tabe
didn't provide.
Note 2: optimizer was doing handler::info() (to know the number of rows)
before the temp table is populated. That didn't make much sense. Now
it's done before the table is even instantiated. Preserve the old
behavior and report 0 rows.
This reverts e2664ee8362 and a8458a2345e
Diffstat (limited to 'storage/heap')
-rw-r--r-- | storage/heap/ha_heap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 396887df1b1..a40f4b8a464 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -364,7 +364,7 @@ int ha_heap::info(uint flag) HEAPINFO hp_info; if (!table) - return 1; + return 0; (void) heap_info(file,&hp_info,flag); |