Skip to content

Commit d4a20d8

Browse files
committed
add support for column_name in ibm_db_column_privileges & issue #988
1 parent 1f759ef commit d4a20d8

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ If you have copied db2con*.lic file under clidriver/license directory, but still
431431

432432
OR
433433

434-
db2cli validate -database "dbname:hostname:port" -userid dbuser -passwd dbpasswd -connect -displaylic
434+
db2cli validate -database "dbname:hostname:port" -user dbuser -passwd dbpasswd -connect -displaylic
435435
```
436436
437437

ibm_db.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4529,6 +4529,8 @@ static PyObject *ibm_db_column_privileges(PyObject *self, PyObject *args)
45294529
owner = getUnicodeDataAsSQLWCHAR(py_owner, &isNewBuffer);
45304530
if (py_table_name && py_table_name != Py_None)
45314531
table_name = getUnicodeDataAsSQLWCHAR(py_table_name, &isNewBuffer);
4532+
if (py_column_name && py_column_name != Py_None)
4533+
column_name = getUnicodeDataAsSQLWCHAR(py_column_name, &isNewBuffer);
45324534

45334535
snprintf(messageStr, sizeof(messageStr), "Calling SQLColumnPrivilegesW: qualifier=%s, owner=%s, table_name=%s, column_name=%s",
45344536
qualifier ? (char *)qualifier : "NULL",
@@ -4554,6 +4556,8 @@ static PyObject *ibm_db_column_privileges(PyObject *self, PyObject *args)
45544556
PyMem_Del(owner);
45554557
if (table_name)
45564558
PyMem_Del(table_name);
4559+
if (column_name)
4560+
PyMem_Del(column_name);
45574561
}
45584562

45594563
if (rc == SQL_ERROR)

polaris.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ capture:
3838
files:
3939
- directory: ${project.projectDir}
4040
dlls:
41-
extensions: [c, cpp, h]
41+
extensions: [c, C, cpp, CPP, h, hpp]
4242
files:
4343
- directory: ${project.projectDir}
4444
analyze:

0 commit comments

Comments
 (0)