Tryton - Issues

 

Issue6840

Title ir_cache with Primary Key on MySQL
Priority bug Status resolved
Superseder Nosy List a3arar, pokoli, reviewbot, roundup-bot
Type crash Components trytond
Assigned To pokoli Keywords MySQL, review
Reviews 42731002
View: 42731002

Created on 2017-10-11.16:37:38 by a3arar, last changed by roundup-bot.

Messages
New changeset 99a42169bc5b by Sergi Almacellas Abellana in branch 'default':
Add missing primary key for cache table on mysql backend
http://hg.tryton.org/trytond/rev/99a42169bc5b
review42731002 updated at https://codereview.tryton.org/42731002/#ps1
msg36218 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-10-11.17:11:12
Here is review42731002 that should fix it.
msg36216 (view) Author: [hidden] (a3arar) Date: 2017-10-11.16:37:37
While initializing the db with MySQL I got to table ir_cache and the process crashed.  The MySQL engine requested ir_cache table to have the Auto_Increment not null field to be set as primary.
When I added that in the ./trytond/backend/mysql/init.sql file to the last table ir_chache, the process move to populate other tables.  Below is how the table looked like after adding the PRIMARY KEY (id) to it.
------------------------------------------------------------
CREATE TABLE ir_cache (
    id BIGINT AUTO_INCREMENT NOT NULL,
    name VARCHAR(255),
    "timestamp" TIMESTAMP,
    PRIMARY KEY(id)
) ENGINE=InnoDB;
History
Date User Action Args
2017-10-16 13:34:28roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg36301
2017-10-11 17:17:19reviewbotsetnosy: + reviewbot
messages: + msg36219
2017-10-11 17:11:12pokolisetstatus: unread -> testing
messages: + msg36218
keyword: + MySQL, review
nosy: + pokoli
component: + trytond
reviews: 42731002
assignedto: pokoli
2017-10-11 16:56:18cedsetassignedto: sergi-nan -> (no value)
nosy: - sergi-nan
2017-10-11 16:37:38a3ararcreate

Showing 10 items. Show all history (warning: this could be VERY long)