Ubuntu

delete primary key make unusuable the database

Reported by Maximiliano on 2008-11-18
2
Affects Status Importance Assigned to Milestone
Glom
Fix Released
Medium
glom (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: glom

If delete the primary key field and add a new one, or modify the field type (number, text) of the primary key field, seems no way to recover the database.
The table under List tab can't display the fields, just display a message "right click to display .....etc"
Ubuntu 8.04 and 8.10
Glom 1.8.1 and 1.6.17

Related branches

Murray Cumming (murrayc) wrote :

Yes, it should not allow you to close the Field Definitions window with no primary key defined. Actually it crashes now when I do that. That is the main issue.

However, when I deleted the primary key for a new table and then added a new one, in 1.8 (svn trunk), it did not show that message in the list view. It just showed the other fields that were already on the list view that I had not deleted.

Murray Cumming (murrayc) wrote :

This should be fixed by this commit, with prevents there ever being no primary key:

2008-11-25 Murray Cumming <email address hidden>

 * glom/libglom/utils.[h|cc]:
 Added a show_ok_dialog() overload that takes the parent_window as a
 pointer to simplify code by avoiding the need for a null check by
 callers.

 * glom/mode_design/fields/box_db_table_definition.cc:
 check_field_change(): Refuse to leave no primary key set because
 the rest of Glom expects each table to have one, by refusing to
 directly unset a primary key.
 When setting a primary key, ask the user if they really want to _change_
 the primary key, and do the suitability checks that were previously in
 change_definition().
 change_definition(): When setting a primary key, unset the previous
 primary key first.

 This prevents the table from ever having no primary key.
 Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/glom/+bug/299549
 (elmergato)
 Glom bug #562147

Changed in glom:
status: New → Fix Committed
Changed in glom:
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glom - 1.8.5-0ubuntu1

---------------
glom (1.8.5-0ubuntu1) jaunty; urgency=low

  * New upstream release (LP: #256701), fixes LP bugs:
    + Clear the text in property dialogs for text items (LP: #309147)
    + Don't crash when showing and then hiding the grid (LP: #303453)
    + Temporarily remember the sort order so it is the same when navigating
      away and back (LP: #303422)
    + Use the list's sort order for the top-level records in the report
      (LP: #303425)
    + Users/Groups: Disable drag-and-drop for the treeview, because it is
      useless and confusing (LP: #299573)
    + Import: Sort the fields list alphabetically (LP: #306593)
    + delete primary key make unusuable the database (LP: #299549)
    + Spanish translate incomplete (LP: #299556)
    + import date format error (LP: #299591)
    + can't delete data from table list view (LP: #299853)
    + Field definition: default value not saved (LP: #299896)
    + reports crashing (LP: #300054)
    + Year error with date fields (LP: #300057)
    + list view: 2 records added instead of 1 (LP: #300819)
  * debian/control: Refreshed dependencies for libglom-dev.
  * debian/control: Updated build-deps to match configure checks. goocavnasmm
    build-dep bumped to version without .la files.
  * debian/rules: Don't delete the directory containing the templates.
  * debian/control, debian/rules, debian/glom-doc.*: Split out
    arch-independent manual and examples into separate package glom-doc, which
    is now recommended by glom (glom will still work if they're not available)
  * debian/copyright: Rewritten to new machine-readable format.

 -- Iain Lane <email address hidden> Sun, 11 Jan 2009 17:12:01 +0000

Changed in glom:
status: Fix Committed → Fix Released
Changed in glom:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.