1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

some clean up

This commit is contained in:
Georg Richter
2012-12-16 12:05:40 +01:00
parent e0ec9add5c
commit 4042f22bdb
13 changed files with 28 additions and 25 deletions

View File

@@ -12,17 +12,21 @@ SET(CPACK_PACKAGE_VERSION_PATCH 0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
ENDIF()
IF(WIN32)
# Speedup system tests
INCLUDE(${CMAKE_SOURCE_DIR}/WindowsCache.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/WindowsCache.cmake)
ENDIF()
IF(UNIX)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wno-uninitialized")
ENDIF()
# If the build type isn't specified, set to Relwithdebinfo as default.
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Relwithdebinfo")
@@ -40,10 +44,10 @@ MATH(EXPR MYSQL_VERSION_ID "${MYSQL_CLIENT_VERSION_MAJOR} * 10000 +
${MYSQL_CLIENT_VERSION_PATCH}")
IF (NOT MYSQL_PORT)
SET(MYSQL_PORT 3306)
ENDIF (NOT MYSQL_PORT)
ENDIF ()
IF(NOT MYSQL_UNIX_ADDR)
SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock")
ENDIF(NOT MYSQL_UNIX_ADDR)
ENDIF()
# todo: we don't character sets in share - all is compiled in
SET(SHAREDIR "share")
@@ -59,7 +63,7 @@ IF(WIN32)
SET(HAVE_THREADS 1)
ADD_DEFINITIONS(-DHAVE_DLOPEN)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996" )
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /W4 /Wall" )
ELSEIF()
SET(HAVE_THREADS ${CMAKE_USE_PTHREADS})
ENDIF()
@@ -72,13 +76,11 @@ ENDIF()
ENDIF()
# check for various include files
INCLUDE(LibmysqlIncludeFiles.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckIncludeFiles.cmake)
# check for various functions
INCLUDE(LibmysqlFunctions.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckFunctions.cmake)
# check for various types
INCLUDE(LibmysqlTypes.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/CheckTypes.cmake)
# Check for OpenSSL
FIND_PACKAGE(OpenSSL)

View File

@@ -111,7 +111,7 @@ typedef uint rf_SetTimer;
#define bool_defined
#define byte_defined
#define HUGE_PTR
#define STDCALL __stdcall /* Used by libmysql.dll */
#define STDCALL __stdcall /* Used by libmariadb.dll */
#define VOID_SIGHANDLER
#define SIZEOF_CHAR 1

View File

@@ -1,4 +1,5 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
2012 by MontyProgram AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -15,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */
/* defines for the libmysql library */
/* defines for the libmariadb library */
#ifndef _mysql_h
#define _mysql_h

View File

@@ -33,7 +33,7 @@
/**
Authentication failed. Additionally, all other CR_xxx values
(libmysql error code) can be used too.
(libmariadb error code) can be used too.
The client plugin may set the error code and the error message directly
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
@@ -46,7 +46,7 @@
Authentication (client part) was successful. It does not mean that the
authentication as a whole was successful, usually it only means
that the client was able to send the user name and the password to the
server. If CR_OK is returned, the libmysql reads the next packet expecting
server. If CR_OK is returned, the libmariadb reads the next packet expecting
it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
*/
#define CR_OK -1
@@ -54,7 +54,7 @@
Authentication was successful.
It means that the client has done its part successfully and also that
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
In this case, libmysql will not read a packet from the server,
In this case, libmariadb will not read a packet from the server,
but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the

View File

@@ -33,7 +33,7 @@
/**
Authentication failed. Additionally, all other CR_xxx values
(libmysql error code) can be used too.
(libmariadb error code) can be used too.
The client plugin may set the error code and the error message directly
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
@@ -46,7 +46,7 @@
Authentication (client part) was successful. It does not mean that the
authentication as a whole was successful, usually it only means
that the client was able to send the user name and the password to the
server. If CR_OK is returned, the libmysql reads the next packet expecting
server. If CR_OK is returned, the libmariadb reads the next packet expecting
it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
*/
#define CR_OK -1
@@ -54,7 +54,7 @@
Authentication was successful.
It means that the client has done its part successfully and also that
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
In this case, libmysql will not read a packet from the server,
In this case, libmariadb will not read a packet from the server,
but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the

View File

@@ -18,7 +18,7 @@
/**
@file
Support code for the client side (libmysql) plugins
Support code for the client side (libmariadb) plugins
Client plugins are somewhat different from server plugins, they are simpler.
@@ -230,7 +230,7 @@ static void load_env_plugins(MYSQL *mysql)
my_free(free_env, MYF(0));
}
/********** extern functions to be used by libmysql *********************/
/********** extern functions to be used by libmariadb *********************/
/**
Initializes the client plugin layer.

View File

@@ -711,13 +711,13 @@ mysql_debug(const char *debug __attribute__((unused)))
DBUG_PUSH(env);
#if !defined(_WINVER) && !defined(WINVER)
puts("\n-------------------------------------------------------");
puts("MYSQL_DEBUG found. libmysql started with the following:");
puts("MYSQL_DEBUG found. libmariadb started with the following:");
puts(env);
puts("-------------------------------------------------------\n");
#else
{
char buff[80];
strmov(strmov(buff,"libmysql: "),env);
strmov(strmov(buff,"libmariadb: "),env);
MessageBox((HWND) 0,"Debugging variable MYSQL_DEBUG used",buff,MB_OK);
}
#endif

View File

@@ -53,7 +53,6 @@ void usage(void)
int main(int argc, char **argv)
{
int error;
int c;
my_progname= argv[0];

View File

@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "my_test.h"
#ifdef ENABLE_IF_IN_USE
static int enable_general_log(MYSQL *mysql, int truncate)
{
int rc;
@@ -51,7 +52,7 @@ static int restore_general_log(MYSQL *mysql)
return OK;
}
#endif
/* Test update/binary logs */