Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.5.9, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
When running the complex query repeatedly in the stored procedure random garbage or empty results are returned on occasion.
Data dump with SP and test are contained in attachment. With the SP rewritten to store the output in a table the results that are correct and incorrect are as follows:
+-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+
|
| customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException |
|
+-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+
|
| reference1 | 1 | NULL | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | 0 |
|
+-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+
|
Under high concurrency (should be a static result) from 10000 iterations the following rows were inserted:
mysql ds2 -e "select * from results where customerReference<>'reference1'"
|
+--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+
|
| customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException |
|
+--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+
|
| w ( ?? 0??K | 0 | NULL | NULL | NULL | 2020-01-01 10:10:10 | NULL | 2147483647 | NULL | NULL | 0 | NULL | NULL |
|
| | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL |
|
| w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w rence1 | 1 | | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | 1 | NULL | NULL | NULL |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w rence1 | 1 | | | NULL | NULL | 2020-01-01 10:10:10 | 1 | NULL | NULL | NULL | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w rence1 | 1 | | NULL | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL |
|
| | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w rence1 | 1 | | NULL | | NULL | NULL | 1 | 1 | 1 | 0 | NULL | NULL |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| w ( ?? 0??K | 0 | NULL | NULL | | 2020-01-01 10:10:10 | NULL | 2147483647 | 0 | 1 | 0 | 7036-87-44 17:76:64 | NULL |
|
| w rence1 | 1 | | | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | NULL | NULL | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 2147483647 | 0 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 0 | | | ?K | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
| | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 |
|
+--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+
|
Attachments
Issue Links
- is duplicated by
-
MDEV-23130 Server crashes on 2nd execution of sp
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
When running the complex query repeatedly in the stored procedure random garbage or empty results are returned on occasion.
Data dump with SP and test are contained in attachment. With the SP rewritten to store the output in a table the results that are correct and incorrect are as follows: +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | reference1 | 1 | NULL | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | 0 | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ Under high concurrency (should be a static result) from 1000 iterations the following rows were inserted: mysql ds2 -e "select * from results where customerReference<>'reference1'" +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | w ( ?? 0??K | 0 | NULL | NULL | NULL | 2020-01-01 10:10:10 | NULL | 2147483647 | NULL | NULL | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | 1 | NULL | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | NULL | NULL | 2020-01-01 10:10:10 | 1 | NULL | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | NULL | NULL | 1 | 1 | 1 | 0 | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w ( ?? 0??K | 0 | NULL | NULL | | 2020-01-01 10:10:10 | NULL | 2147483647 | 0 | 1 | 0 | 7036-87-44 17:76:64 | NULL | | w rence1 | 1 | | | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 2147483647 | 0 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | ?K | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ |
When running the complex query repeatedly in the stored procedure random garbage or empty results are returned on occasion.
Data dump with SP and test are contained in attachment. With the SP rewritten to store the output in a table the results that are correct and incorrect are as follows: +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | reference1 | 1 | NULL | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | 0 | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ Under high concurrency (should be a static result) from 10000 iterations the following rows were inserted: mysql ds2 -e "select * from results where customerReference<>'reference1'" +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | w ( ?? 0??K | 0 | NULL | NULL | NULL | 2020-01-01 10:10:10 | NULL | 2147483647 | NULL | NULL | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | 1 | NULL | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | NULL | NULL | 2020-01-01 10:10:10 | 1 | NULL | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | NULL | NULL | 1 | 1 | 1 | 0 | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w ( ?? 0??K | 0 | NULL | NULL | | 2020-01-01 10:10:10 | NULL | 2147483647 | 0 | 1 | 0 | 7036-87-44 17:76:64 | NULL | | w rence1 | 1 | | | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 2147483647 | 0 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | ?K | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Affects Version/s | 5.5 [ 15800 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.0 [ 16000 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Oleksandr Byelkin [ sanja ] |
Description |
When running the complex query repeatedly in the stored procedure random garbage or empty results are returned on occasion.
Data dump with SP and test are contained in attachment. With the SP rewritten to store the output in a table the results that are correct and incorrect are as follows: +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | reference1 | 1 | NULL | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | 0 | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ Under high concurrency (should be a static result) from 10000 iterations the following rows were inserted: mysql ds2 -e "select * from results where customerReference<>'reference1'" +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | w ( ?? 0??K | 0 | NULL | NULL | NULL | 2020-01-01 10:10:10 | NULL | 2147483647 | NULL | NULL | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | 1 | NULL | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | NULL | NULL | 2020-01-01 10:10:10 | 1 | NULL | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | NULL | NULL | 1 | 1 | 1 | 0 | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w ( ?? 0??K | 0 | NULL | NULL | | 2020-01-01 10:10:10 | NULL | 2147483647 | 0 | 1 | 0 | 7036-87-44 17:76:64 | NULL | | w rence1 | 1 | | | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 2147483647 | 0 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | ?K | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ |
When running the complex query repeatedly in the stored procedure random garbage or empty results are returned on occasion.
Data dump with SP and test are contained in attachment. With the SP rewritten to store the output in a table the results that are correct and incorrect are as follows: {noformat} +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ | reference1 | 1 | NULL | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | 0 | +-------------------+--------------+-----------------+------------+----------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+----------------+---------------------+ {noformat} Under high concurrency (should be a static result) from 10000 iterations the following rows were inserted: {noformat} mysql ds2 -e "select * from results where customerReference<>'reference1'" +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | customerReference | policyNumber | schemeReference | schemeName | applicationReference | modifiedCreatedDateTime | demandCreatedDateTime | countDemands | genericDemandId | status | isUrgent | reactivateDate | isBusinessException | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ | w ( ?? 0??K | 0 | NULL | NULL | NULL | 2020-01-01 10:10:10 | NULL | 2147483647 | NULL | NULL | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | w rence1 | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | NULL | 1 | NULL | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | | NULL | NULL | 2020-01-01 10:10:10 | 1 | NULL | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | NULL | NULL | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w rence1 | 1 | | NULL | | NULL | NULL | 1 | 1 | 1 | 0 | NULL | NULL | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | w ( ?? 0??K | 0 | NULL | NULL | | 2020-01-01 10:10:10 | NULL | 2147483647 | 0 | 1 | 0 | 7036-87-44 17:76:64 | NULL | | w rence1 | 1 | | | NULL | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | NULL | NULL | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 2147483647 | 0 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 0 | | | ?K | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | | | 1 | | | | 2020-01-01 10:10:10 | 2020-01-01 10:10:10 | 1 | 1 | 1 | 0 | 0000-00-00 00:00:00 | 0 | +--------------------------------+--------------+-----------------+------------+----------------------------------------------------+-------------------------+-----------------------+--------------+-----------------+--------+----------+---------------------+---------------------+ {noformat} |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Labels | need_feedback |
Labels | need_feedback |
Component/s | Prepared Statements [ 10804 ] |
Summary | Complex query in Store procedure corrupts results under high concurrency | Complex query in Store procedure corrupts results |
Assignee | Oleksandr Byelkin [ sanja ] | Igor Babaev [ igor ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Igor Babaev [ igor ] | Oleksandr Byelkin [ sanja ] |
Fix Version/s | 10.2.38 [ 25207 ] | |
Fix Version/s | 10.3.29 [ 25206 ] | |
Fix Version/s | 10.4.19 [ 25205 ] | |
Fix Version/s | 10.5.10 [ 25204 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 120234 ] | MariaDB v4 [ 159045 ] |
Link |
This issue duplicates |
Link |
This issue is duplicated by |
Link |
This issue duplicates |
Zendesk Related Tickets | 144504 |