Setting lower_case_table_names in C++ embedded MySQL
Posted by: Dan Stuart
Date: June 16, 2010 02:02PM

Hi everyone,

I am currently writing a C++ application with the embedded API that reads and executes SQL statements out of a .sql file after some processing. I'm working on Linux, but the SQL scripts are written by an appliciation originally developed for Windows, and as a result the table names in the file are case-inconsistent. I know that the usual solution is to set lower_case_table_names=1, but I don't know how to go about this with the embedded server.

I'm having the embedded server read options out of the /etc/my.cnf config file, where I've got "lower_case_table_names=1" under both the [mysqld] and [mysql] groups, but this isn't working, and I can't pass the server command-line arguments either since it's being started inside an executable. Is there some option in one of the initialization functions that takes command-line-like arguments?

Passing "SET lower_case_table_names=1" also doesn't work.

I know that the real solution to this is to lowercase the entire script, but unfortunately it includes some filenames that also need to be in the correct case. How do I do this?


Options: ReplyQuote

Written By
Setting lower_case_table_names in C++ embedded MySQL
June 16, 2010 02:02PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.