Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
0.9.54
-
None
-
Python 3.7.3
pip install --user mariadb
pip show mariadb | grep Version
Version: 0.9.54
Fedora release 30 (Thirty)
Description
I have the following table and data:
CREATE DATBASE mytest; |
USE mytest; |
|
CREATE TABLE `gis_point` ( |
`g` point NOT NULL, |
SPATIAL KEY `g` (`g`) |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|
INSERT INTO gis_point (g) VALUES (PointFromText('point(1 1)')); |
Then I have this Python code:
import mariadb |
|
config = { |
'host': 'localhost', |
'user': 'root', |
'password': 'secret', |
}
|
|
conn = mariadb.connect(**config, database='mytest') |
cur = conn.cursor() |
cur.execute(f"SELECT `g` FROM `gis_point`") |
for row in cur: |
print(row) |
conn.close()
|
But running that crashes:
$ python gispoint.py
Segmentation fault (core dumped)