What driver are you using, and any ORMs with it?
What driver are you using, and any ORMs with it?

;) is triggering the error ; -> | in the user agent when inserting and then reverse that from | -> ; when selecting. Not ideal but would unblock you for now.mysql2 but I've ran into memory leak problems just by running the SHOW TABLES example from the Hyperdrive tutorial (https://developers.cloudflare.com/hyperdrive/examples/connect-to-mysql/#mysql2)eventHandler with the example code and ran the it 25 times and noticed that the Connection objects are not collected by GC.SELECT on a table, the connection is closed and collected by GC.drizzle and had the same issue.
mysql2 without Hyperdrive? Or is this only visible when using both together?wrangler dev .output/server/index.mjs --assets .output/public --env development --remote˙SHOW TABLES; to just a SELECT * FROM my_table; it works as expected. Each request has a new Connection which is cleared up inwaitUntil export default {
async fetch(request, env, ctx) {
if (env.DEV) {
// Logic specific to local development
console.log("Running in local development mode.");
} else {
// Logic specific to production
console.log("Running in production mode.");
}
// ... rest of your Worker logic
},
};Failed to connect to the provided database: TLS handshake failed [SSLV3_ALERT_HANDSHAKE_FAILURE] [HANDSHAKE_FAILURE_ON_CLIENT_HELLO]Error: Hyperdrive does not currently support MySQL multi-statement queries"||SHOW TABLESeventHandlerConnectionwrangler dev .output/server/index.mjs --assets .output/public --env development --remoteSHOW TABLES;SELECT * FROM my_table; export async function runWithDB<T>(
context: unstable_RouterContextProvider,
callback: (db: PostgresJsDatabase) => Promise<T>
): Promise<T> {
const { HYPERDRIVE } = getBindings(context);
const sql = postgres(HYPERDRIVE.connectionString, {
prepare: false,
max: 5,
fetch_types: false,
idle_timeout: 5,
connect_timeout: 5,
max_lifetime: 60,
});
try {
const db = drizzlePostgresJs(sql);
const result = await callback(db);
return result;
} catch (err) {
console.log('err', err);
throw err;
} finally {
const ctx = await getExecutionContext(context);
ctx.waitUntil(sql.end());
}
} export const getUserByEmailAddress = async (
email: string,
context: unstable_RouterContextProvider
) => {
const [user] = await runWithDB(context, async (db: PostgresJsDatabase) => {
return await db
.select()
.from(UserTable)
.where(eq(UserTable.email, email))
.limit(1);
});
return user;
};