Opened 9 years ago
Closed 9 years ago
#2792 closed defect (fixed)
db.describe and mysql
Reported by: | fpouw | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.3 |
Component: | Database | Version: | 7.0.0 |
Keywords: | db.describe, mysql | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
A query result form this component causes v.db.addcolumn and (consequently) v.db.join to fail.
db.describe reports the mysql "double" tables as
column:cat description: type:DOUBLE PRECISION len:22 scale:0 precision:31 default: nullok:yes select:? update:?
When the len value (e.g. 22) is then used by the v.db.join function (which calls v.db.addcolumn), the process fails in the execution of the mysql command:
ALTER TABLE <table_name> ADD COLUMN <column_name> DOUBLE PRECISION(22)
This is because mysql expect the format: ...DOUBLE PRECISION(M,D).
"Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal point." from: http://dev.mysql.com/doc/refman/5.7/en/floating-point-types.html
Change History (4)
comment:1 by , 9 years ago
Keywords: | db.describe mysql added |
---|---|
Milestone: | → 7.0.3 |
comment:2 by , 9 years ago
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Attempt to fix this issue in r67376.