From: <no...@so...> - 2002-09-15 08:00:12
|
Bugs item #609505, was opened at 2002-09-15 01:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 Category: Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: SQLWarning tuples not populated Initial Comment: There is a problem with the way that SQLWarnings are added in PyCursor.addWarning(SQLWarning). The existing code is: PyTuple warn = new PyTuple(); // there are three parts: (reason, state, vendorCode) warn.__add__(Py.java2py(warning.getMessage())); warn.__add__(Py.java2py(warning.getSQLState())); warn.__add__(Py.newInteger(warning.getErrorCode())); However, PyTuple.__add__(PyObject) silently ignores any object that is not another PyTuple instance. This means that whilst there is an entry in the PyList for each warning, the tuple has a zero length and the warnings are effectively lost. The fix is to replace the above code to use the PyTuple constructor that allows an array to be passed: PyObject[] msg = new PyObject[] { // there are three parts: (reason, state, vendorCode) Py.java2py(warning.getMessage()), Py.java2py(warning.getSQLState()), Py.newInteger(warning.getErrorCode()) }; PyTuple warn = new PyTuple(msg); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 |
From: <no...@so...> - 2002-12-24 16:58:40
|
Bugs item #609505, was opened at 2002-09-15 03:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 Category: Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: brian zimmer (bzimmer) Summary: SQLWarning tuples not populated Initial Comment: There is a problem with the way that SQLWarnings are added in PyCursor.addWarning(SQLWarning). The existing code is: PyTuple warn = new PyTuple(); // there are three parts: (reason, state, vendorCode) warn.__add__(Py.java2py(warning.getMessage())); warn.__add__(Py.java2py(warning.getSQLState())); warn.__add__(Py.newInteger(warning.getErrorCode())); However, PyTuple.__add__(PyObject) silently ignores any object that is not another PyTuple instance. This means that whilst there is an entry in the PyList for each warning, the tuple has a zero length and the warnings are effectively lost. The fix is to replace the above code to use the PyTuple constructor that allows an array to be passed: PyObject[] msg = new PyObject[] { // there are three parts: (reason, state, vendorCode) Py.java2py(warning.getMessage()), Py.java2py(warning.getSQLState()), Py.newInteger(warning.getErrorCode()) }; PyTuple warn = new PyTuple(msg); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 |
From: <no...@so...> - 2002-12-24 17:17:28
|
Bugs item #609505, was opened at 2002-09-15 03:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 Category: Library >Group: Fixed in next release >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: brian zimmer (bzimmer) Summary: SQLWarning tuples not populated Initial Comment: There is a problem with the way that SQLWarnings are added in PyCursor.addWarning(SQLWarning). The existing code is: PyTuple warn = new PyTuple(); // there are three parts: (reason, state, vendorCode) warn.__add__(Py.java2py(warning.getMessage())); warn.__add__(Py.java2py(warning.getSQLState())); warn.__add__(Py.newInteger(warning.getErrorCode())); However, PyTuple.__add__(PyObject) silently ignores any object that is not another PyTuple instance. This means that whilst there is an entry in the PyList for each warning, the tuple has a zero length and the warnings are effectively lost. The fix is to replace the above code to use the PyTuple constructor that allows an array to be passed: PyObject[] msg = new PyObject[] { // there are three parts: (reason, state, vendorCode) Py.java2py(warning.getMessage()), Py.java2py(warning.getSQLState()), Py.newInteger(warning.getErrorCode()) }; PyTuple warn = new PyTuple(msg); ---------------------------------------------------------------------- >Comment By: brian zimmer (bzimmer) Date: 2002-12-24 11:17 Message: Logged In: YES user_id=37674 Patched as suggested. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 |
From: SourceForge.net <no...@so...> - 2003-07-31 18:43:24
|
Bugs item #609505, was opened at 2002-09-15 08:00 Message generated for change (Settings changed) made by pedronis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 Category: Library >Group: Fixed in 2.2a0 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: brian zimmer (bzimmer) Summary: SQLWarning tuples not populated Initial Comment: There is a problem with the way that SQLWarnings are added in PyCursor.addWarning(SQLWarning). The existing code is: PyTuple warn = new PyTuple(); // there are three parts: (reason, state, vendorCode) warn.__add__(Py.java2py(warning.getMessage())); warn.__add__(Py.java2py(warning.getSQLState())); warn.__add__(Py.newInteger(warning.getErrorCode())); However, PyTuple.__add__(PyObject) silently ignores any object that is not another PyTuple instance. This means that whilst there is an entry in the PyList for each warning, the tuple has a zero length and the warnings are effectively lost. The fix is to replace the above code to use the PyTuple constructor that allows an array to be passed: PyObject[] msg = new PyObject[] { // there are three parts: (reason, state, vendorCode) Py.java2py(warning.getMessage()), Py.java2py(warning.getSQLState()), Py.newInteger(warning.getErrorCode()) }; PyTuple warn = new PyTuple(msg); ---------------------------------------------------------------------- Comment By: brian zimmer (bzimmer) Date: 2002-12-24 17:17 Message: Logged In: YES user_id=37674 Patched as suggested. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=609505&group_id=12867 |