/* This is a autogenerated file with all the API calls in the manual. It can be used to test the headers and the linking of this file with the supplied MySQL libraries. You can also test if it can be compiled with a C++ compiler, i.e. if the headers correctly defines these functions as C functions and don't mangle the function names. To force C++ compilation using GCC, add the flag "-x c++". */ #ifdef _WINDOWS #include #endif #include #include /* Variables for all types used in calls below */ MYSQL * mysql_p; MYSQL_BIND * mysql_bind_p; MYSQL_FIELD * mysql_field_p; MYSQL_FIELD_OFFSET mysql_field_offset_t; MYSQL_RES * mysql_res_p; MYSQL_ROW mysql_row_t; MYSQL_ROW_OFFSET mysql_row_offset_t; MYSQL_STMT * mysql_stmt_p; char * char_p; char ** char_p_p; const char * const_char_p; const void * const_void_p; enum enum_mysql_set_option enum_enum_mysql_set_option_t; enum mysql_enum_shutdown_level enum_enum_shutdown_level_t; enum enum_stmt_attr_type enum_enum_stmt_attr_type_t; enum mysql_option enum_mysql_option_t; int int_t; my_bool my_bool_t; my_ulonglong my_ulonglong_t; unsigned int unsigned_int_t; unsigned long unsigned_long_t; unsigned long * unsigned_long_p; void * void_p; /* Fake calls of all functions in the manual */ int main(int argc, char **argv) { fprintf(stderr, "Hello world!\n"); if (argc != 100) /* Fool compiler not to optimize away the rest */ { return 0; } my_ulonglong_t = mysql_affected_rows ( mysql_p ); my_bool_t = mysql_change_user ( mysql_p, const_char_p, const_char_p, const_char_p ); const_char_p = mysql_character_set_name ( mysql_p ); mysql_close ( mysql_p ); mysql_data_seek ( mysql_res_p, my_ulonglong_t ); mysql_debug ( const_char_p ); int_t = mysql_dump_debug_info ( mysql_p ); my_bool_t = mysql_eof ( mysql_res_p ); unsigned_int_t = mysql_errno ( mysql_p ); const_char_p = mysql_error ( mysql_p ); mysql_field_p = mysql_fetch_field ( mysql_res_p ); mysql_field_p = mysql_fetch_fields ( mysql_res_p ); mysql_field_p = mysql_fetch_field_direct ( mysql_res_p, unsigned_int_t ); unsigned_long_p = mysql_fetch_lengths ( mysql_res_p ); mysql_row_t = mysql_fetch_row ( mysql_res_p ); unsigned_int_t = mysql_field_count ( mysql_p ); mysql_field_offset_t = mysql_field_seek ( mysql_res_p, mysql_field_offset_t ); mysql_field_offset_t = mysql_field_tell ( mysql_res_p ); mysql_free_result ( mysql_res_p ); const_char_p = mysql_get_client_info ( ); unsigned_long_t = mysql_get_client_version ( ); const_char_p = mysql_get_host_info ( mysql_p ); unsigned_int_t = mysql_get_proto_info ( mysql_p ); const_char_p = mysql_get_server_info ( mysql_p ); unsigned_long_t = mysql_get_server_version ( mysql_p ); unsigned_long_t = mysql_hex_string ( char_p, const_char_p, unsigned_long_t ); const_char_p = mysql_info ( mysql_p ); mysql_p = mysql_init ( mysql_p ); my_ulonglong_t = mysql_insert_id ( mysql_p ); int_t = mysql_kill ( mysql_p, unsigned_long_t ); int_t = mysql_library_init ( int_t, char_p_p, char_p_p ); mysql_library_end ( ); mysql_res_p = mysql_list_dbs ( mysql_p, const_char_p ); mysql_res_p = mysql_list_fields ( mysql_p, const_char_p, const_char_p ); mysql_res_p = mysql_list_processes ( mysql_p ); mysql_res_p = mysql_list_tables ( mysql_p, const_char_p ); unsigned_int_t = mysql_num_fields ( mysql_res_p ); my_ulonglong_t = mysql_num_rows ( mysql_res_p ); int_t = mysql_options ( mysql_p, enum_mysql_option_t, const_char_p ); int_t = mysql_ping ( mysql_p ); int_t = mysql_query ( mysql_p, const_char_p ); mysql_p = mysql_real_connect ( mysql_p, const_char_p, const_char_p, const_char_p, const_char_p, unsigned_int_t, const_char_p, unsigned_long_t ); unsigned_long_t = mysql_real_escape_string ( mysql_p, char_p, const_char_p, unsigned_long_t ); int_t = mysql_real_query ( mysql_p, const_char_p, unsigned_long_t ); int_t = mysql_reload ( mysql_p ); mysql_row_offset_t = mysql_row_seek ( mysql_res_p, mysql_row_offset_t ); mysql_row_offset_t = mysql_row_tell ( mysql_res_p ); int_t = mysql_select_db ( mysql_p, const_char_p ); int_t = mysql_set_server_option ( mysql_p, enum_enum_mysql_set_option_t ); int_t = mysql_shutdown ( mysql_p, enum_enum_shutdown_level_t ); const_char_p = mysql_sqlstate ( mysql_p ); int_t = mysql_ssl_set ( mysql_p, const_char_p, const_char_p, const_char_p, const_char_p, const_char_p ); const_char_p = mysql_stat ( mysql_p ); mysql_res_p = mysql_store_result ( mysql_p ); unsigned_long_t = mysql_thread_id ( mysql_p ); mysql_res_p = mysql_use_result ( mysql_p ); unsigned_int_t = mysql_warning_count ( mysql_p ); my_bool_t = mysql_commit ( mysql_p ); my_bool_t = mysql_rollback ( mysql_p ); my_bool_t = mysql_autocommit ( mysql_p, my_bool_t ); my_bool_t = mysql_more_results ( mysql_p ); int_t = mysql_next_result ( mysql_p ); my_ulonglong_t = mysql_stmt_affected_rows ( mysql_stmt_p ); int_t = mysql_stmt_attr_get ( mysql_stmt_p, enum_enum_stmt_attr_type_t, void_p ); int_t = mysql_stmt_attr_set ( mysql_stmt_p, enum_enum_stmt_attr_type_t, const_void_p ); my_bool_t = mysql_stmt_bind_param ( mysql_stmt_p, mysql_bind_p ); my_bool_t = mysql_stmt_bind_result ( mysql_stmt_p, mysql_bind_p ); my_bool_t = mysql_stmt_close ( mysql_stmt_p ); mysql_stmt_data_seek ( mysql_stmt_p, my_ulonglong_t ); unsigned_int_t = mysql_stmt_errno ( mysql_stmt_p ); const_char_p = mysql_stmt_error ( mysql_stmt_p ); int_t = mysql_stmt_execute ( mysql_stmt_p ); my_bool_t = mysql_stmt_free_result ( mysql_stmt_p ); my_ulonglong_t = mysql_stmt_insert_id ( mysql_stmt_p ); int_t = mysql_stmt_fetch ( mysql_stmt_p ); int_t = mysql_stmt_fetch_column ( mysql_stmt_p, mysql_bind_p, unsigned_int_t, unsigned_long_t ); unsigned_int_t = mysql_stmt_field_count ( mysql_stmt_p ); mysql_stmt_p = mysql_stmt_init ( mysql_p ); my_ulonglong_t = mysql_stmt_num_rows ( mysql_stmt_p ); unsigned_long_t = mysql_stmt_param_count ( mysql_stmt_p ); mysql_res_p = mysql_stmt_param_metadata ( mysql_stmt_p ); int_t = mysql_stmt_prepare ( mysql_stmt_p, const_char_p, unsigned_long_t ); my_bool_t = mysql_stmt_reset ( mysql_stmt_p ); mysql_res_p = mysql_stmt_result_metadata ( mysql_stmt_p ); mysql_row_offset_t = mysql_stmt_row_seek ( mysql_stmt_p, mysql_row_offset_t ); mysql_row_offset_t = mysql_stmt_row_tell ( mysql_stmt_p ); my_bool_t = mysql_stmt_send_long_data ( mysql_stmt_p, unsigned_int_t, const_char_p, unsigned_long_t ); const_char_p = mysql_stmt_sqlstate ( mysql_stmt_p ); int_t = mysql_stmt_store_result ( mysql_stmt_p ); my_bool_t = mysql_thread_init ( ); mysql_thread_end ( ); unsigned_int_t = mysql_thread_safe ( ); int_t = mysql_server_init ( int_t, char_p_p, char_p_p ); mysql_server_end ( ); return 0; }