﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30630	MemoryError appears when using cx-Oracle 7.2 on Oracle 12c (12.1.0.2.0) with Python 3.7 (3.7.4).	Alexandru Rudi	nobody	"These are the queries being executed before the crash:
{{{#!python
Query:  ALTER SESSION SET NLS_TERRITORY = 'AMERICA'
Params:  []
Query:  ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF' TIME_ZONE = 'UTC'
Params:  []
Query:  SELECT 1 FROM DUAL WHERE DUMMY LIKE TRANSLATE(:arg0 USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)
Params:  {':arg0': 'X'}
}}}

This is the traceback output in the command line:
{{{#!python
Traceback (most recent call last):
  File "".\manage.py"", line 17, in <module>
    execute_from_command_line(sys.argv)
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\__init__.py"", line 381, in execute_from_command_line
    utility.execute()
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\__init__.py"", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\base.py"", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\base.py"", line 364, in execute
    output = self.handle(*args, **options)
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\commands\inspectdb.py"", line 34, in handle
    for line in self.handle_inspection(options):
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\core\management\commands\inspectdb.py"", line 47, in handle_inspection
    with connection.cursor() as cursor:
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\base\base.py"", line 256, in cursor
    return self._cursor()
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\base\base.py"", line 233, in _cursor
    self.ensure_connection()
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\base\base.py"", line 217, in ensure_connection
    self.connect()
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\base\base.py"", line 197, in connect
    self.init_connection_state()
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\oracle\base.py"", line 259, in init_connection_state
    ['X'])
  File ""D:\Rudi\Workspace\Visual Studio\PTT Lite\env\lib\site-packages\django\db\backends\oracle\base.py"", line 510, in execute
    return self.cursor.execute(query, self._param_generator(params))
MemoryError
}}}

The SELECT query returns 1 as a result if executed in Oracle SQL Developer so I assume the error is not in the execution of that command.
I don't know if it's a bug in Django, cx-Oracle or at some other level or if it's a configuration issue and have no clue how to proceed. 

Database information:
- Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- PL/SQL Release 12.1.0.2.0 - Production
- ""CORE	12.1.0.2.0	Production""
- TNS for Linux: Version 12.1.0.2.0 - Production
- NLSRTL Version 12.1.0.2.0 - Production

Environment:
- Python 3.7.4 64-bit
- cx-Oracle 7.2.0
- Oracle Instant Client Base Windows x64 version 19.3 (zip format) "	Bug	closed	Database layer (models, ORM)	2.2	Normal	invalid	oracle cx-oracle python-3.7		Unreviewed	0	0	0	0	0	0
