Versions 1.38.6 and newer include a workaround that should permit compilation with -O2 as normal.
If you suddenly started seeing this problem after switching to My SQL 5.0 from a previous version, you have run into a change in My SQLs default behavior.
There is a suspected compiler bug in GCC on 64 bit systems.
The workaround is to remove all optimizations by removing any -O compiler options such as -O2.
Per the following question: How do I propagate database changes to my file?
One of the answers seems to say the same thing, that you need to remove the entity and add it back in.
It is possible to avoid filling the transaction log with potentially lots of records while working on a big table: Using partition switching, only the metadata is changed.
There is no data movement involved and this is therefore performed really quickly (almost instantaneous). The following DDL will be used as an example in this answer: id uid name 0 65533096-5007-43EA-88AD-D6776B3B94FA 6A69D4F2-D682-4168-A92F-4CD2E2DBC21D 3 CE87F1ED-BE1A-4F2D-8D62-E1ECA822D35B AF0524D9-0DBB-41E1-883B-003CB4E4F012 8 34A1DBFD-4F92-4F34-9F04-4CDC824AB15A 02B4BDA4-D515-4262-9031-0BE496AC24CE 11 51606C95-9DE8-4C30-B23B-F915EEA41156 93258103-9C22-4F9C-85CF-712ED0FB3CE6 12 CEC80431-0513-4751-A250-0EB3390DACAB 2DA6B8AF-3EBC-42B3-A76C-028716E24661 15 5037EA83-286F-4EBC-AD7C-E237B570C1FF 095E51E9-8C38-4104-858F-D14AA810A550 If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column.
If you're running into this problem, you can try adding a few additional indexes.
The Update Model Wizard also makes some changes to the conceptual model and mappings, but it only makes these changes when objects are added to the database.
For example, new entity types are added to the conceptual model when tables are added to the database, and new properties are added to entity types when columns are added to a table.
But how can I do that after the PK already exists and have data?
CREATE TABLE dbo.ident_test ( id int NOT NULL, xyz varchar(10) NOT NULL, CONSTRAINT PK_ident_test PRIMARY KEY CLUSTERED (id) ); INSERT INTO dbo.ident_test (id, xyz) VALUES (1, 'test'), (2, 'test'), (5, 'test'), (6, 'test'), (10, 'test'), (18, 'test'), (19, 'test'), (20, 'test'); Using UPDATE, DELETE or INSERT to move data can take quite a lot of time and use resources (IO) on both data and log files/disks.