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

1065 Commits

Author SHA1 Message Date
Gagan Goel
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
Gagan Goel
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
Gagan Goel
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
Gagan Goel
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
Gagan Goel
4ff4e9eb89 Re-enable the ColumnStore_Cache plugin. 2020-08-18 18:01:40 -04:00
Gagan Goel
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
benthompson15
fd0ef267b5 Merge pull request #1368 from dhall-MariaDB/MCOL-4252
MCOL-4252 Fix up configuration
2020-08-18 14:37:53 -05:00
Gagan Goel
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
Gagan Goel
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
David.Hall
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
David Hall
3673586267 MCOL-4252 Fix up configuration 2020-08-18 12:09:31 -05:00
David Hall
2880d0871f MCOL-4247 add break to case 2020-08-18 11:47:06 -05:00
David Hall
7ba40a5544 MCOL-4247 TYpecast causes wrong virtual function 2020-08-17 17:34:58 -05:00
David Hall
e7b8abfdb9 MCOL-3827 Optimize out sort on SubQuery in Select 2020-08-17 14:40:22 -05:00
benthompson15
30d3930f96 MCOL-4155: rename the cnf file for enterprise builds. 2020-08-12 15:21:32 -05:00
David Hall
478426c8bf MCOL-3814 add back lower to viewName assignment 2020-08-12 10:00:04 -05:00
Roman Nozdrin
26895ccdb3 Remove x-columnstore.cnf b/c it breaks minor-upgrade on RPM-based distros 2020-07-27 12:04:49 +00:00
benthompson15
219f67d162 MCOL-4181: Possible setting of ci->stats.fUser to NULL causing crash. 2020-07-20 15:18:58 -05:00
David.Hall
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
Roman Nozdrin
851275b04a MCOL-4166 Change UDF functions called during post/pre-install
Set plugin_maturity = beta
2020-07-13 13:23:12 +00:00
Roman Nozdrin
6b3c6e33c5 MCOL-4152 Reset cond_stack with ha_mcs::reset() call 2020-07-13 13:18:57 +00:00
Roman Nozdrin
9604fc5f10 MCOL-4164 Multi-table DROP. 2020-07-12 17:55:37 +00:00
Roman Nozdrin
cfc61fb5df Don't install files w/o the target. 2020-07-10 18:42:24 +00:00
Roman Nozdrin
7e868bc588 add dependency for generated header files errorids.h messageids.h patch made by Ben. 2020-07-10 18:38:49 +00:00
Gagan Goel
a446e81379 Merge pull request #1329 from dhall-MariaDB/MCOL-4126
Mcol 4126
2020-07-08 13:37:52 -04:00
Patrick LeBlanc
449a1bd229 Set our maturity level to gamma. 2020-07-07 11:12:34 -04:00
Sergei Golubchik
87055f42f6 make columnstore to load in enterprise
.cnf file overwriting plugin-maturity must be lexicographically
after mariadb-enterprise.cnf

also set the maturity correctly without relying on supermodule doing it
2020-07-07 11:10:54 -04:00
Patrick LeBlanc
9a462c3b96 Changed the plugin threshold from beta to gamma in our cnf file. 2020-07-07 11:10:45 -04:00
David Hall
734801846a Merge branch 'develop' into MCOL-4126 2020-07-02 10:41:16 -05:00
Patrick LeBlanc
1390372c35 Define a dummy columnstore target when doing a standalone build. 2020-06-30 13:02:07 -04:00
David Hall
085b06d422 Merge branch 'develop' into MCOL-4126 2020-06-30 11:25:11 -05:00
David Hall
8179ffffdf MCOL-4126 Don't reset ci->tableOid if not autocommit. 2020-06-30 11:21:30 -05:00
Patrick LeBlanc
9675439e86 Merge pull request #1316 from dhall-MariaDB/MCOL-4124
MCOL-4124 return error when COMMIT|ROLLBACK error
2020-06-30 11:00:08 -05:00
Patrick LeBlanc
41745490ed Revert "MCOL-4126 reset ci->tableOid after INSERT|DELETE" 2020-06-30 10:37:34 -05:00
Patrick LeBlanc
9dd6d1fb5c Merge pull request #1318 from dhall-MariaDB/MCOL-4126
MCOL-4126 reset ci->tableOid after INSERT|DELETE
2020-06-30 09:26:44 -05:00
Patrick LeBlanc
f094358e85 Merge pull request #1319 from vuvova/develop
fix auto-disabling of the columnstore for bintars
2020-06-30 09:13:59 -05:00
Sergei Golubchik
1e8eaa0550 fix RPM detection
RPM|DEB is not a valid cmake condition

Also: DRY
2020-06-30 16:04:09 +02:00
David Hall
ff3a7835c5 MCOL-4124 Don't not return error when Insert fails 2020-06-29 17:50:11 -05:00
David Hall
0a2fe7d2fb MCOL-4126 reset ci->tableOid after INSERT|DELETE 2020-06-29 16:20:05 -05:00
Patrick LeBlanc
8b76a68257 Merge pull request #1311 from tntnatbry/MCOL-4109
MCOL-4109 Error out instead of sending a warning
2020-06-29 14:20:12 -05:00
David Hall
4dddaa0274 MCOL-4124 return error when COMMIT|ROLLBACK error 2020-06-29 11:21:02 -05:00
Patrick LeBlanc
d840fab5a3 Merge pull request #1309 from dhall-MariaDB/MCOL-4100
MCOL-4100 Use correct collation for certain functions
2020-06-29 10:32:01 -05:00
Gagan Goel
2ba9263df4 Silence -Werror=implicit-fallthrough compiler errors - Patch from Monty.
The patch also fixes some potential bugs due to missing break
statements.
2020-06-26 12:32:57 -04:00
Patrick LeBlanc
cc7251d9db Merge pull request #1306 from benthompson15/MCOL-4030
MCOL-4030
2020-06-26 09:49:54 -05:00
Gagan Goel
bdf1336ad7 MCOL-4109 Error out instead of sending a warning
when a non-existing table is dropped.

This patch accomodates the changes made to server 10.5 as part
of MDEV-11412, where the server now tries to drop the table from
all storage engines when a .frm table does not exist.

We were earlier retuning a warning to the client and setting the
return code to 0. We now instead return ER_NO_SUCH_TABLE_IN_ENGINE
error code to the server if the table does not exist in
ColumnStore.
2020-06-25 22:57:05 -04:00
Roman Nozdrin
1e0fa1aaa0 Disable plugin for bintar builds. 2020-06-25 12:45:05 +00:00
David Hall
3f15ed1303 MCOL-4100 Use correct collation for certain functions
LOCATE, INSTR, STRCMP and FIND_IN_SET
2020-06-24 15:32:22 -05:00
benthompson15
eac7dab096 MCOL-4030: first commit of warning removals unneed const and missing virtual dtors. 2020-06-23 13:51:36 -05:00
Roman Nozdrin
1ac4b8db38 MCS now reduces plugin_maturity down to beta. 2020-06-21 12:51:38 +00:00
Roman Nozdrin
d7bfef41bb Change the way MCS runs SQL installing the plugin.
Clean MDB objects up uninstalling the plugin.
2020-06-18 13:34:51 +00:00