From: Michael Chase-S. <mc...@us...> - 2011-04-04 18:11:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via fb972b6c9bfe08db98b0a84f1c71e8ef55e57517 (commit) via 1d9b23b8029440f9a00652687c941911d5f79568 (commit) via c364cbf863da88948627c87757aa7cb68909434d (commit) from 645374bf0f4c244831084c96f0d35c70d8f196b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fb972b6c9bfe08db98b0a84f1c71e8ef55e57517 Author: Michael Chase-Salerno <br...@li...> Date: Mon Apr 4 14:11:08 2011 -0400 fixing NEWS commit 1d9b23b8029440f9a00652687c941911d5f79568 Merge: c364cbf863da88948627c87757aa7cb68909434d 645374bf0f4c244831084c96f0d35c70d8f196b6 Author: Michael Chase-Salerno <br...@li...> Date: Mon Apr 4 14:10:52 2011 -0400 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb Conflicts: NEWS commit c364cbf863da88948627c87757aa7cb68909434d Author: Michael Chase-Salerno <br...@li...> Date: Mon Apr 4 13:32:24 2011 -0400 Enum CQL filter on NULL cause incorrect rsp - ID: 3261868 ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 3c5d0fd..a6f53a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-04-04 Michael Chase-Salerno <br...@li...> + + * queryOperation.c, providerDrv.c + [ 3261868 ] Enum CQL filter on NULL cause incorrect rsp + (based on patch by cpoblete) + 2011-04-02 Chris Buccella <buc...@li...> * sqlLexer.l, sqlParser.y, sqlStatement.c, sqlStatement.h, Makefile.am: diff --git a/NEWS b/NEWS index 16c26d5..c0eb9a4 100644 --- a/NEWS +++ b/NEWS @@ -3,9 +3,8 @@ Changes in 1.4.2 New features: - Bugs fixed: - +- 3261868 Enum CQL filter on NULL cause incorrect rsp Changes in 1.4.1 ================ diff --git a/providerDrv.c b/providerDrv.c index 36ed3cf..de74477 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -2144,6 +2144,10 @@ queryGetValue(QLPropertySource * src, char *name, QLOpd * type) CMPIValue v = { (long long) 0 }; if (rc.rc == CMPI_RC_OK) { + if (d.state == CMPI_nullValue) { + *type=QL_Null; + } else { + if ((d.type & CMPI_SINT) == CMPI_SINT) { if (d.type == CMPI_sint32) v.sint64 = d.value.sint32; @@ -2195,6 +2199,7 @@ queryGetValue(QLPropertySource * src, char *name, QLOpd * type) default: *type = QL_Invalid; } + } } else *type = QL_NotFound; return v; diff --git a/queryOperation.c b/queryOperation.c index 2c04139..aa51700 100644 --- a/queryOperation.c +++ b/queryOperation.c @@ -857,13 +857,21 @@ _isNullEvaluate(QLOperation * op, QLPropertySource * source) exit(16); } +static int __NullEvaluate(QLOperation *op, QLPropertySource* source, int invert) +{ + QLOpd type; + CMPIValue v = getPropValue(op->lhod, source, &type); + + if (invert) + return ((type != QL_Null)); + + return ((type == QL_Null)); +} + int isNullEvaluate(QLOperation * op, QLPropertySource * source) { - QLOperand *opd = NULL; // op->lhod->ft->resolveProperty(op->lhod,source); - if (opd == NULL) - return 1; - return 0; + return __NullEvaluate(op, source, 0); } char * @@ -903,10 +911,7 @@ _isNotNullEvaluate(QLOperation * op, QLPropertySource * source) int isNotNullEvaluate(QLOperation * op, QLPropertySource * source) { - QLOperand *opd = NULL; // op->lhod->ft->resolveProperty(op->lhod,source); - if (opd == NULL) - return 0; - return 1; + return __NullEvaluate(op, source, 1); } char * diff --git a/test/xmltest/execQueryN01.lines b/test/xmltest/execQueryN01.lines new file mode 100644 index 0000000..dc4057c --- /dev/null +++ b/test/xmltest/execQueryN01.lines @@ -0,0 +1 @@ +<PROPERTY NAME="Description" TYPE="string"> diff --git a/test/xmltest/execQuerySeg01.xml b/test/xmltest/execQueryN01.xml similarity index 84% copy from test/xmltest/execQuerySeg01.xml copy to test/xmltest/execQueryN01.xml index c3d8863..6a7db38 100644 --- a/test/xmltest/execQuerySeg01.xml +++ b/test/xmltest/execQueryN01.xml @@ -11,7 +11,7 @@ <VALUE>CQL</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="Query"> -<VALUE>SELECT * FROM CIM_ComputerSystem WHERE instanceId='embedded'</VALUE> +<VALUE>SELECT * FROM CIM_ComputerSystem WHERE Description IS NOT NULL</VALUE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> diff --git a/test/xmltest/execQueryN02.lines b/test/xmltest/execQueryN02.lines new file mode 100644 index 0000000..914382e --- /dev/null +++ b/test/xmltest/execQueryN02.lines @@ -0,0 +1 @@ +!<PROPERTY NAME="Description" TYPE="string"> diff --git a/test/xmltest/execQuerySeg01.xml b/test/xmltest/execQueryN02.xml similarity index 84% copy from test/xmltest/execQuerySeg01.xml copy to test/xmltest/execQueryN02.xml index c3d8863..827cd81 100644 --- a/test/xmltest/execQuerySeg01.xml +++ b/test/xmltest/execQueryN02.xml @@ -11,7 +11,7 @@ <VALUE>CQL</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="Query"> -<VALUE>SELECT * FROM CIM_ComputerSystem WHERE instanceId='embedded'</VALUE> +<VALUE>SELECT * FROM CIM_ComputerSystem WHERE Description IS NULL</VALUE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> hooks/post-receive -- SFCB - Small Footprint CIM Broker |