Skip to content

Commit

Permalink
Merge pull request #2235 from zspitzer/LDEV-4695
Browse files Browse the repository at this point in the history
LDEV-4695 QoQ HSQLDB enable sql.enforce_types=false
  • Loading branch information
zspitzer authored Sep 15, 2023
2 parents c80f0b2 + 031a5de commit 0b38996
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ private static void _loadDataSources(ConfigServerImpl configServer, ConfigImpl c
try {
setDatasource(config, datasources, QOQ_DATASOURCE_NAME,
new ClassDefinitionImpl("org.hsqldb.jdbcDriver", "org.lucee.hsqldb", "2.7.2.jdk8", config.getIdentification()), "hypersonic-hsqldb", "", -1,
"jdbc:hsqldb:mem:tempQoQ;sql.regular_names=false;sql.enforce_strict_size=false;", "sa", "", null, DEFAULT_MAX_CONNECTION, -1, -1, 60000, 0, 0, 0, true, true, DataSource.ALLOW_ALL, false,
"jdbc:hsqldb:mem:tempQoQ;sql.regular_names=false;sql.enforce_strict_size=false;sql.enforce_types=false;", "sa", "", null, DEFAULT_MAX_CONNECTION, -1, -1, 60000, 0, 0, 0, true, true, DataSource.ALLOW_ALL, false,
false, null, new StructImpl(), "", ParamSyntax.DEFAULT, false, false, false, false);
}
catch (Throwable t) {
Expand Down
40 changes: 40 additions & 0 deletions test/tickets/LDEV4695.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="qoq" {

function beforeAll(){
variables.q = queryNew("navid, type, url", "varchar,decimal,VarChar",
[{
"navid": 200,
"type": 1,
"url": "football"
}
]
);
};

function run( testResults , testBox ) {

describe( title='QofQ' , body=function(){

it( title='QoQ error with types and subselect' , body=function() {

query name="local.res" dbtype="query" {
echo("
select navid, type, url
from variables.q
where url = 'football'
and type = 1
and left( navid, 3 ) in (
select navid
from variables.q
where type = 1
and url = 'football')
");
}
expect( res.recordcount ).toBe( 1 );
});

});

}

}

0 comments on commit 0b38996

Please sign in to comment.