[MXS-2732] Memory leak with QC Created: 2019-10-26 Updated: 2019-11-01 Resolved: 2019-11-01 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | qc_sqlite |
| Affects Version/s: | 2.3.12 |
| Fix Version/s: | 2.3.14, 2.4.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | huangyouqian | Assignee: | Johan Wikman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Sprint: | MXS-SPRINT-93 |
| Description |
|
SQL:
|
| Comments |
| Comment by markus makela [ 2019-10-27 ] | |||||||||||||||
|
Oddly enough, I get a similar leak with invalid SQL (notice the unbalanced parentheses):
If the SQL is corrected, the leak goes away. | |||||||||||||||
| Comment by Johan Wikman [ 2019-10-29 ] | |||||||||||||||
|
There are two problems here.
The latter example causes a leak with the sqlite3 version used in MaxScale, but not e.g. with the sqlite3 release of my Ubuntu. | |||||||||||||||
| Comment by Johan Wikman [ 2019-11-01 ] | |||||||||||||||
|
The parser of MaxScale has now been enhanced so that it will recognize _charset_name'string', for instance, _latin1' ' as a string. In this case, it means that the example statement will be fully parsed and hence the sqlite3 leak will not occur. However, the actual sqlite3 bug - a failure to parse a statement should not cause a leak - has not been fixed. |