SQL persistence fails to support MySQL
Bug #529735 reported by
Matt Chapman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenCog |
Won't Fix
|
Wishlist
|
linas |
Bug Description
persist/sql/README implies that MySQL is supported, but it is impossible to run atom.sql against MySQL because of the usee of the postgre-specific 'array' data type in the Atoms table:
atom.sql line 31:
outgoing INT[]
I'd suggest serializing the arrays to a string in the code to preserve database portability.
Changed in opencog: | |
importance: | Medium → Wishlist |
Changed in opencog: | |
status: | Confirmed → Won't Fix |
To post a comment you must log in.
Additional changes required for MySQL support:
(2) Atoms table index 'nodeidx' needs a limit on the length of the name index, e.g.:
-CREATE INDEX nodeidx ON Atoms(type, name);
+CREATE INDEX nodeidx ON Atoms(type, name(512));
(3) TypeCodes table needs a limit on size of typename index, e.g.:
- typename TEXT UNIQUE
+ typename VARCHAR(999) UNIQUE
(There's probably another way to do that where only the index is limited, but perhaps not for Unique. In any case, typenames should never be extraordinarily long, so I think it's perfectly reasonable to limit the size of this field.)