1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00
Commit Graph

991 Commits

Author SHA1 Message Date
b5bc38c4ad MCOL-4329 dev set plugin-maturity to stable
Also remove x-columnstore.cnf
2020-09-28 14:35:34 -05:00
a1ea633a19 MCOL-4282 Follow up version 2.
Mutate the optimizer flags for prepared statements in:
  1. ha_mcs::open
  2. ha_mcs::discover_check_version

This is done to ensure the optimizer flags are disabled before
JOIN::prepare() is called during "PREPARE stmt FROM ...".
2020-09-25 13:49:52 -04:00
5646164a46 Merge pull request #1459 from dhall-MariaDB/MCOL-4144-dev
MCOL-4144-dev Enable lower_case_table_names
2020-09-24 19:10:22 -04:00
35c4b66a67 MCOL-4144 Enable lower_case_table_names
Create tables and schemas with lower case name only if the flag is set.
During operations, convert to lowercase in plugin. Byt the time a query gets to ExeMgr, DDLProc etc., everything must be lower case if the flag is set, and undisturbed if not.
2020-09-24 15:21:13 -05:00
f584bab846 Merge pull request #1467 from drrtuy/MCOL-4278-dev
MCOL-4278 MCS quits early from rnd_end() in the presense of sql_selec…
2020-09-24 10:11:08 -05:00
7f744470d7 Merge pull request #1461 from tntnatbry/MCOL-4282-2
MCOL-4282 Follow up on the previous commit.
2020-09-24 11:48:17 +03:00
df0c2b2fbe MCOL-4278 MCS quits early from rnd_end() in the presense of sql_select_limit session variable
Renamed a couple methods to align their names with others
2020-09-24 08:46:00 +00:00
e257570b04 MCOL-4282 Follow up on the previous commit.
Activate statement arena for:
  1. disable_indices_for_CEJ()
  2. in_subselect_rewrite() for prepared statements
2020-09-23 15:45:20 -04:00
234c2eb740 MCOL-4285 In replication, perform LDI on the slave directly
into the columnstore table, and not into the cache.

LDI performed on a master, comes in as a SQLCOM_END sql_command
on the slave, when binlog_format != STATEMENT. If the cache already
had some records, we were earlier flushing the cache for the LDI
on the slave. This patch detects whether we are in the slave
thread or not, if so, then we don't do a cache flush if
sql_command = SQLCOM_END.
2020-09-16 16:34:07 -04:00
1c94e310ff Merge pull request #1449 from tntnatbry/MCOL-4282
MCOL-4282 Enable Select Handler for Prepared Statements
2020-09-14 11:07:42 +03:00
a117786027 MCOL-4282 Enable Select Handler for Prepared Statements
This patch enables select handler for executing prepared
statements. Most importantly, we are now activating a
persistent arena which will allocate any new items in a
permanent MEMROOT for prepared statements and stored procedures.
Refer to JOIN::optimize_inner() for details.

In processWhere(), we now use SELECT_LEX::prep_where in case
we are executing a prepared statement, as this is where the saved
WHERE clause is stored for prepared statement processing.

In addition, we also disable derived handler for prepared
statements.
2020-09-11 16:35:51 -04:00
7f6ad16728 MCOL-4303 UPDATE..SET using another table is not updating
The change for MCOL-4264 erroneously added the "lock_type" member
to cal_connection_info, which is shared between multiple tables.
So some tables that were opened for write erroneously identified
themselves as read only.

Moving the member to ha_mcs instead.
2020-09-11 12:26:26 +04:00
a35be51cc6 Merge pull request #1433 from dhall-MariaDB/MCOL-3464
MCOL-3464 don't dereference a NULL String.
2020-09-09 12:25:20 -04:00
9052a88fc9 Merge pull request #1439 from mariadb-corporation/develop-mcol-4264
MCOL-4264 [Cross-Engine] UPDATE to INNODB table with WHERE clause usi…
2020-09-08 14:12:28 -05:00
f00cc571b5 MCOL-4264 [Cross-Engine] UPDATE to INNODB table with WHERE clause using Columnstore as sub query failing
Problem:

