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

Must reject numbers in incorrect floating point format

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2
    • 10.2
    • JSON
    • None

    Description

      These incorrect values shouldn't be accepted by st_geomfromjson :

      select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.e]}'));
      select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.0]}'));
      select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5eeeeee10eee]}'));
      select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5e]}'));
      

      current output:

      MariaDB [test]> select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.e]}'));
      +---------------------------------------------------------------------------+
      | st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.e]}')) |
      +---------------------------------------------------------------------------+
      | POINT(1 0)                                                                |
      +---------------------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.0]}'));
      +---------------------------------------------------------------------------+
      | st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,-.0]}')) |
      +---------------------------------------------------------------------------+
      | POINT(1 0)                                                                |
      +---------------------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5eeeeee10eee]}'));
      +------------------------------------------------------------------------------------+
      | st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5eeeeee10eee]}')) |
      +------------------------------------------------------------------------------------+
      | POINT(1 5)                                                                         |
      +------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5e]}'));
      +--------------------------------------------------------------------------+
      | st_astext(st_geomfromgeojson('{"type": "Point","coordinates": [1,5e]}')) |
      +--------------------------------------------------------------------------+
      | POINT(1 5)                                                               |
      +--------------------------------------------------------------------------+
      1 row in set (0.00 sec)
      

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            anikitin Andrii Nikitin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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