You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run into an issue with enableExperimentalRollbackInTransaction flag. My environment:
MySQL v8.0.34
Prisma v5.1.1
I'm trying to test the endpoint with the transaction inside and set enableExperimentalRollbackInTransaction = true. However, I get a MySQL 1295 error when entering transaction code in the endpoint during test.
{
error: PrismaClientKnownRequestError:
Invalid `prisma.$executeRawUnsafe()` invocation:
Raw query failed. Code: `1295`. Message: `This command is not supported in the prepared statement protocol yet`
at Hr.handleRequestError (/node_modules/.pnpm/@prisma+client@5.1.1_prisma@5.1.1/node_modules/@prisma/client/runtime/library.js:122:6999)
at Hr.handleAndLogRequestError (/node_modules/.pnpm/@prisma+client@5.1.1_prisma@5.1.1/node_modules/@prisma/client/runtime/library.js:122:6388)
at Hr.request (/node_modules/.pnpm/@prisma+client@5.1.1_prisma@5.1.1/node_modules/@prisma/client/runtime/library.js:122:6108)
at l (/node_modules/.pnpm/@prisma+client@5.1.1_prisma@5.1.1/node_modules/@prisma/client/runtime/library.js:126:10298)
at OfficeService.createOffice (/api/src/services/OfficeService.ts:83:5)
at Object.<anonymous> (/api/src/tests/Office/createOffice.integration.test.ts:71:7) {
code: 'P2010',
clientVersion: '5.1.1',
meta: {
code: '1295',
message: 'This command is not supported in the prepared statement protocol yet'
}
}
}
In MySQL, there are docs with SQL Syntax Permitted in Prepared Statements and it seems that SAVEPOINT is not on this list. My guess would be because of that we're not able to run $executeRawUnsafe properly. But maybe I did something wrong in the process. Did you test enableExperimentalRollbackInTransaction also for MySQL database?
The text was updated successfully, but these errors were encountered:
Hello,
Really nice library!
Run into an issue with
enableExperimentalRollbackInTransaction
flag. My environment:I'm trying to test the endpoint with the transaction inside and set
enableExperimentalRollbackInTransaction = true
. However, I get a MySQL1295
error when entering transaction code in the endpoint during test.Error points to the code
In MySQL, there are docs with SQL Syntax Permitted in Prepared Statements and it seems that
SAVEPOINT
is not on this list. My guess would be because of that we're not able to run$executeRawUnsafe
properly. But maybe I did something wrong in the process. Did you testenableExperimentalRollbackInTransaction
also for MySQL database?The text was updated successfully, but these errors were encountered: