I nearly went crazy because I could not get field information while accessing mysql results from the raw mysql.nim wrapper. I was unsure about how to access them and nothing worked.
After debugging memory many segfaults later I found that TFIELD has the wrong size for the mysqlclient 5.5 lib on my system (8 bytes short). Looking up the sources I found that TFIELD has a "extension void*" as last member of the struct since some time between 5.0 and 5.5. So casting to array does not work in Nim.
I changed to use mysql.fetch_field_direct() which works and is probably the better solution anyway.
Still. I wonder if that can be fixed in the wrapper/mysql.nim but I just can think of creating special versions using static information (I did that already to proof that this was the problem).
Is there a way to make this dynamic for that lib? Like checking which version used while compiling and change the lib on the fly?