MariaDb: right syntax of PREPARE statement for CONNECT type tables when passing string variable
This looks like a bug as you can run this code just fine against an InnoDB table. It should work the same way against a Connect table, but apparently it doesn't. So I'd suggest you file a bug report in the MariaDB Server Jira project.