diff --git a/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java b/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
index 62c1c736af..d322c6c259 100644
--- a/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
+++ b/core/src/main/java/lucee/runtime/config/XMLConfigWebFactory.java
@@ -2156,7 +2156,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;", "sa", "", null, DEFAULT_MAX_CONNECTION, -1, -1, 60000, true, true, DataSource.ALLOW_ALL, false, false, null, new StructImpl(), "",
+ "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, true, true, DataSource.ALLOW_ALL, false, false, null, new StructImpl(), "",
ParamSyntax.DEFAULT, false, false, false, false);
}
diff --git a/core/src/main/java/resource/fld/core-lucee.fld b/core/src/main/java/resource/fld/core-lucee.fld
index 114ec151f7..36ab4b0dd7 100755
--- a/core/src/main/java/resource/fld/core-lucee.fld
+++ b/core/src/main/java/resource/fld/core-lucee.fld
@@ -326,38 +326,6 @@ You can find a list of all available timezones in the Lucee administrator (Setti
-
-
- CurrencyFormat
- lucee.runtime.functions.international.CurrencyFormat
- date,string,formatting
- Formats a number in a locale-specific currency format.
-
- number
- currency_number
- object
- Yes
- Currency value
-
-
- type
- string
- No
- local
-
-
-
- locale
- locale
- No
- Locale to use instead of the locale of the page when processing the function
-
-
- string
-
-
-
-
IsCurrency
@@ -650,50 +618,7 @@ The function follows Java date time mask. For details, see the section Date and
number
-
-
- TimeFormat
- lucee.runtime.functions.international.TimeFormat
- date,string,formatting
- Formats a time string to a given output using the current locale.
-
- time
- any
- Yes
- date object
-
-
- mask
- string
- No
- short
-
-
-
- locale
- locale
- No
- Locale to use instead of the locale of the page when processing the function
-
-
- timezone
- timezone
- No
-
-A datetime object is independent of a specific timezone, it is only an offset in milliseconds from 1970-1-1 00.00:00 UTC (Coordinated Universal Time).
-This means that the timezone only comes into play when you need specific information like hours in a day, minutes in a hour or which day it is since those calculations depend on the timezone.
-For these calculations, a timezone must be specified in order to translate the date object to something else. If you do not provide the timezone in the function call, it will default to the timezone specified in the Lucee Administrator (Settings/Regional), or the timezone specified for the current request using the function setTimezone.
-You can find a list of all available timezones in the Lucee administrator (Settings/Regional). Some examples of valid timezones:
- - AGT (for time in Argentina)
- - Europe/Zurich (for time in Zurich/Switzerland)
- - HST (Hawaiian Standard Time in the USA)
-
-
-
- string
-
-
-
+
monthShortAsString
diff --git a/test/tickets/LDEV4181.cfc b/test/tickets/LDEV4181.cfc
index 8b05d713d6..1752baeb66 100644
--- a/test/tickets/LDEV4181.cfc
+++ b/test/tickets/LDEV4181.cfc
@@ -1,17 +1,79 @@
-component extends="org.lucee.cfml.test.LuceeTestCase" skip="false" labels="qoq" {
+component extends="org.lucee.cfml.test.LuceeTestCase" skip="true" labels="qoq" {
+
+ variables.db = server.getDatasource( "h2", server._getTempDir( "ldev-4181" ) );
+ // server.getDatasource("mysql");
+
+ function beforeAll(){
+ if ( !hasDb() )
+ return;
+ afterAll();
+ queryExecute(
+ sql="CREATE TABLE ldev4181 (
+ id numeric(11,10) NOT NULL,
+ price decimal(10,2)
+ ) ",
+ options: {
+ datasource: variables.db
+ }
+ );
+ };
+
+ function afterAll(){
+ if ( !hasDb() )
+ return;
+ queryExecute(
+ sql="drop table if exists ldev4181",
+ options: {
+ datasource: variables.db
+ }
+ );
+
+ };
+
+ private function hasDb(){
+ return !isEmpty(variables.db);
+ }
+
function run( testResults , testBox ) {
describe( title="Testcase for LDEV-4181", body=function() {
- it(title="Checking QoQ with numeric column", body = function( currentSpec ) {
+ it(title="Checking QoQ with numeric column, trailing 000s", body = function( currentSpec ) {
var qry = queryNew( 'id,test', 'numeric,string', [ [1,',1,10'],[2,',2,20'],[3,',3,30'],[4,',4,40'],[5,',5,50'],[10,',10,100'],[15,',15,150'] ] );
var queryResult = queryExecute("
- SELECT id
- FROM qry
+ SELECT id
+ FROM qry
where ','||test||',' like ('%1%')",
[],
{ dbType='query' }
);
expect(valueList(queryResult.id)).tobe("1,10,15");
});
+
+ it(title="Checking mysql query with numeric column, trailing 000s", body = function( currentSpec ) {
+ var price = 3.14;
+ queryExecute(
+ sql="INSERT INTO ldev4181 ( id, price ) VALUES ( :id, :price )",
+ params={
+ id: { value: 1, type: "int" },
+ price: { value: price, type: "decimal" }
+ },
+ options: {
+ datasource: variables.db
+ }
+ );
+
+ var qry = queryExecute(
+ sql: "SELECT * from ldev4181",
+ options: {
+ datasource: variables.db
+ }
+ );
+
+ expect( qry.recordCount ).toBe ( 1 );
+ expect( qry.toJson() ).toBe('{"COLUMNS":["id","price"],"DATA":[[1,3.14]]}');
+ expect( valueList(qry.id ) ) .toBe( "1" );
+ expect( qry.id.toString() ).toBe( 1 );
+ expect( qry.price ).toBe( price );
+ });
});
}
}
diff --git a/test/tickets/LDEV4691.cfc b/test/tickets/LDEV4691.cfc
new file mode 100644
index 0000000000..2e2eb5b7e1
--- /dev/null
+++ b/test/tickets/LDEV4691.cfc
@@ -0,0 +1,36 @@
+component extends="org.lucee.cfml.test.LuceeTestCase" labels="qoq" {
+
+ function run( testResults , testBox ) {
+
+ describe( title='QofQ' , body=function(){
+
+ it( title='QoQ check decimal types scale are preserved' , body=function() {
+ var dec = 5.57;
+ var q1 = QueryNew( "id,dec", "integer,decimal" );
+ q1.addRow( { id: 1, dec: dec } );
+ var q2 = QueryNew( "id,str", "integer,varchar" );
+ q2.addRow( { id: 1, str: "testing" } );
+
+ var q3sql = "
+ select q1.*
+ from q1, q2
+ where q1.id = q2.id
+ ";
+ var q3 = QueryExecute( q3sql, {}, {dbtype: "query"} );
+ // q3.dec should be 5.57. It was 6 instead.
+ expect( q3.dec ).toBe( dec );
+
+ var q4sql = "
+ select *
+ from q1, q2
+ where q1.id = q2.id
+ ";
+ var q4 = QueryExecute( q4sql, {}, {dbtype: "query"} );
+ // q4.dec should be 5.57. It was 6 instead.
+ expect( q4.dec ).toBe( dec );
+ });
+ });
+
+ }
+
+}
\ No newline at end of file
diff --git a/test/tickets/LDEV4695.cfc b/test/tickets/LDEV4695.cfc
new file mode 100644
index 0000000000..a40ca58cdf
--- /dev/null
+++ b/test/tickets/LDEV4695.cfc
@@ -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 );
+ });
+
+ });
+
+ }
+
+}
\ No newline at end of file