Search code examples
mysqlodbcconnectordsnunixodbc

MySQL Connector ODBC odbc.ini 'Option' flag values


First off, thank you for taking the time and effort to read over this question.

I am attempting to better understand how the value specified in the 'Option' property in a odbc.ini file (on a Unix/Linux system) is determined.

After searching over the MySQL documentation for value(s) the 'Option' flag can take on, I am uncertain how a value of '3' is arrived at, as in the following example odbc.ini file. The value of '3' what I am finding in nearly all examples on the web:

;
; odbc.ini
;

[ODBC Data Sources]
MySQL = MySQL Server

[MySQL]
Driver      = MySQL
Description = MySQL Server Data Source
Server      = localhost
Port        = 3306
Database    = test
User        = root
Password    =
Option      = 3
Socket      = 

My question is what does a value of '3' represent (i.e., which flags are combined to arrive at a value of '3')? The lowest values I see (per the resources noted below) are 'FOUND_ROWS' with a value of '2', which leaves room for another flag that has at most a value of '1'. Instead of this, would a value of '3' represent 3 separate options that total up to '3'?

Any insight as to what flags/options are reflected in this totaled value of '3' would be greatly appreciated.

The resources that I have used are:

Thank you!

Michael


Solution

  • I know this is a very old question, but I was just looking for the same answer and this was the only reference to the issue I could find.

    I had used the MyODBC connector back in 2005 and used an option value of 1 (amongst others).

    Upon needing to use the connector again now, I couldn't find reference to what Option=1 meant.

    WaybackMachine provided the answer:

    Connection Parameters
        Value  Description
          1    The client can't handle that MyODBC returns the real width of a column.
    

    hth,

    d