Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.6, 10.2.7
-
None
-
Operating System: CentOS Linux release 7.3.1611 (Core)
Originally found on an Amazon EC2 Instance, with Plesk as the control panel for the server. MariaDB had been upgraded twice (from the CentOS's own version to 10.1 and then to 10.2)
Replicated on an internal XenServer 7.1 instance,with a clean install of CentOS (basic install), and MariaDB 10.2 installed with no upgrade process.Operating System: CentOS Linux release 7.3.1611 (Core) Originally found on an Amazon EC2 Instance, with Plesk as the control panel for the server. MariaDB had been upgraded twice (from the CentOS's own version to 10.1 and then to 10.2) Replicated on an internal XenServer 7.1 instance,with a clean install of CentOS (basic install), and MariaDB 10.2 installed with no upgrade process.
Description
I have discovered an issue which causes the server to crash and restart, when it is trying to calculate (or after it has calculated) a virtual column. I have been able to reliably reproduce this with the table structure below, if I insert a record, update a record (regardless of if the update affects the field the virtual column is calculated on or not) or delete a record, then the next time I do a select that includes one of the virtual columns (including select *), MariaDB will crash. The reason I am listing this with the summary saying "non-cached" and I earlier said that it crashes after calculating the virtual column is that once the server has restarted, if you rerun the select, it works fine - with the correct calculated column.
The table in question is called 'supplierSendingTimes'. There are two virtual columns, looking at a JSON string to select from it two times (a start time and an end time) - with the column definitions varying only in that they select the key "start" or "end". The column definition is (the full table def is in bugReportDump.sql:
`currentStartTime` time GENERATED ALWAYS AS (coalesce(cast(json_value(json_extract(`jsonRuleString`,concat('$.singleDates."',curdate(),'"')),'$.start') as time),cast(json_value(json_extract(`jsonRuleString`,concat('$.singleDay."',dayname(curdate()),'"')),'$.start') as time),cast(json_value(json_extract(`jsonRuleString`,'$.default'),'$.start') as time))) VIRTUAL,
|
The stack trace appears to be different, depending on if you are inserting or updating; and if updating, if you are doing a select * or select <columns>. I haven't check the error logs, but it might also be different on delete, if it would be useful for me to check, please let me know.
Hopefully this is enough information, but if I can provide further information, please let me know.