sqlitestudio icon indicating copy to clipboard operation
sqlitestudio copied to clipboard

Cannot edit this cell. Details: The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this.

Open felipelalli opened this issue 2 years ago • 10 comments

Details

When I try to edit a cell in a view:

[03:49:25] Cannot edit this cell. Details: The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this.

Steps to reproduce

Open a view and try to edit a cell with number / date.

Operating system

Linux / Debian

SQLiteStudio version

3.4.4

Screenshot_20230715_035132

felipelalli avatar Jul 15 '23 06:07 felipelalli

Would you be willing to share the query used in the view?

pawelsalawa avatar Jul 15 '23 17:07 pawelsalawa

SELECT t1.id AS table1_id,
           t2.id AS table2_id,
           t3.id AS table3_id,
           t4.*,
           t1.detail AS table1_detail,
           t1.title AS table1_title,
           t1.creation_date,
           t1.publish_date,
           t1.file_path,
           t1.image_path,
           t1.key,
           t1.labels,
           t2.raw_data
      FROM table1 t1
           JOIN
           table2 t2 ON t1.linked_to_t2 = t2.id
           JOIN
           table3 t3 ON t2.linked_to_t3 = t3.id
           JOIN
           v_full_table4 t4 ON t3.web_link = t4.link
     WHERE t1.status = 1
     ORDER BY t1.id DESC

But today I tried again and could not reproduce the bug anymore. I don't know why. I just restarted the application and now I am able to edit the row.

felipelalli avatar Jul 16 '23 07:07 felipelalli

@pawelsalawa I found the issue. I was able to reproduce it.

The problem is when the view query another view:

CREATE VIEW v_unsent AS
    SELECT *
      FROM v_full_episodes
     WHERE upload_date IS NULL AND 
           schedule_date IS NULL;

This view I can't edit.

felipelalli avatar Jul 16 '23 09:07 felipelalli

I guess (from its name) that the v_full_episodes is also a view? Could you share its query?

pawelsalawa avatar Jul 16 '23 20:07 pawelsalawa

@pawelsalawa v_full_episodes is this view: https://github.com/pawelsalawa/sqlitestudio/issues/4831#issuecomment-1637006028

I just have changed some names for privacy.

felipelalli avatar Jul 17 '23 05:07 felipelalli

Okay, got it. I'll try to reproduce it, but I'm not sure whether it will be possible just like that. Sometimes there are some specific circumstances.

I guess it won't be possible to share your database? Could be done privately to project's email [email protected] if that helps.

pawelsalawa avatar Jul 17 '23 06:07 pawelsalawa

Hi @pawelsalawa ! I'll send you an email. Thank you.

felipelalli avatar Jul 17 '23 18:07 felipelalli

@pawelsalawa I found a case where an edit on view is not allowed and the query is not another view. I'll send privately to you.

felipelalli avatar Jul 21 '23 05:07 felipelalli

It seems the problem is that the attempt to edit multi-level view is not allowed and currently this is expected. The real problem here is that the error message is misleading, because it doesn't state the problem underneath.

pawelsalawa avatar Jul 21 '23 06:07 pawelsalawa

Ok! Sad. Thank you!

felipelalli avatar Jul 21 '23 21:07 felipelalli