Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24950

Server crash on select with st_distance and where clause

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • N/A
    • N/A
    • Debian 10

    Description

      The following query crashes MariaDB server versions 10.2,10.3,10.4,10.5

      SELECT * FROM (

      SELECT id,ST_DISTANCE(p1,p2) dist FROM (
      SELECT * FROM (
      SELECT seq id, POINT(lon,lat) p1 FROM
      (SELECT seq,floor(RAND()*90) lon,floor(RAND()*180) lat FROM seq_1_to_10) s
      )t

      JOIN (
      SELECT seq id2, POINT(lon,lat) p2 FROM
      (SELECT seq,floor(RAND()*90) lon,floor(RAND()*180) lat FROM seq_1_to_10) s
      )t2 ON t.id = t2.id2

      )t

      )t WHERE dist <= 1000;

      Interestingly the query executes without the WHERE clause.

      Attached is the full error log.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              100yan Stoyan
              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.