connectionLimit is not set to default (-1) via AdminAPI <CFADMIN>

Description

we have the following code to create a mysql dsn

Before we don't need to set connectionLimit to -1 (since it is default)

In Lucee 5.2.x, now the default is set to empty string, and it shows 100 in admin UI

if you put connectionLimit = -1 in adminAPI, the dsn created still has no connectionLimit...

(tried both 5.2.1.9 and 5.2.2.71)

in Lucee 4.5.5, it still works...

======

<cfscript>
dsnname = 'testMySQLDSN';
dbhost = 'localhost';
dbname = 'foo';
dbuser = 'AAA';
dbpwd = '!NOTAPASSWORD';
adminpwd = 'NOTAPASSWORD!';

args = {};
//args['connectionLimit'] = -1;

args['Action'] = 'updateDatasource';
args['newName'] = dsnname;
args['name'] = dsnname;
args['host'] = dbhost;
args['database'] = dbname;
args['dbusername'] = dbuser;
args['dbpassword'] = dbpwd;
args['port'] = 3306;
args['clob'] = true;
args['blob'] = false;
args['connectionTimeout'] = 1;
args['validate'] = true;
args['dsn'] = "jdbc:mysql://{host}:{port}/{database}";
args['classname'] = "org.gjt.mm.mysql.Driver";

args['custom'] = {};
args['custom']['useOldAliasMetadataBehavior'] = true;
args['custom']['zeroDateTimeBehavior'] = 'convertToNull';
args['custom']['characterEncoding'] = 'UTF-8';
args['custom']['useUnicode'] = true;
args['custom']['useLegacyDatetimeCode'] = true;

args.type = 'server';
args.password = adminpwd;
</cfscript>

<cfadmin attributeCollection="#args#">

Environment

Windows, Linux
Java 8
MySQL 5.7

Activity

Show:

Pothys - MitrahSoft 21 September 2022 at 10:59

Pothys - MitrahSoft 19 September 2022 at 14:19

PR for 5.3:

Pothys - MitrahSoft 30 November 2021 at 07:30

I've checked this ticket with the lucee build 6.0.0.134-SNAPSHOT. If the connection limit is not set in AdminAPI means it's set to default -1. So I marked this ticket as deployed.

Michael Offner 29 November 2021 at 13:53

please give this build another try

Pothys - MitrahSoft 15 December 2020 at 07:34
Edited

I've checked this ticket with lucee latest version 5.3.8.119-SNAPSHOT also, the issue doesn't fix. I added a fix and changed the test case for this ticket. Before that, the test case passed successfully because the test case if run as twice. For the first time, lucee doesn't store the connection limit value in an XML file. So the cfadmin action=getdatasource get the connectionlimit default to 100. But second time it stores the correct connectionlimit value in an XML file, so the test case passes.

Pull Request: https://github.com/lucee/Lucee/pull/1123

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 4 August 2017 at 19:54
Updated 21 September 2022 at 10:59
Resolved 30 November 2021 at 07:30