Different results for QUOTE() with control characters between SQLite3 Fiddle and sqlite-jdbc

Abierto
#1,390 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java, sqlite
Área
database

Línea de trabajo

The report names QUOTE() behavior in sqlite-jdbc and compares it with SQLite3 Fiddle, but it does not identify a source file or test. Start by checking how the bundled SQLite version handles QUOTE() for the provided control characters, then compare the query output with the reported results. Done means determining whether the outputs are expected and documenting or correcting the discrepancy; the issue has had no activity for 220 days.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

troubleshooting

Describe the bug
I noticed inconsistent behavior for the QUOTE() function when the input string contains control characters. The same query produces different results in SQLite3 Fiddle and sqlite-jdbc.

To Reproduce
Run the following SQL query:
SELECT QUOTE('L' || char(0x17) || 'A' || char(0x13) || '2');
In SQLite3 Fiddle and sqlite-jdbc, this query returns different outputs.

Expected behavior
I expected QUOTE() to produce identical output across both environments.
Is this difference expected, or could it indicate an inconsistency in how control characters are handled?

Logs
Result in sqlite-jdbc
'L A 2'

results in SQLite3 Fiddle
unistr('''L\u0017A\u00132''')

Environment (please complete the following information):
OS: Windows 11
CPU architecture: x86_64
sqlite-jdbc version: 3.51.2.0

Additional context
The difference seems to occur specifically when the input string contains control characters. It is unclear whether this is intended behavior or a potential inconsistency between environments.

Image
Lenguaje dominante
Java
Estrellas
3.3k
Forks
676
Merge medio
1 d 15 h
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de xerial/sqlite-jdbc

Todos los issues de xerial/sqlite-jdbc

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.