AnsweredAssumed Answered

ExecuteSQL Crash With Incomplete "FETCH FIRST" Query

Question asked by ReidLarson on May 3, 2018
Latest reply on May 11, 2018 by TSGal

Product and version:

FileMaker Pro Advanced 13-16 (probably 12 too, but I don't have that installed) (also probably non-Advanced)

 

OS and version:

macOS High Sierra version 10.13.4

 

Hardware:

iMac (27-inch, Late 2013), 3.2 GHz Intel Core i5, 8 GB 1600 MHz DDR3, NVIDIA GeForce GT 755M 1024 MB

 

Description:

The following calculation will make the program crash as soon as it's evaluated while any file is open:

ExecuteSQL ( "

    FETCH F

    " ; "" ; "" )

This appears to apply anywhere calculations are evaluated, including:

  • Data viewer
  • Field calculations
  • Hide object when
  • Set variable scrip step
  • Conditional formatting

 

I will often test SQL in the data viewer while "automatically evaluate" is on. I like to add "FETCH FIRST 1 ROW ONLY" before I get started to limit how taxing the calculation can be. I'll remove it later to get the actual results I need. I generally start with this base function:

ExecuteSQL ( "

 

    " ; "" ; "" )

I then start typing "FETCH FIRST 1 ROW ONLY" into the appropriate location. As soon as the "F" in "FIRST" is typed, the program crashes. "FETCH FI", "FETCH FIR", and "FETCH FIRS" will also cause a crash. "FETCH FIRST" and beyond will not cause a crash.

 

I've attached a crash report.

 

How to replicate:

  1. Open any FileMaker file (the Contacts starter solution will work fine).
  2. Open the data viewer.
  3. Click "Add Expression".
  4. Ensure "Automatically evaluate" is checked.
  5. Enter the following text (copy and paste will work) into the expression:

ExecuteSQL ( "

    FETCH F

    " ; "" ; "" )

Workarounds:

  • Turn automatically evaluate off.
  • Don't start by adding "FETCH FIRST 1 ROW ONLY" in the query.

Outcomes