Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-42

Seg fault when printing rows containing POINT datatype

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 0.9.54
    • 0.9.55
    • DBAPI 2.0
    • 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)

      Attachments

        Activity

          People

            georg Georg Richter
            karll Karl Levik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.