When processing cross-engine queries like:

update cstab1 set a=100 where a not in (select a from innotab1 where a=11);
delete from innotab1  where a not in (select a from cstab1 where a=1);

the ColumnStore plugin erroneously executed the whole query inside
ColumnStore.

Fix:

- Adding a new member cal_connection_info::lock_type and setting it
  inside ha_mcs_impl_external_lock() to the value passed in the parameter
  "lock_type".

- Adding a method cal_connection_info::isReadOnly() to test
  if the last table lock made in ha_mcs_impl_external_lock()
  for done for reading.

- Adding a new condition checking cal_connection_info::isReadOnly() inside
  ha_mcs_impl_rnd_init(). If the current table was locked last time for reading,
  then doUpdateDelete() should not be executed.
2020-09-08 07:06:52 +04:00
890846fa8a MCOL-3464 don't dereference a NULL String. 2020-09-04 16:31:20 -05:00
a7fef967c4 MCOL-4108 For functions not found, send not supported error 2020-09-04 15:27:47 -05:00
929a15ea01 Use the HAVE_PSI_INTERFACE preprocessor guard to disable code
that does not compile if -DPLUGIN_PERFSCHEMA=NO cmake option is used.
2020-08-25 22:03:28 -04:00
b44e1e2566 Merge pull request #1372 from dhall-MariaDB/MCOL-4236
Mcol 4236
2020-08-24 19:04:33 -04:00
e8d01779cf Merge pull request #1371 from mariadb-corporation/columnstore_cache
ColumnStore Cache fixes
2020-08-24 15:48:56 -05:00
39557da2f5 Merge pull request #1376 from benthompson15/MCOL-4155
Fix for using correct cnf file when building as submodule.
2020-08-19 18:45:51 -05:00
be60b49646 Fix for using correct cnf file when building as submodule. 2020-08-19 18:43:46 -05:00
03c50eabee Revert "MCOL-3827 Optimize out sort on SubQuery in Select" 2020-08-19 19:23:55 -04:00
7bd878de0a MCOL-4236 remove type casting *f to something it's not
During data retrieval, we were type casting a field type to what we thought was the correct type. Often it was not. Since we're calling virtual functions on *f, there's no need to type cast in most cases. This was a relic from days gone by.
2020-08-19 14:37:38 -05:00
b3ae9cf04e Use a session variable, columnstore_cache_flush_threshold,
to allow the user to set the threshold, instead of using a
hard coded value.
2020-08-18 18:01:40 -04:00
47f2291f9f Number of cached rows can be > CACHE_FLUSH_THRESHOLD (in case of batch inserts). 2020-08-18 18:01:40 -04:00
709290cc3d Port of commit: 1ff23d0cd70d576a0f4e512ce332cff348591d36
from server/columnstore_cache.

Commit message:

Fixed bug in free locks that caused rows in cache to not be properly flushed

Fixed by doing adding external_lock(F_UNLCK) in free_locks.
I also moved unlock of cache_handler to be after changing lock type of
cached tables to ensure that no one can use cached table while this is
happening (as cache table is locked with write lock).
I also fixed a wrong mutex order bug in ha_cache::flush_insert_cache()

Other things:
- Addded share::cached_rows to track inserted rows. This is only used
  for asserts to check the number of rows in the cache.
- Fixed wrong mysql_file_chsize() in case of repair
2020-08-18 18:01:40 -04:00
4afcba9520 Do not build the cache as a separate user-visible engine.
We are creating a new read-only system variable, columnstore_cache_inserts,
to enable/disable the cache. When this variable is set at server start up,
any table created with engine=columnstore will also create the corresponding
cache table in Aria engine for performing inserts.

It is important to note that a ColumnStore table created with this
option unset should not be queried when the server is restarted with
the option set, as this will most likely result in query failures.
2020-08-18 18:01:40 -04:00
86fb66365c 1. Set 1M as the threshold on the number of records to flush the cache.
2. Set 100k as the batch size when flushing records into ColumnStore, i.e.,
a flush of 1M records will be performed in 10 batches, each being 100k.

