[MDEV-26776] mroonga_libgroonga_support_lz4 is set to ON even when lz4 is not available, CREATE behavior changes Created: 2021-10-06 Updated: 2021-10-09 Resolved: 2021-10-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Mroonga |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The variable mroonga_libgroonga_support_lz4 is documented as OFF by default. In fact, on older versions, e.g. on 10.6, it appears to be system/build-dependent: on builds where lz4 is available it is set to ON by default, otherwise OFF. For example on the latest 10.6 build from buildbot, on Debian-10 it is ON and on SLES-12 it is OFF. When a table with lz4 compression is attempted to be created, if lz4 support is OFF, a warning is issued ("Warning 16506 The column flag 'COMPRESS_LZ4' is unsupported. It is ignored") and the compression is ignored. However on 10.7 with compression providers, mroonga_libgroonga_support_lz4 is always ON, even on the same SLES-12 which doesn't have lz4 at all. And on Debian-10 it is ON regardless whether the provider is loaded or not. And then, when a table with lz4 compression is attempted to be created, an error ER_PROVIDER_NOT_LOADED occurs instead of the warning described above. The test case is just running something like
with a specific combination of the variable and the providers. |
| Comments |
| Comment by Sergei Golubchik [ 2021-10-08 ] | ||||||||||||||||||||||||||||
|
Isn't it the same in InnoDB and elsewhere? The engine always supports lz4 (and all other compressions can be possibly enabled at compile time). But you'll get an error when you're actually trying to use it if you don't have the provider loaded. | ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2021-10-08 ] | ||||||||||||||||||||||||||||
No, but the exact analogy doesn't work here. It is a variable for Mroonga, but it is a status value for InnoDB.
Do you mean it as an intended change in 10.7? | ||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-10-09 ] | ||||||||||||||||||||||||||||
|
It's a read-only variable. Basically, it serves a purpose of showing the status, whether mroonga knows about lz4, although, technically a user can turn an existing support OFF. What was changed is its default value. Yes, it was an intended change. Mroonga now always supports lz4 internally. If one loads a provider plugin, mroonga will use it. | ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2021-10-09 ] | ||||||||||||||||||||||||||||
|
For the record, the variable is not just informational, it also changes the behavior of CREATE. I tried to indicate it in the description, but it turned out inaccurate. Here is another attempt.
* same regardless whether provider_lz4 is not installed or it had never been built for the system The bold outcomes above indicate behavior with the default value of the variable, and red indicates a change. It is not a great change, as it goes like this:
However I don't think it's critical enough, so if it was intended, then so be it. In general, judging by the results, I think that the variable was meant to be changed to non-default only one way, ON => OFF, to make the compression option be ignored. It was not expected to be changed from OFF to ON, and the result in this case was not good even before. |