1
/* Copyright (C) 2007 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#include <my_global.h>
22
int main (int argc, char **argv)
27
const char* query4= "INSERT INTO federated.t1 SET Value=54";
28
const char* query5= "INSERT INTO federated.t1 SET Value=55";
32
if (argc != 2 || !strcmp(argv[1], "--help"))
34
fprintf(stderr, "This program is a part of the MySQL test suite. "
35
"It is not intended to be executed directly by a user.\n");
40
if (!mysql_real_connect(
50
fprintf(stderr, "Failed to connect to database: Error: %s\n",
54
printf("%s\n", mysql_error(&conn));
57
OK = mysql_real_query (&conn, query4, strlen(query4));
61
printf("%ld inserted\n",
62
(long) mysql_insert_id(&conn));
64
OK = mysql_real_query (&conn, query5, strlen(query5));
68
printf("%ld inserted\n",
69
(long) mysql_insert_id(&conn));