Fixed bug in identifying bind variables in SQL statements containing
multiple line comments with multiple asterisks before the closing slash.
This commit is contained in:
parent
5250faee6f
commit
ddfa64e3fe
|
@ -19,6 +19,8 @@ Thin Mode Changes
|
||||||
lists in full connect descriptors.
|
lists in full connect descriptors.
|
||||||
#) Fixed bug in handling database response in certain unusual circumstances.
|
#) Fixed bug in handling database response in certain unusual circumstances.
|
||||||
#) Fixed bug in handling exceptions raised during connection establishment.
|
#) Fixed bug in handling exceptions raised during connection establishment.
|
||||||
|
#) Fixed bug in identifying bind variables in SQL statements containing
|
||||||
|
multiple line comments with multiple asterisks before the closing slash.
|
||||||
|
|
||||||
Thick Mode Changes
|
Thick Mode Changes
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
|
|
@ -131,7 +131,7 @@ cdef class Parser:
|
||||||
if ch != '*':
|
if ch != '*':
|
||||||
break
|
break
|
||||||
in_comment = True
|
in_comment = True
|
||||||
elif not exiting_comment and ch == '*':
|
elif ch == '*':
|
||||||
exiting_comment = True
|
exiting_comment = True
|
||||||
elif exiting_comment:
|
elif exiting_comment:
|
||||||
if ch == '/':
|
if ch == '/':
|
||||||
|
|
|
@ -180,6 +180,15 @@ class TestCase(test_env.BaseTestCase):
|
||||||
)
|
)
|
||||||
self.assertEqual(self.cursor.bindnames(), ["BV1", "BV2", "BV3", "BV4"])
|
self.assertEqual(self.cursor.bindnames(), ["BV1", "BV2", "BV3", "BV4"])
|
||||||
|
|
||||||
|
def test_5213_multiple_line_comment_multiple_asterisks(self):
|
||||||
|
"5213 - multiple line comment with multiple asterisks"
|
||||||
|
self.cursor.prepare(
|
||||||
|
"/****--select * from :a where :a = 1\n"
|
||||||
|
"select * from table_names where :a = 1****/\n"
|
||||||
|
"select :table_name, :value from dual"
|
||||||
|
)
|
||||||
|
self.assertEqual(self.cursor.bindnames(), ["TABLE_NAME", "VALUE"])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test_env.run_test_cases()
|
test_env.run_test_cases()
|
||||||
|
|
Loading…
Reference in New Issue