MySQL stored procedure to INSERT DELAYED but CREATE TABLE first if needed?

Posted by dkamins on Stack Overflow See other posts from Stack Overflow or by dkamins
Published on 2010-06-16T19:43:36Z Indexed on 2010/06/16 20:02 UTC
Read the original article Hit count: 160

I'm planning on doing a lot of INSERT DELAYED into MyISAM tables. But the tables might not exist yet. Let's say e.g. a new table will exist for each day.

So instead of detecting absence of table in my client and creating then retrying the insert, it seems like a good case for a stored procedure ("function").

Is this possible, and what would it look like? Are there any downsides to this approach?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about stored-procedures