- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 428
Description
There seem to be an inconsistent bug in the comments parsing method.
Having the following raw SQL query (making it a one liner doesn't change anything either):
const query = `SELECT *
						   FROM user_satellites_satellite
									FULL JOIN satellite ON user_satellites_satellite.satelliteId = satellite.id
						   WHERE user_satellites_satellite.userId = '${user.id}'
							 AND (satellite.name LIKE '%${searchQuery}%' OR satellite.description LIKE '%${searchQuery}%');`;with searchQuery being (random can be anything):
random') UNION SELECT CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), tbl_name, CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR), CAST(1 AS VARCHAR) FROM sqlite_master; --And executing it with query()
await this.dataSource.query(query);Will either return the correct and expected data or the error
The supplied SQL string contains more than one statement
Logging with NestJS shows the following query is getting executed (query logged being always the same):
The exact same query being executed multiple times over and over, e.g. by spamming, will make the query return correct data after some time, which makes the bug inconsistent:
bug.mp4
Switching the SQLite driver to the sqlite - being installed with npm install sqlite3 -  driver makes the query always work and return the expected result, hence is not related to TypeORM itself.
