budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Unknown column 'Infinity' in 'where clause'

Open Bhuemann opened this issue 9 months ago • 5 comments

Checklist

  • [x] I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker single image via docker compose (image: https://hub.docker.com/r/budibase/budibase)
    • Budibase Version: 2.24.1
    • App Version: 2.24.1

Receive the error Unknown column 'Infinity' in 'where clause' on fetch row action. The action is 'on selection' of a card component where it pulls primary key of data displayed on the card and attempts to do a fetch row action. For all other rows Ive tested in my database this works just fine; however, this row with primary key value of 3959e3100762 seems to throw this error. I have verified the key value upon row fetch action.

To Reproduce Steps to reproduce the behavior (From my exported app): Note: These steps assume database is populated with data.

  1. Go to Explore>Trails By Name in navigation bar
  2. The name of the trail causing the issue was 'Indian Rock Ranch Skyline Trail Loop' enter this into search bar and hit enter
  3. Select card corresponding trail and error appears

Expected behavior The action will fetch the row with provided primary key.

Screenshots image image image

App Export Hiking Journal-export-1715144770453.tar.gz

Desktop

  • OS: Windows 11
  • Browser: Firefox (64-bit)
  • Version: 125.0.3

Additional context DB Schema Export: MySQL-dump.zip

Bhuemann avatar May 08 '24 05:05 Bhuemann

Hey @Bhuemann we've been looking into this. Thanks for including your app export and schema. We seeded the database with a handful of test data and were unable to reproduce the issue.

Is this happening just on one specific row? Could you provide us with a few rows (including the problematic row) so that we can look into this further?

mikesealey avatar Jun 04 '24 16:06 mikesealey

This seems to happen for specific rows. My naive assumption is underlying code is not treating the primary key as a string initially. It seems a a subset of keys that are a mix of numbers and an 'e' cause the error.

I've made some small changes to the schema and app, so I will include those again with my changes along with a mix of sample data. I've verified some of the sample data here should work while others give the 'infinity' error. Namely Strawberry Ridge Road, Bottomator, and Fisherman Fuelbreak Loop with trail_id 39751e213904 throw the error among others.

App Export MySQL-dump.zip SampleDataExport.csv

Bhuemann avatar Jun 14 '24 19:06 Bhuemann

Hey @Bhuemann,

Is there a reason you are doing the fetch row, rather than using a data provider and filtering on the one selected?

i believe you can avoid the issue you are experiencing by getting the _id passing it through to your data provider for your side panel and then repeating through the results and outputting them that way.

Button actions on the card Screenshot 2024-06-17 at 13 07 11

filtering on the data provider Screenshot 2024-06-17 at 13 07 31

Fixes the issue you seem to be having plus, the bindings within your side panel are a lot easier to reference. Screenshot 2024-06-17 at 13 09 29

Demo after making the above changes. 20240617_133741

I do believe there is a larger issue here. Will try and replicate on a smaller scale and upload a smaller export + schema etc.

Thank you for bringing that to our attention.

ConorWebb96 avatar Jun 17 '24 12:06 ConorWebb96

No I didn't do it this way for any specific reason other than I built this as I was learning the platform. Thanks for the tip though. I will make the changes :)

Bhuemann avatar Jun 18 '24 15:06 Bhuemann