diff options
author | Frederick Muriuki Muriithi | 2024-03-22 06:52:57 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-03-22 06:52:57 +0300 |
commit | dd5aab0bcddbbfaaf94a9eb03e5c8f6f4580e703 (patch) | |
tree | 8b5007543073bb6e508c032a45c53f58c6b9a564 | |
parent | d2d819e0b77d4abd3b50d7f7bb1832613f7f21fc (diff) | |
download | gn-gemtext-dd5aab0bcddbbfaaf94a9eb03e5c8f6f4580e703.tar.gz |
Database: New issue.
-rw-r--r-- | issues/database-ProbeSetSE-schema-bug.gmi | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/issues/database-ProbeSetSE-schema-bug.gmi b/issues/database-ProbeSetSE-schema-bug.gmi new file mode 100644 index 0000000..a451002 --- /dev/null +++ b/issues/database-ProbeSetSE-schema-bug.gmi @@ -0,0 +1,52 @@ +# Database: `ProbeSetSE` Schema Bug + +## Tags + +* type: bug +* priority: critical +* status: open +* keywords: database, mariadb, schema +* assigned: + +## Description + +The schemas are defined as follows: + +``` +MariaDB [db_webqtl]> DESC Strain; ++-----------+----------------------+------+-----+---------+----------------+ +| Field | Type | Null | Key | Default | Extra | ++-----------+----------------------+------+-----+---------+----------------+ +| Id | int(20) | NO | PRI | NULL | auto_increment | +| Name | varchar(100) | YES | MUL | NULL | | +| Name2 | varchar(100) | YES | | NULL | | +| SpeciesId | smallint(5) unsigned | NO | | 0 | | +| Symbol | varchar(20) | YES | MUL | NULL | | +| Alias | varchar(255) | YES | | NULL | | ++-----------+----------------------+------+-----+---------+----------------+ +6 rows in set (0.00 sec) + +MariaDB [db_webqtl]> DESC ProbeSetData; ++----------+------------------+------+-----+---------+-------+ +| Field | Type | Null | Key | Default | Extra | ++----------+------------------+------+-----+---------+-------+ +| Id | int(10) unsigned | NO | PRI | 0 | | +| StrainId | int(20) | NO | PRI | NULL | | +| value | float | NO | | NULL | | ++----------+------------------+------+-----+---------+-------+ +3 rows in set (0.00 sec) + +MariaDB [db_webqtl]> DESC ProbeSetSE; ++----------+----------------------+------+-----+---------+-------+ +| Field | Type | Null | Key | Default | Extra | ++----------+----------------------+------+-----+---------+-------+ +| DataId | int(10) unsigned | NO | PRI | 0 | | +| StrainId | smallint(5) unsigned | NO | PRI | 0 | | +| error | float | YES | | NULL | | ++----------+----------------------+------+-----+---------+-------+ +3 rows in set (0.00 sec) +``` + +From this, you can see that "ProbeSetSE" has the column "StrainId" but with a different size integer (smaller) than that in table "Strain". This could at best, cause errors when inserting data, if the strain exceeds the value 65535, or at worst, do a silent conversion of inserted "StrainId" values into a value in the range [0, 65535] leading to data corruption. + +The schema needs to be updated accordingly. |