Trying to do a batch insert, but I keep hitting a ER_UNKNOWN_STMT_HANDLER
error.
I managed to rewrite it useing query
, but I would like to figure out how to do it using batch
Here is the code I have:
result = await conn.batch("INSERT INTO `a11yUIDB`.`TEST_questions` (`name`,`address`,`text`,`match`,`type`) VALUES (?,?,?,?,?)", [[ 'Four', 'add one', 'te `', 'Yes', 'No' ],[ 'Five', 'add one', 'te `', 'No', 'No' ]]);
Full Error:
(conn=1136, no: 1243, SQLState: HY000) Unknown prepared statement handler (0) given to mysqld_stmt_execute
sql: INSERT INTO `a11yUIDB`.`TEST_questions` (`name`,`address`,`text`,`match`,`type`) VALUES (?,?,?,?,?) -
parameters:[['Four','add one','te `','Yes','No'],['Five','add one','te `','No','No']]
Environment: Node
MariaDB Version: 10.3.13