mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
msi: Accept '\5' and '-' in SQL identifiers.
This commit is contained in:
parent
f4bcb105d2
commit
f80f1cc2db
@ -683,6 +683,30 @@ static void test_msibadqueries(void)
|
||||
r = try_query( hdb, "select * from 'c'");
|
||||
ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n");
|
||||
|
||||
r = try_query( hdb, "CREATE TABLE `\5a` (`b` CHAR NOT NULL PRIMARY KEY `b`)" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "SELECT * FROM \5a" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "CREATE TABLE `a\5` (`b` CHAR NOT NULL PRIMARY KEY `b`)" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "SELECT * FROM a\5" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "CREATE TABLE `-a` (`b` CHAR NOT NULL PRIMARY KEY `b`)" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "SELECT * FROM -a" );
|
||||
todo_wine ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "CREATE TABLE `a-` (`b` CHAR NOT NULL PRIMARY KEY `b`)" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = try_query( hdb, "SELECT * FROM a-" );
|
||||
ok( r == ERROR_SUCCESS , "query failed: %u\n", r );
|
||||
|
||||
r = MsiCloseHandle( hdb );
|
||||
ok(r == ERROR_SUCCESS , "Failed to close database transact\n");
|
||||
|
||||
|
@ -166,9 +166,9 @@ static int sqliteKeywordCode(const WCHAR *z, int n){
|
||||
*/
|
||||
static const char isIdChar[] = {
|
||||
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x */
|
||||
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1x */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2x */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, /* 2x */
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */
|
||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 4x */
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 5x */
|
||||
|
Loading…
Reference in New Issue
Block a user