Bug 306523 - Cannot open table after changing to non-lowercase name
Summary: Cannot open table after changing to non-lowercase name
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 2.5.2
Platform: unspecified All
: NOR critical
Target Milestone: 2.5
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-09 22:51 UTC by Jarosław Staniek
Modified: 2014-02-12 10:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2012-09-09 22:51:50 UTC
After changing to non-lowercase name cannot open table.

Reproducible: Always

Steps to Reproduce:
1. Rename existing table in Project Navigator so it the name contains at least one new upper case letter.
2. Open the table (in data or design view)

Actual Results:  
Kexi shows error about invalid object.

Expected Results:  
Renamed table should be available as before.
Comment 1 Jarosław Staniek 2012-09-09 22:59:14 UTC
No real data loss but to fix the database, one needs to close Kexi and open project with database editor (for SQLite is can be sqlite3 command line tool or Sqliteman [sqliteman.com], for server databases -dedicated admin tools). Then:
- open kexi__objects table,
- change value of o_name column in respective record to all-lower case letters.

For example, if the altered table name was 'Persons', change o_name to 'persons'.

After starting Kexi, the table should 'work' again.
Comment 2 Jarosław Staniek 2012-09-10 22:01:36 UTC
Git commit 155a2247184551385c1fddc7d3dc1afb660e7613 by Jaroslaw Staniek.
Committed on 10/09/2012 at 01:06.
Pushed by staniek into branch 'calligra/2.5'.

Force lowercase letters for object ids; fix for not-all-lowercase names

General
*Force lower case letters for object identifiers (except for widget names)
**This adds consstency and fixes issue with
**Also fix support for objects renamed to not-all-lowercase in earlier version of Kexi.
FIXED-IN:2.5.3
REVIEW:106411

M  +5    -1    kexi/core/kexiproject.cpp
M  +4    -2    kexi/kexidb/connection.cpp
M  +19   -2    kexi/kexiutils/identifier.cpp
M  +9    -0    kexi/kexiutils/identifier.h
M  +2    -1    kexi/main/kexinamewidget.cpp
M  +4    -2    kexi/main/startup/KexiNewProjectAssistant.cpp
M  +3    -1    kexi/widget/navigator/KexiProjectItemDelegate.cpp

http://commits.kde.org/calligra/155a2247184551385c1fddc7d3dc1afb660e7613
Comment 3 Jarosław Staniek 2012-09-10 22:04:57 UTC
Git commit 5d39c992354a4eb5b836e5cf7613a0487ce18f19 by Jaroslaw Staniek.
Committed on 10/09/2012 at 01:06.
Pushed by staniek into branch 'master'.

Force lowercase letters for object ids; fix for not-all-lowercase names

General
*Force lower case letters for object identifiers (except for widget names)
**This adds consstency and fixes issue with
**Also fix support for objects renamed to not-all-lowercase in earlier version of Kexi.

M  +5    -1    kexi/core/kexiproject.cpp
M  +16   -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +19   -2    kexi/kexiutils/identifier.cpp
M  +9    -0    kexi/kexiutils/identifier.h
M  +2    -1    kexi/main/kexinamewidget.cpp
M  +4    -2    kexi/main/startup/KexiNewProjectAssistant.cpp
M  +3    -1    kexi/widget/navigator/KexiProjectItemDelegate.cpp
M  +4    -2    libs/db/connection.cpp

http://commits.kde.org/calligra/5d39c992354a4eb5b836e5cf7613a0487ce18f19
Comment 4 Jarosław Staniek 2012-10-04 22:35:07 UTC
Git commit 6e43601ab185afbbab8d18e78bf73214a17c3e64 by Jaroslaw Staniek.
Committed on 04/10/2012 at 22:13.
Pushed by staniek into branch 'calligra/2.5'.

Fix the lowercase fix and db import

KexiDB
*A fix for the lowercase fix: keep table names in original format but compare them in case-insensitive way when needed
**This way importing from databases with tables upper-case characters works

Migration
*Fix invalid SQL generation for database import
*Fix importing from databases with tables upper-case characters
Related: bug 307479
REVIEW:106726

M  +5    -11   kexi/core/kexiproject.cpp
M  +14   -11   kexi/kexidb/connection.cpp
M  +1    -1    kexi/kexidb/expression.cpp
M  +1    -1    kexi/kexidb/tableschema.cpp
M  +26   -24   kexi/migration/keximigrate.cpp
M  +4    -3    kexi/migration/mysql/mysqlmigrate.cpp

