Commit graph

10 commits

Author SHA1 Message Date
Monty
57c526ffb8 Added detection of memory overwrite with multi_malloc
This patch also fixes some bugs detected by valgrind after this
patch:

- Not enough copy_func elements was allocated by Create_tmp_table() which
  causes an memory overwrite in Create_tmp_table::add_fields()
  I added an ASSERT() to be able to detect this also without valgrind.
  The bug was that TMP_TABLE_PARAM::copy_fields was not correctly set
  when calling create_tmp_table().
- Aria::empty_bits is not allocated if there is no varchar/char/blob
  fields in the table.  Fixed code to take this into account.
  This cannot cause any issues as this is just a memory access
  into other Aria memory and the content of the memory would not be used.
- Aria::last_key_buff was not allocated big enough. This may have caused
  issues with rtrees and ma_extra(HA_EXTRA_REMEMBER_POS) as they
  would use the same memory area.
- Aria and MyISAM didn't take extended key parts into account, which
  caused problems when copying rec_per_key from engine to sql level.
- Mark asan builds with 'asan' in version strihng to detect these in
  not_valgrind_build.inc.
  This is needed to not have main.sp-no-valgrind fail with asan.
2023-02-27 19:25:44 +02:00
Alexander Barkov
080522dcd7 MDEV-23825 Join select_handler and Pushdown_select + XPand changes 2020-09-27 10:30:23 +04:00
Marko Mäkelä
53aabda6b5 Merge 10.4 into 10.5 2020-03-27 09:39:15 +02:00
Sergei Petrunia
af4b2ae858 MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
Backport to 10.4:

- Don't try to push down SELECTs that have a side effect

- In case the storage engine did support pushdown of SELECT with an INTO
  clause, write the rows we've got from it into select->join->result,
  and not thd->protocol.  This way, SELECT ... INTO ... FROM
  smart_engine_table will put the result into where instructed, and
  NOT send it to the client.
2020-03-26 15:01:44 +03:00
Sergei Petrunia
cbbe4971b6 MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
- Don't try to push down SELECTs that have a side effect

- In case the storage engine did support pushdown of SELECT with an INTO
  clause, write the rows we've got from it into select->join->result,
  and not thd->protocol.  This way, SELECT ... INTO ... FROM
  smart_engine_table will put the result into where instructed, and
  NOT send it to the client.
2020-03-07 01:14:41 +03:00
Oleksandr Byelkin
a6de640804 MDEV-18553: MDEV-16327 pre-requisits part 3: move kill check in one place
Kill check moved from send_data() methids in its wrapper:
send_data_with_check().
2019-10-13 09:40:41 +02:00
Roman Nozdrin
9fce942878 MDEV-19831 find_select_handler() now tries its best to find a
handlerton that is able to processes the whole query. For that it
traverses tables from subqueries.

Select_handler now cleans up temporary table structures on dctor call.
2019-08-24 20:49:15 +03:00
Igor Babaev
27c3abde30 MDEV-17096 Pushdown of simple derived tables to storage engines
MDEV-17631 select_handler for a full query pushdown

Added comments and file headers for files introduced in these tasks.
2019-02-12 22:56:24 -08:00
Igor Babaev
d11be23933 MDEV-17096 Pushdown of simple derived tables to storage engines
Resolved the problem of forming a proper query string for FEDERATEDX.
Added test cases.

Cleanup of extra spaces.
2019-02-09 22:54:26 -08:00
Igor Babaev
16327fc2e7 MDEV-17096 Pushdown of simple derived tables to storage engines
MDEV-17631 select_handler for a full query pushdown

Interfaces + Proof of Concept for federatedx with test cases.

The interfaces have been developed for integration of ColumnStore engine.
2019-02-06 17:02:44 -08:00