Differentiating SQL types blob and text

Asked by Cat Red

Is there any way to differentiate the types blob and proxy in a resultset field? They both seem to have type MYSQL_TYPE_BLOB.

Thanks,
Catherine

I am running mysql-proxy version 0.8.1 on ubuntu.

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Proxy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Leith (mleith) said :
#1

Hi Catherine,

Unfortunately not at this time. For each field (in inj.resultset.fields[colndx]), we currently expose .type, .name, .org_name, .table, .org_table.

To properly differentiate the only way would be to also expose the character set for each of the fields (which would differ between BLOB and TEXT):

mysql> select * from information_schema.columns where table_schema = 'test' and table_name = 'chars'\G
*************************** 1. row ***************************
...
             COLUMN_NAME: a
...
      CHARACTER_SET_NAME: latin1
          COLLATION_NAME: latin1_swedish_ci
             COLUMN_TYPE: text
...
*************************** 2. row ***************************
...
             COLUMN_NAME: b
...
      CHARACTER_SET_NAME: NULL
          COLLATION_NAME: NULL
             COLUMN_TYPE: blob

Could you open up a bug on bugs.mysql.com in the Proxy category for this please?

Can you help with this problem?

Provide an answer of your own, or ask Cat Red for more information if necessary.

To post a message you must log in.