Skip to content

Commit

Permalink
dbstmt: made buffer bigger for some unicode characters
Browse files Browse the repository at this point in the history
doc: added CHANGELOG.md
  • Loading branch information
dmabupt committed Dec 4, 2018
1 parent 346e2cf commit 6b45249
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 4 deletions.
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# idb-connector changelog

## 1.1.5

- Refined docs and trace for scrollable cursor
- Added a new API stmt.getStmtDiag() as alias of stmt.stmtError()
- Added CHANGLOG.md

## 1.1.4

- Added test cases for the callback in dbconn.conn()
- Updated examples with ES6 syntax
- Required dep "node-pre-gyp" 0.11.0 and above

## 1.1.3

- Fixed the NAPI callback error in DbConn::Conn()
- Ported and refined the API manual from "developerWorks"

## 1.1.2

- Removed "node-gyp" from dependency list
- Exposed data types symbols for params binding

## 1.1.1

- Supported fetching result set from stored procedures

## 1.1.0

- Swithed to N-API
- Added Blob/Binary support and corresponding docs
- Refined test cases and trace

## 1.0.13

- Supported pre-compiled binary downloading
- Fixed a memory leak issue

## 1.0.12

- Fixed the truncate issue for big numbers

## 1.0.11

- Supported Node.js v10.x

## 1.0.10

- Refined the code for fetching results and binding params
- Fixed a string param binding issue

## 1.0.9

- Fixed a statement executing issue
- Fixed a output param buffer size issue

## 1.0.8

- Added a new API stmt.reset()
- Fixed a param binding issue

## 1.0.7

- Added support for BINARY SQL data
- Fixed the 'in/out' param missing issue

## 1.0.6

- Used accurate column width to save memory usage
- Supported dynamic column width

## 1.0.5

- Provided pre-compiled binary for npm
- Renamed to idb-connector
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idb-connector",
"version": "1.1.4",
"version": "1.1.5",
"description": "A Node.js DB2 driver for IBM i",
"main": "lib/db2a.js",
"directories": {
Expand Down
6 changes: 3 additions & 3 deletions src/db2ia/dbstmt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1924,14 +1924,14 @@ int DbStmt::populateColumnDescriptions(Napi::Env env) {
case SQL_WCHAR :
case SQL_WVARCHAR :
{
maxColLen = dbColumn[i].colPrecise << 2;
maxColLen = dbColumn[i].colPrecise * 4 + 1;
rowData[i] = (SQLCHAR*)calloc(maxColLen, sizeof(SQLCHAR));
sqlReturnCode = SQLBindCol(stmth, i + 1, SQL_C_CHAR, (SQLPOINTER)rowData[i], maxColLen, &dbColumn[i].rlength);
}
break;
default :
default : // SQL_CHAR / SQL_VARCHAR
{
maxColLen = dbColumn[i].colPrecise + 1;
maxColLen = dbColumn[i].colPrecise * 4 + 1;
rowData[i] = (SQLCHAR*)calloc(maxColLen, sizeof(SQLCHAR));
sqlReturnCode = SQLBindCol(stmth, i + 1, SQL_C_CHAR, (SQLPOINTER)rowData[i], maxColLen, &dbColumn[i].rlength);
}
Expand Down

0 comments on commit 6b45249

Please sign in to comment.