http://commits.kde.org/calligra/6e43601ab185afbbab8d18e78bf73214a17c3e64
Comment 5 Jarosław Staniek 2012-10-04 22:35:59 UTC
Git commit 420a12d13746f5d5cebd9a10d140fd66b141ab59 by Jaroslaw Staniek.
Committed on 04/10/2012 at 22:13.
Pushed by staniek into branch 'master'.

Fix the lowercase fix and db import

KexiDB
*A fix for the lowercase fix: keep table names in original format but compare them in case-insensitive way when needed
**This way importing from databases with tables upper-case characters works

Migration
*Fix invalid SQL generation for database import
*Fix importing from databases with tables upper-case characters
Related: bug 307479

M  +5    -11   kexi/core/kexiproject.cpp
M  +26   -24   kexi/migration/keximigrate.cpp
M  +4    -3    kexi/migration/mysql/mysqlmigrate.cpp
M  +14   -11   libs/db/connection.cpp
M  +1    -1    libs/db/expression.cpp
M  +1    -1    libs/db/tableschema.cpp

http://commits.kde.org/calligra/420a12d13746f5d5cebd9a10d140fd66b141ab59
Comment 6 Jarosław Staniek 2012-10-04 23:44:49 UTC
Git commit d80482e6b735b0736a62e1b3f315a5f920a24e88 by Jaroslaw Staniek.
Committed on 10/09/2012 at 01:06.
Pushed by staniek into branch 'kexi-altertable-staniek'.

Force lowercase letters for object ids; fix for not-all-lowercase names

General
*Force lower case letters for object identifiers (except for widget names)
**This adds consstency and fixes issue with
**Also fix support for objects renamed to not-all-lowercase in earlier version of Kexi.

M  +5    -1    kexi/core/kexiproject.cpp
M  +19   -2    kexi/kexiutils/identifier.cpp
M  +9    -0    kexi/kexiutils/identifier.h
M  +2    -1    kexi/main/kexinamewidget.cpp
M  +4    -2    kexi/main/startup/KexiNewProjectAssistant.cpp
M  +3    -1    kexi/widget/navigator/KexiProjectItemDelegate.cpp
M  +4    -2    libs/db/connection.cpp

http://commits.kde.org/calligra/d80482e6b735b0736a62e1b3f315a5f920a24e88
Comment 7 Jarosław Staniek 2012-10-04 23:44:54 UTC
Git commit c8d4eb10b5d8256c74c02a54d313ceb5ce5db671 by Jaroslaw Staniek.
Committed on 04/10/2012 at 22:13.
Pushed by staniek into branch 'kexi-altertable-staniek'.

Fix the lowercase fix and db import

KexiDB
*A fix for the lowercase fix: keep table names in original format but compare them in case-insensitive way when needed
**This way importing from databases with tables upper-case characters works

Migration
*Fix invalid SQL generation for database import
*Fix importing from databases with tables upper-case characters
Related: bug 307479

M  +5    -11   kexi/core/kexiproject.cpp
M  +26   -24   kexi/migration/keximigrate.cpp
M  +4    -3    kexi/migration/mysql/mysqlmigrate.cpp
M  +11   -8    libs/db/connection.cpp
M  +1    -1    libs/db/expression.cpp
M  +1    -1    libs/db/tableschema.cpp

http://commits.kde.org/calligra/c8d4eb10b5d8256c74c02a54d313ceb5ce5db671
Comment 8 Jarosław Staniek 2013-11-11 23:28:51 UTC
Git commit 74f5560d3b616f9c67f62163041148f1cfebd6c6 by Jaroslaw Staniek.
Committed on 23/10/2013 at 15:32.
Pushed by staniek into branch 'master'.

Force lowercase letters for object ids; fix for not-all-lowercase names


from Calligra master 5d39c992354a4eb5b8

M  +20   -2    Predicate/Tools/Identifier.cpp
M  +10   -0    Predicate/Tools/Identifier.h

http://commits.kde.org/predicate/74f5560d3b616f9c67f62163041148f1cfebd6c6
Comment 9 Jarosław Staniek 2013-11-11 23:28:55 UTC
Git commit 676b32b8e2f506721ce3b6573f51673b84ba998c by Jaroslaw Staniek.
Committed on 23/10/2013 at 20:20.
Pushed by staniek into branch 'master'.

Fix of handling case sensitivity of object names

*A fix for the lowercase fix: keep table names in original format but compare them in case-insensitive way when needed
**This way importing from databases with tables upper-case characters works
Related: bug 307479

from Calligra master 420a12d13746f5d5ce

M  +14   -10   Predicate/Connection.cpp
M  +1    -1    Predicate/TableSchema.cpp
M  +0    -1    Predicate/expression/VariableExpression.cpp

http://commits.kde.org/predicate/676b32b8e2f506721ce3b6573f51673b84ba998c