[MDEV-20116] segfault on mysql_escape_string Created: 2019-07-22 Updated: 2019-08-08 Resolved: 2019-08-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.3.16 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Inada Naoki | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 19.04, Debian Buster |
||
| Description |
|
When `mysql_escape_string` is called without creating any connections: ``` In case of MySQL, default character set should be used, instead of segv. |
| Comments |
| Comment by Georg Richter [ 2019-08-07 ] |
|
The default character set is zero. (cset=0x0). That means the library was not properly initialized and the default character set was not loaded. See mysql_library_init() for more information. |
| Comment by Inada Naoki [ 2019-08-08 ] |
|
Thank you for your answer. |
| Comment by Georg Richter [ 2019-08-08 ] |
|
It doesn't work well without it, unless you call *mysql_init() *which checks if the library was initialized (and if not initializes the library). |