Summary: | Kexi crashed when saving after renaming a field | ||
---|---|---|---|
Product: | [Applications] KEXI | Reporter: | Begonia <saavedra.ibarra> |
Component: | Tables | Assignee: | Jarosław Staniek <staniek> |
Status: | CLOSED FIXED | ||
Severity: | crash | CC: | adam, inksi, simonandric5, staniek |
Priority: | NOR | ||
Version: | 2.9.7 | ||
Target Milestone: | 3.1 | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kexi/1400c0fbcb4436db1bc2ad5f7d5784b676c932c9 | Version Fixed In: | 3.1.0 |
Sentry Crash Report: | |||
Bug Depends on: | 371958 | ||
Bug Blocks: |
Description
Begonia
2016-10-31 15:54:22 UTC
Confirmed, good find, Begonia! Still exists even in 3.x. Current workaround is to save after field rename, then add the reference. Since workaround exists, setting Severity to Crash. Git commit 3d6032f4f5e503f2cfdf05eeb48cf4ddcbd80aa2 by Jaroslaw Staniek. Committed on 07/01/2018 at 01:07. Pushed by staniek into branch 'master'. Expand scope of KDbTableSchemaChangeListener to allow registering queries for changes in table schema Summary: Listener related to a query can receive "close" request if table design the query depends on is about to be changed. This way for example Kexi is able to ask users to close form or report if it uses query depending on altered table. FIXED-IN:3.1.0 When table schema is removed unregister it from KDbTableSchemaChangeListener objects FIXED-IN:3.1.0 Test Plan: Test Kexi for https://phabricator.kde.org/D8118 Reviewers: piggz Reviewed By: piggz Tags: #kdb Maniphest Tasks: T7703, T7704 Differential Revision: https://phabricator.kde.org/D8117 M +1 -0 src/CMakeLists.txt M +1 -0 src/KDbConnection.cpp M +2 -1 src/KDbConnection.h M +2 -0 src/KDbConnection_p.h M +489 -30 src/KDbTableSchemaChangeListener.cpp M +78 -14 src/KDbTableSchemaChangeListener.h M +5 -0 src/config-kdb.h.cmake https://commits.kde.org/kdb/3d6032f4f5e503f2cfdf05eeb48cf4ddcbd80aa2 Git commit 1400c0fbcb4436db1bc2ad5f7d5784b676c932c9 by Jaroslaw Staniek. Committed on 07/01/2018 at 01:09. Pushed by staniek into branch 'master'. Before physical altering or deleting table ask the user to close depending table/query/report/form Summary: If table T is altered, before saving: - close all table views that use T in lookup fields - close all query views that use T - close all query views that use tables having T in lookup fields - close all tables that use queries in lookup fields and the queries use T Similarly, close all forms/reports that use tables this way. Any views are affected (data, design, text). Also: - improve existing question messages - remove Report's extended data source GUI FIXED-IN:3.1.0 Test Plan: Use the test Kexi file (uncompress before testing): {F4442302} Test 1.1: If table T is altered, before saving close all table views that use T in lookup fields. 1. Open ownership table in data view. 2. Design the persons table, rename the last (Extra) field to something else, save design. 3. Expected: Kexi asks to close the ownership table. On agreement, they are closed and the design is saved. Test 1.2. Like 1.1 but open ownership table in design view. Expected result: like in 1.1. Test 2.1. If table T is altered, before saving close all query views that use T. 1. Open persons_and_cars query in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the persons_and_cars query. On agreement, they are closed and the design is saved. Test 2.2. Like 2.1 but open the query in design view. Expected result: like in 2.1. Test 2.3. Like 2.1 but open the query in SQL view. Expected result: like in 2.1. Test 2.4. Like 2.1 but also open the **ownership table** after 2nd step. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query. On agreement, they are closed and the design is saved. Test 2.5. Like 2.4 but also open the **persons form** before saving. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query and the persons form. On agreement, they are closed and the design is saved. Test 2.6. Like 2.5 but also open the **persons report** before saving. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query and the persons form and the persons report. On agreement, they are closed and the design is saved. Test 3.1. If table T is altered, before saving close all query views that use tables having T in lookup fields. 1. Open ownership_desc query in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the ownership_desc query. On agreement, they are closed and the design is saved. Test 3.2. Like 2.1 but open the table in design view. Expected result: like in 3.1. Test 4.1. If table T is altered, before saving close all tables that use queries in lookup fields if these queries use T. 1. Open with_lookup_query table in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the with_lookup_query query. On agreement, they are closed and the design is saved. Test 4.2. Like 4.1 but open the table in design view. Expected result: like in 4.1. Test 5.1. Testing if Kexi detects dependency between **report cars** and designed **table cars** because the report uses query that uses the table. 1. Open report cars in preview. 2. Design the cars table, rename and field, try to save design (finally don't save unless you have backup of the database). 3. Expected: Kexi asks to close the report cars. Test 6.1. Improve existing question messages asking for approval for closing depending tabs: see if they sound are correct and look OK. Example: {F4440486} Test 7.1. (Extra test of functionality that was hard to separate to another patch). Updated "Report data source" page (removed Set button and the External data widgets). Test if setting table and query as data source works. Reviewers: piggz Reviewed By: piggz Tags: #kexi Maniphest Tasks: T7703, T7704 Differential Revision: https://phabricator.kde.org/D8118 M +10 -1 src/plugins/forms/kexidatasourcepage.cpp M +7 -1 src/plugins/forms/kexidatasourcepage.h M +83 -4 src/plugins/forms/kexiformpart.cpp M +21 -3 src/plugins/forms/kexiformpart.h M +10 -2 src/plugins/forms/kexiformview.cpp M +1 -1 src/plugins/forms/kexiformview.h M +75 -5 src/plugins/queries/kexiquerypart.cpp M +33 -1 src/plugins/queries/kexiquerypart.h M +42 -35 src/plugins/reports/KexiDBReportDataSource.cpp M +5 -2 src/plugins/reports/KexiDBReportDataSource.h M +36 -5 src/plugins/reports/kexireportdesignview.cpp M +5 -2 src/plugins/reports/kexireportdesignview.h M +38 -3 src/plugins/reports/kexireportpart.cpp M +19 -3 src/plugins/reports/kexireportpart.h M +2 -18 src/plugins/reports/kexireportview.cpp M +10 -25 src/plugins/reports/kexisourceselector.cpp M +15 -1 src/plugins/reports/kexisourceselector.h M +13 -8 src/plugins/tables/kexitabledesignerview.cpp M +1 -1 src/plugins/tables/kexitabledesignerview.h M +51 -26 src/plugins/tables/kexitablepart.cpp M +34 -15 src/plugins/tables/kexitablepart.h M +1 -1 src/widget/dataviewcommon/kexiformdataiteminterface.h https://commits.kde.org/kexi/1400c0fbcb4436db1bc2ad5f7d5784b676c932c9 |