3. For INSERT ... SELECT on the cache, use the default insertion method of cpimport.
2020-08-18 18:01:40 -04:00
f5a8d228a0 Port of commit ba731bdc6a80e88d32e7440044b548c3e3edc591
from server/columnstore_cache

Commit message:

Fixed crashed bug on simple insert

Other things:
- Added test from columnstore team
- Fixed two reported bugs from columnstore team
- Call free_locks as part of start_trans() instead of get_status()
  to ensure that we have locks both for cached table and cache table
  before we try to free any.
- Store pointers to lock->get_status and lock->update_status for the
  cached table. Was needed by ha_tina in flush_insert_cache to make
  new insert rows visible for the SELECT that caused the flush
2020-08-18 18:01:40 -04:00
4ff4e9eb89 Re-enable the ColumnStore_Cache plugin. 2020-08-18 18:01:40 -04:00
cb2ddad308 Port of commit 0463e1f722d4d32526760c923e0092a380a9e634
from server/columnstore_cache.

Commit message:

Fixed bug in cache:

- The THR_LOCK org_lock must be stored in a shared structure so that all
  instances of a table can use it. Fixed by adding a ha_cache_share object
  that keeps track of this one.
- Fixed wrong test in get_status_and_flush_cache to detect in insert command
- Fixed in get_status_and_flush_cache that we always free the insert lock
  if we don't need it.
2020-08-18 18:01:40 -04:00
fd0ef267b5 Merge pull request #1368 from dhall-MariaDB/MCOL-4252
MCOL-4252 Fix up configuration
2020-08-18 14:37:53 -05:00
f1759e6560 Merge pull request #1367 from dhall-MariaDB/MCOL-3827
MCOL-3827 Optimize out sort on SubQuery in Select
2020-08-18 14:54:36 -04:00
59cae761d5 Merge pull request #1366 from dhall-MariaDB/MCOL-4247
MCOL-4247 TYpecast causes wrong virtual function
2020-08-18 14:30:35 -04:00
ada33d11c0 Merge pull request #1362 from benthompson15/MCOL-4155
MCOL-4155: rename the cnf file for enterprise builds.
2020-08-18 12:12:13 -05:00
3673586267 MCOL-4252 Fix up configuration 2020-08-18 12:09:31 -05:00
2880d0871f MCOL-4247 add break to case 2020-08-18 11:47:06 -05:00
7ba40a5544 MCOL-4247 TYpecast causes wrong virtual function 2020-08-17 17:34:58 -05:00
e7b8abfdb9 MCOL-3827 Optimize out sort on SubQuery in Select 2020-08-17 14:40:22 -05:00
30d3930f96 MCOL-4155: rename the cnf file for enterprise builds. 2020-08-12 15:21:32 -05:00
478426c8bf MCOL-3814 add back lower to viewName assignment 2020-08-12 10:00:04 -05:00
26895ccdb3 Remove x-columnstore.cnf b/c it breaks minor-upgrade on RPM-based distros 2020-07-27 12:04:49 +00:00
219f67d162 MCOL-4181: Possible setting of ci->stats.fUser to NULL causing crash. 2020-07-20 15:18:58 -05:00
24f23c1d07 Merge pull request #1339 from drrtuy/MCOL-4152
MCOL-4152 Reset cond_stack with ha_mcs::reset() call
2020-07-13 10:49:43 -05:00
851275b04a MCOL-4166 Change UDF functions called during post/pre-install
Set plugin_maturity = beta
2020-07-13 13:23:12 +00:00
6b3c6e33c5 MCOL-4152 Reset cond_stack with ha_mcs::reset() call 2020-07-13 13:18:57 +00:00
9604fc5f10 MCOL-4164 Multi-table DROP. 2020-07-12 17:55:37 +00:00
cfc61fb5df Don't install files w/o the target. 2020-07-10 18:42:24 +00:00
7e868bc588 add dependency for generated header files errorids.h messageids.h patch made by Ben. 2020-07-10 18:38:49 +00:00