Question

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

Was it helpful?

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

OTHER TIPS

Extracting all values from the Wayback Machine archive linked above:

1
The client can't handle that MyODBC returns the real width of a column.
2
The client can't handle that MySQL returns the true value of affected rows. If this flag is set, MySQL returns “found rows” instead. You must have MySQL 3.21.14 or newer to get this to work.
4
Make a debug log in c:\myodbc.log. This is the same as putting MYSQL_DEBUG=d:t:O,c::\myodbc.log in AUTOEXEC.BAT. (On Unix, the file is /tmp/myodbc.log.)
8
Don't set any packet limit for results and parameters.
16
Don't prompt for questions even if driver would like to prompt.
32
Enable or disable the dynamic cursor support. (Not allowed in MyODBC 2.50.)
64
Ignore use of database name in db_name.tbl_name.col_name.
128
Force use of ODBC manager cursors (experimental).
256
Disable the use of extended fetch (experimental).
512
Pad CHAR columns to full column length.
1024
SQLDescribeCol() returns fully qualified column names.
2048
Use the compressed client/server protocol.
4096
Tell server to ignore space after function name and before ‘(’ (needed by PowerBuilder). This makes all function names keywords.
8192
Connect with named pipes to a mysqld server running on NT.
16384
Change LONGLONG columns to INT columns (some applications can't handle LONGLONG).
32768
Return 'user' as Table_qualifier and Table_owner from SQLTables (experimental).
65536
Read parameters from the [client] and [odbc] groups from my.cnf.
131072
Add some extra safety checks (should not be needed but...).
262144
Disable transactions.
524288
Enable query logging to c:\myodbc.sql(/tmp/myodbc.sql) file. (Enabled only in debug mode.)
1048576
Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you don't want the driver to cache the entire result set.
2097152
Force the use of Forward-only cursor type. In case of applications setting the default static/dynamic cursor type, and one wants the driver to use non-cache result sets, then this option ensures the forward-only cursor behavior.

Here is the page that is not part of the wayback machine, and lists all of the "OPTION" settings for odbc.ini file.

https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-parameters.html#codbc-dsn-option-combos

The reason I was here was because there was an option incorrectly set and I needed to find the correct setting. The option i was looking for was 67108864, which was not listed in the wayback machine...

The above page is more complete.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top