lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

SET NAMES 'latin1' fails in MySQL compatibility mode #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
if i understand it correctly, mysql compatibility mode means general mysql
command could be executed successfully. (and hopefully take effect) 

after connected, the following command fails:
SET NAMES 'latin1' 

org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement SET NAMES[*]
'latin1'; expected @, AUTOCOMMIT, MVCC, EXCLUSIVE, IGNORECASE, PASSWORD,
SALT, MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER,
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, DB_CLOSE_ON_EXIT,
ACCESS_MODE_LOG, AUTO_SERVER, AUTO_RECONNECT, ASSERT, ACCESS_MODE_DATA,
DATABASE_EVENT_LISTENER_OBJECT, RECOVER, SCHEMA, DATESTYLE, SEARCH_PATH,
SCHEMA_SEARCH_PATH, LOGSIZE; SQL statement:
SET NAMES 'latin1' [42001-107]
    at org.h2.message.Message.getSQLException(Message.java:103)

Original issue reported on code.google.com by mingfai...@gmail.com on 1 Feb 2009 at 4:10

GoogleCodeExporter commented 9 years ago
> mysql compatibility mode means general mysql
> command could be executed successfully

In theory, yes. However it doesn't mean 100% compatibility.

Why do you execute SET NAMES 'latin1'?

Original comment by thomas.t...@gmail.com on 6 Feb 2009 at 4:47

GoogleCodeExporter commented 9 years ago
I am doing some experimental works to try to get some popular 
php applications work on Quercus PHP engine and H2. those 
sql (and also the sql from the other issues i raised recently) are 
from those php apps. 

I didnt expect h2 to get identical effect, but just want the sql not 
to cause exception so that there wont be error and, if possible, 
try to achieve similar effect

Original comment by mingfai...@gmail.com on 6 Feb 2009 at 6:12

GoogleCodeExporter commented 9 years ago

Original comment by thomas.t...@gmail.com on 27 Feb 2009 at 5:48

GoogleCodeExporter commented 9 years ago
Feature requests are tracked in the Roadmap at
http://www.h2database.com/html/roadmap.html
I will move this request there and close it here.
There will be a link to this issue.

Original comment by thomas.t...@gmail.com on 3 Apr 2009 at 12:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I would be very interested in seeing this working as well! The problem is, is 
that H2 Mysql compatibility mode is not compatible with the Quercus MySQL 
driver (this driver is actually responsible for executing the SET NAMES ... 
command). Where can I upvote the feature request for making H2 Mysql 
compatibility mode compatible with the SET NAMES ... command?

Original comment by jagermei...@gmail.com on 5 Jul 2012 at 4:07