Subject: | More meta information from MYSQL_FIELD helpful |
For a current project, it would be nice to have more information from MYSQL_FIELD->flags and available in Perl to gain more information about column types.
What I'm currently missing is:
- ENUM_FLAG and SET_FLAG from MYSQLD_FIELD->flags to be able to detect ENUMs and SETs (which otherwise present themselves as "char")
- UNSIGNED_FLAG for unsigned detection
I could even live some kind of extension for dbd_st_FETCH_internal which simple returns MYSQLD_FIELD->flags as is, and then check the bits myself.
- MYSQL_FIELD->org_name and MYSQL_FIELD->org_table would be helpful to access original table and column names (bypassing AS aliases)
I unfortunately, due to circumstances, cannot use accesses INFORMATION_SCHEMA or SHOW COLUMNS here to query the actual column types as the queries I have to analyze are basically free form and often heavily aliased, so I cannot sensible find out the affected columns of the tables without parsing the query myself, as org_name and org_table are also not available from Perl.