这个存储过程返回结果集吧? Multiple statements are only enabled(temporarily) using the MYSQL_OPTION_MULTI_STATEMENTS_ON and _OFF arguments to mysql_set_server_option().The problem here is that CLIENT_MULTI_STATEMENTS in mysql_real_connects() implicitly enables CLIENT_MULTI_RESULTS, too, but MYSQL_OPTION_MULTI_STATEMENTS_ON only enables multiple statements, not multiple results.So add CLIENT_MULTI_STATEMENTS on connect and try again.
Multiple statements are only enabled(temporarily) using the MYSQL_OPTION_MULTI_STATEMENTS_ON and _OFF arguments to mysql_set_server_option().The problem here is that CLIENT_MULTI_STATEMENTS in mysql_real_connects() implicitly enables CLIENT_MULTI_RESULTS, too, but MYSQL_OPTION_MULTI_STATEMENTS_ON only enables multiple statements, not multiple results.So add CLIENT_MULTI_STATEMENTS on connect and try again.