Yes there is, even though there isn't any separate function for it. Take a look at:
http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html
You have to specify that mysql_real_query() should parse multiple statements separated by ; in advance, by enabling a flag either when connecting or using mysql_set_server_option().
mysql_set_server_option(&mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON);
This is how php implements mysqli_multi_query():
PHP_FUNCTION(mysqli_multi_query)
{
// ...
MYSQLI_ENABLE_MQ;
if (mysql_real_query(mysql->mysql, query, query_len)) {
// ...
MYSQLI_DISABLE_MQ;
// ...
RETURN_FALSE;
}
RETURN_TRUE;
}
The MYSQLI_ENABLE_MQ macro evaluates to the code I provided above.