Changes between Initial Version and Version 1 of Ticket #11571, comment 4
- Timestamp:
- Apr 4, 2014, 8:11:53 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11571, comment 4
initial v1 2 2 3 3 Reproduced with the following cases. 4 - PostgreSQL and SQLite: `SELECT 1 AS "%s", $USER`5 - MySQL: {{{SELECT 1 AS `%s`, $USER}}}4 - PostgreSQL: `SELECT 1 AS "%s", $USER` 5 - SQLite and MySQL: {{{SELECT 1 AS `%s`, $USER}}} 6 6 7 7 The percent sign in quoted identifier and dynamic variables in query lead the issue. Unfortunately, Trac doesn't log the error while executing report. … … 10 10 - SQLite: 11 11 {{{ 12 2014-04-04 13:08:48,947 Trac[report] WARNING: Exception caught while executing report for count: SELECT COUNT(*) FROM ( 13 SELECT 1 AS "%s", %s 14 ) AS tab, args [u'jun66j5'] 12 2014-04-04 13:08:48,947 Trac[report] WARNING: Exception caught while executing report: u'SELECT 1 AS `%s`, $USER', args {'USER': u'jun66j5'} 15 13 Traceback (most recent call last): 16 File "/home/jun66j5/src/trac/edgewall/git/trac/ticket/report.py", line 683, in execute_paginated_report 14 File "/home/jun66j5/src/trac/edgewall/git/trac/ticket/report.py", line 384, in _render_view 15 offset) 16 File "/home/jun66j5/src/trac/edgewall/git/trac/ticket/report.py", line 629, in execute_paginated_report 17 17 cursor.execute(count_sql, args) 18 File "/home/jun66j5/src/trac/edgewall/git/trac/db/util.py", line 65, in execute19 r eturnself.cursor.execute(sql_escape_percent(sql), args)18 File "/home/jun66j5/src/trac/edgewall/git/trac/db/util.py", line 54, in execute 19 r = self.cursor.execute(sql_escape_percent(sql), args) 20 20 File "/home/jun66j5/src/trac/edgewall/git/trac/db/sqlite_backend.py", line 78, in execute 21 21 result = PyFormatCursor.execute(self, *args)