Merge branch 'develop' into MAX-268
This commit is contained in:
commit
48489234be
@ -108,6 +108,7 @@ if(NOT ( ${DEBBUILD} STREQUAL "DEBBUILD-NOTFOUND" ) )
|
||||
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
|
||||
execute_process(COMMAND dpgk --print-architecture OUTPUT_VARIABLE DEB_ARCHITECTURE)
|
||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEB_ARCHITECTURE})
|
||||
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
message(STATUS "Generating DEB packages for ${DEB_ARCHITECTURE}")
|
||||
endif()
|
||||
|
||||
@ -115,17 +116,16 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MaxScale")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${MAXSCALE_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${MAXSCALE_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${MAXSCALE_VERSION_PATCH}")
|
||||
set(CPACK_PACKAGE_CONTACT "SkySQL Ab")
|
||||
set(CPACK_PACKAGE_CONTACT "MariaDB Corporation Ab")
|
||||
set(CPACK_PACKAGE_FILE_NAME "maxscale-${MAXSCALE_VERSION}")
|
||||
set(CPACK_PACKAGE_NAME "maxscale")
|
||||
set(CPACK_PACKAGE_VENDOR "SkySQL Ab")
|
||||
set(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README)
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CPACK_RPM_SPEC_INSTALL_POST "/sbin/ldconfig")
|
||||
set(CPACK_RPM_PACKAGE_NAME "maxscale")
|
||||
set(CPACK_RPM_PACKAGE_VENDOR "SkySQL Ab")
|
||||
set(CPACK_RPM_PACKAGE_VENDOR "MariaDB Corporation Ab")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/etc /etc/ld.so.conf.d /etc/init.d /etc/rc.d/init.d")
|
||||
set(CPACK_RPM_SPEC_MORE_DEFINE "%define ignore \#")
|
||||
set(CPACK_RPM_USER_FILELIST "%ignore /etc/init.d")
|
||||
@ -136,6 +136,6 @@ add_custom_target(testall
|
||||
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR}
|
||||
COMMAND make install
|
||||
COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null"
|
||||
COMMAND make test
|
||||
COMMAND /bin/sh -c "killall -KILL maxscale"
|
||||
COMMENT "Running full test suite")
|
||||
COMMAND /bin/sh -c "make test || echo \"Test results written to: ${CMAKE_BINARY_DIR}/Testing/Temporary/\""
|
||||
COMMAND killall maxscale
|
||||
COMMENT "Running full test suite" VERBATIM)
|
@ -1,4 +1,4 @@
|
||||
This source code is distributed as part of SkySQL MaxScale. It is free
|
||||
This source code is distributed as part of MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
@ -12,9 +12,9 @@ You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Copyright SkySQL Ab 2013
|
||||
Copyright MariaDB Corporation Ab 2013
|
||||
|
||||
SkySQL Corporation Ab
|
||||
MariaDB Corporation Corporation Ab
|
||||
Tekniikantie 12
|
||||
02150 Espoo
|
||||
Finland
|
||||
|
4
Makefile
4
Makefile
@ -1,4 +1,4 @@
|
||||
# This file is distributed as part of the SkySQL Gateway. It is free
|
||||
# This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
# software: you can redistribute it and/or modify it under the terms of the
|
||||
# GNU General Public License as published by the Free Software Foundation,
|
||||
# version 2.
|
||||
@ -12,7 +12,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Copyright SkySQL Ab 2013
|
||||
# Copyright MariaDB Corporation Ab 2013
|
||||
#
|
||||
# Revision History
|
||||
# Date Who Description
|
||||
|
10
README
10
README
@ -1,6 +1,6 @@
|
||||
/** \mainpage MaxScale by SkySQL
|
||||
/** \mainpage MaxScale by MariaDB Corporation
|
||||
|
||||
The SkySQL MaxScale is an intelligent proxy that allows forwarding of
|
||||
The MariaDB Corporation MaxScale is an intelligent proxy that allows forwarding of
|
||||
database statements to one or more database servers using complex rules,
|
||||
a semantic understanding of the database statements and the roles of
|
||||
the various servers within the backend cluster of databases.
|
||||
@ -28,7 +28,7 @@ issues and communicate with the MaxScale community.
|
||||
Send email to [maxscale@googlegroups.com](mailto:maxscale@googlegroups.com)
|
||||
or use the [forum](http://groups.google.com/forum/#!forum/maxscale) interface
|
||||
|
||||
Bugs can be reported in the SkySQL bugs database
|
||||
Bugs can be reported in the MariaDB Corporation bugs database
|
||||
[bug.skysql.com](http://bugs.skysql.com)
|
||||
|
||||
\section Building Building MaxScale
|
||||
@ -59,6 +59,10 @@ to the --relocate option.
|
||||
|
||||
rpm -i --force --relocate=/usr/=$PREFIX/usr/ MariaDB-5.5.34-centos6-x86_64-common.rpm MariaDB-5.5.34-centos6-x86_64-compat.rpm MariaDB-5.5.34-centos6-x86_64-devel.rpm
|
||||
|
||||
You can also use the included 'unpack_rpm.sh' script to unpack the RPMs without installing them.
|
||||
|
||||
./unpack_rpm <location of MariaDB RPMs> <extraction destination>
|
||||
|
||||
This README assumes $PREFIX = $HOME.
|
||||
|
||||
MaxScale may be built with the embedded MariaDB library either linked
|
||||
|
@ -12,7 +12,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Copyright SkySQL Ab 2014
|
||||
# Copyright MariaDB Corporation Ab 2014
|
||||
#
|
||||
# Revision History
|
||||
# Date Who Description
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -9,7 +9,7 @@ Package: maxscale
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MaxScale
|
||||
The SkySQL MaxScale is an intelligent proxy that allows forwarding of
|
||||
The MariaDB Corporation MaxScale is an intelligent proxy that allows forwarding of
|
||||
database statements to one or more database servers using complex rules,
|
||||
a semantic understanding of the database statements and the roles of
|
||||
the various servers within the backend cluster of databases.
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# maxscale: The SkySQL MaxScale database proxy
|
||||
# maxscale: The MariaDB Corporation MaxScale database proxy
|
||||
#
|
||||
# description: MaxScale provides database specific proxy functionality
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# maxscale: The SkySQL MaxScale database proxy
|
||||
# maxscale: The MariaDB Corporation MaxScale database proxy
|
||||
#
|
||||
# description: MaxScale provides database specific proxy functionality
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# maxscale: The SkySQL MaxScale database proxy
|
||||
# maxscale: The MariaDB Corporation MaxScale database proxy
|
||||
#
|
||||
# description: MaxScale provides database specific proxy functionality
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# maxscale: The SkySQL MaxScale database proxy
|
||||
# maxscale: The MariaDB Corporation MaxScale database proxy
|
||||
#
|
||||
# description: MaxScale provides database specific proxy functionality
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -75,7 +75,7 @@ int lm_enabled_logfiles_bitmask = 0;
|
||||
* Path to directory in which all files are stored to shared memory
|
||||
* by the OS.
|
||||
*/
|
||||
const char* shm_pathname = "/dev/shm";
|
||||
const char* shm_pathname_prefix = "/dev/shm/";
|
||||
|
||||
/** Logfile ids from call argument '-s' */
|
||||
char* shmem_id_str = NULL;
|
||||
@ -404,7 +404,7 @@ return_succp:
|
||||
|
||||
|
||||
/**
|
||||
* @node Initializes log managing routines in SkySQL Gateway.
|
||||
* @node Initializes log managing routines in MariaDB Corporation MaxScale.
|
||||
*
|
||||
* Parameters:
|
||||
* @param p_ctx - in, give
|
||||
@ -755,7 +755,12 @@ static int logmanager_write_log(
|
||||
break;
|
||||
}
|
||||
}
|
||||
wp[safe_str_len-1] = '\n';
|
||||
/** remove double line feed */
|
||||
if (wp[safe_str_len-2] == '\n')
|
||||
{
|
||||
wp[safe_str_len-2]=' ';
|
||||
}
|
||||
wp[safe_str_len-1] = '\n';
|
||||
blockbuf_unregister(bb);
|
||||
|
||||
/**
|
||||
@ -2063,11 +2068,34 @@ static bool logfile_init(
|
||||
* pointing to shm file is created and located to the file
|
||||
* directory.
|
||||
*/
|
||||
if (store_shmem) {
|
||||
logfile->lf_filepath = strdup(shm_pathname);
|
||||
if (store_shmem)
|
||||
{
|
||||
char* c;
|
||||
pid_t pid = getpid();
|
||||
int len = strlen(shm_pathname_prefix)+
|
||||
get_decimal_len((size_t)pid);
|
||||
|
||||
c = (char *)calloc(len, sizeof(char));
|
||||
|
||||
if (c == NULL)
|
||||
{
|
||||
succp = false;
|
||||
goto file_create_fail;
|
||||
}
|
||||
sprintf(c, "%s%d", shm_pathname_prefix, pid);
|
||||
logfile->lf_filepath = c;
|
||||
|
||||
if (mkdir(c, S_IRWXU | S_IRWXG) != 0 &&
|
||||
errno != EEXIST)
|
||||
{
|
||||
succp = false;
|
||||
goto file_create_fail;
|
||||
}
|
||||
logfile->lf_linkpath = strdup(fn->fn_logpath);
|
||||
logfile->lf_linkpath = add_slash(logfile->lf_linkpath);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
logfile->lf_filepath = strdup(fn->fn_logpath);
|
||||
}
|
||||
logfile->lf_filepath = add_slash(logfile->lf_filepath);
|
||||
@ -2146,7 +2174,7 @@ static bool logfile_init(
|
||||
}
|
||||
}
|
||||
}
|
||||
file_create_fail:
|
||||
file_create_fail:
|
||||
if (namecreatefail || nameconflicts)
|
||||
{
|
||||
logfile->lf_name_seqno += 1;
|
||||
@ -2161,7 +2189,7 @@ static bool logfile_init(
|
||||
free(logfile->lf_full_link_name);
|
||||
logfile->lf_full_link_name = NULL;
|
||||
}
|
||||
|
||||
goto return_with_succp;
|
||||
}
|
||||
} while (namecreatefail || nameconflicts);
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -51,7 +51,7 @@ macro(set_variables)
|
||||
set(INSTALL_SYSTEM_FILES TRUE CACHE BOOL "Install init.d scripts and ldconf configuration files")
|
||||
|
||||
# Build tests
|
||||
set(BUILD_TESTS TRUE CACHE BOOL "Build tests")
|
||||
set(BUILD_TESTS FALSE CACHE BOOL "Build tests")
|
||||
|
||||
endmacro()
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
add_library(query_classifier SHARED query_classifier.cc)
|
||||
target_link_libraries(query_classifier ${EMBEDDED_LIB})
|
||||
install(TARGETS query_classifier DESTINATION lib)
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @section LICENCE
|
||||
*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is
|
||||
* free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, version 2.
|
||||
@ -16,7 +16,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab
|
||||
* Copyright MariaDB Corporation Ab
|
||||
*
|
||||
* @file
|
||||
*
|
||||
@ -639,7 +639,17 @@ static skygw_query_type_t resolve_query_type(
|
||||
type |= QUERY_TYPE_PREPARE_NAMED_STMT;
|
||||
goto return_qtype;
|
||||
break;
|
||||
|
||||
|
||||
case SQLCOM_SHOW_DATABASES:
|
||||
type |= QUERY_TYPE_SHOW_DATABASES;
|
||||
goto return_qtype;
|
||||
break;
|
||||
|
||||
case SQLCOM_SHOW_TABLES:
|
||||
type |= QUERY_TYPE_SHOW_TABLES;
|
||||
goto return_qtype;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -823,8 +833,7 @@ static skygw_query_type_t resolve_query_type(
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [resolve_query_type] "
|
||||
"Unknown functype %d. Something "
|
||||
"has gone wrong.",
|
||||
"Functype %d.",
|
||||
pthread_self(),
|
||||
ftype)));
|
||||
break;
|
||||
@ -1375,3 +1384,49 @@ static void parsing_info_set_plain_str(
|
||||
|
||||
pi->pi_query_plain_str = str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a string of query type value.
|
||||
* Caller must free the memory of the resulting string.
|
||||
*
|
||||
* @param qtype Query type value, combination of values listed in
|
||||
* query_classifier.h
|
||||
*
|
||||
* @return string representing the query type value
|
||||
*/
|
||||
char* skygw_get_qtype_str(
|
||||
skygw_query_type_t qtype)
|
||||
{
|
||||
int t1 = (int)qtype;
|
||||
int t2 = 1;
|
||||
skygw_query_type_t t = QUERY_TYPE_UNKNOWN;
|
||||
char* qtype_str = NULL;
|
||||
|
||||
/**
|
||||
* Test values (bits) and clear matching bits from t1 one by one until
|
||||
* t1 is completely cleared.
|
||||
*/
|
||||
while (t1 != 0)
|
||||
{
|
||||
if (t1&t2)
|
||||
{
|
||||
t = (skygw_query_type_t)t2;
|
||||
|
||||
if (qtype_str == NULL)
|
||||
{
|
||||
qtype_str = strdup(STRQTYPE(t));
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t len = strlen(STRQTYPE(t));
|
||||
/** reallocate space for delimiter, new string and termination */
|
||||
qtype_str = (char *)realloc(qtype_str, strlen(qtype_str)+1+len+1);
|
||||
snprintf(qtype_str+strlen(qtype_str), 1+len+1, "|%s", STRQTYPE(t));
|
||||
}
|
||||
/** Remove found value from t1 */
|
||||
t1 &= ~t2;
|
||||
}
|
||||
t2 <<= 1;
|
||||
}
|
||||
return qtype_str;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This file is distributed as part of the SkySQL Gateway. It is free
|
||||
This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Copyright SkySQL Ab
|
||||
Copyright MariaDB Corporation Ab
|
||||
|
||||
*/
|
||||
|
||||
@ -54,7 +54,9 @@ typedef enum {
|
||||
QUERY_TYPE_PREPARE_STMT = 0x020000, /*< Prepared stmt with id provided by server:all */
|
||||
QUERY_TYPE_EXEC_STMT = 0x040000, /*< Execute prepared statement:master or any */
|
||||
QUERY_TYPE_CREATE_TMP_TABLE = 0x080000, /*< Create temporary table:master (could be all) */
|
||||
QUERY_TYPE_READ_TMP_TABLE = 0x100000 /*< Read temporary table:master (could be any) */
|
||||
QUERY_TYPE_READ_TMP_TABLE = 0x100000, /*< Read temporary table:master (could be any) */
|
||||
QUERY_TYPE_SHOW_DATABASES = 0x200000, /*< Show list of databases */
|
||||
QUERY_TYPE_SHOW_TABLES = 0x400000 /*< Show list of tables */
|
||||
} skygw_query_type_t;
|
||||
|
||||
|
||||
@ -91,6 +93,7 @@ bool parse_query (GWBUF* querybuf);
|
||||
parsing_info_t* parsing_info_init(void (*donefun)(void *));
|
||||
void parsing_info_done(void* ptr);
|
||||
bool query_is_parsed(GWBUF* buf);
|
||||
char* skygw_get_qtype_str(skygw_query_type_t qtype);
|
||||
|
||||
|
||||
EXTERN_C_BLOCK_END
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <mysql.h>
|
||||
|
||||
static char* server_options[] = {
|
||||
"SkySQL Gateway",
|
||||
"MariaDB Corporation MaxScale",
|
||||
"--datadir=./",
|
||||
"--language=./",
|
||||
"--skip-innodb",
|
||||
|
@ -13,7 +13,7 @@ static char datadir[1024] = "";
|
||||
static char mysqldir[1024] = "";
|
||||
|
||||
static char* server_options[] = {
|
||||
"SkySQL Gateway",
|
||||
"MariaDB Corporation MaxScale",
|
||||
"--datadir=",
|
||||
"--default-storage-engine=myisam",
|
||||
NULL
|
||||
|
@ -1,7 +1,7 @@
|
||||
Portions of this software contain modifications contributed by SkySQL, Ab.
|
||||
Portions of this software contain modifications contributed by MariaDB Corporation, Ab.
|
||||
These contributions are used with the following license:
|
||||
|
||||
Copyright (c) 2013, SkySQL Ab. All rights reserved.
|
||||
Copyright (c) 2013, MariaDB Corporation Ab. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -12,7 +12,7 @@ are met:
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
* Neither the name of the SkySQL Ab. nor the names of its
|
||||
* Neither the name of the MariaDB Corporation Ab. nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Removed unnecessary file driver
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added GTID event handler
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added GTID event handler
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for setting binlog position based on GTID
|
||||
- Added support for MySQL and MariDB server types
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for setting binlog position based on GTID
|
||||
- Added support for MySQL and MariDB server types
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
- Added support for setting binlog position based on GTID
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
Copyright (C) 2013, SkySQL Ab
|
||||
Copyright (C) 2013, MariaDB Corporation Ab
|
||||
|
||||
|
||||
This file is distributed as part of the SkySQL Gateway. It is free
|
||||
This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
Copyright (C) 2013, SkySQL Ab
|
||||
Copyright (C) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
This file is distributed as part of the SkySQL Gateway. It is free
|
||||
This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
Copyright (C) 2013, SkySQL Ab
|
||||
Copyright (C) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
|
||||
This file is distributed as part of the SkySQL Gateway. It is free
|
||||
This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
|
||||
Author: Jan Lindström (jan.lindstrom@skysql.com
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
- Added support for starting binlog dump from GTID position
|
||||
- Added error handling using exceptions
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013, SkySQL Ab
|
||||
Copyright (c) 2013-2014, MariaDB Corporation Ab
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
SkySQL, Ab. Those modifications are gratefully acknowledged and are described
|
||||
MariaDB Corporation, Ab. Those modifications are gratefully acknowledged and are described
|
||||
briefly in the source code.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
SkySQL change details:
|
||||
MariaDB Corporation change details:
|
||||
- Added support for GTID event handling for both MySQL and MariaDB
|
||||
- Added support for starting binlog dump from GTID position
|
||||
- Added support for MariaDB server
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
Copyright (C) 2013, SkySQL Ab
|
||||
Copyright (C) 2013, MariaDB Corporation Ab
|
||||
|
||||
|
||||
This file is distributed as part of the SkySQL Gateway. It is free
|
||||
This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
version 2.
|
||||
|
@ -14,7 +14,7 @@ echo "Looking for MaxScale in [${BINARY_PATH}]"
|
||||
|
||||
if [ -s "${BINARY_PATH}/bin/maxscale" ]; then
|
||||
if [ -x "${BINARY_PATH}/bin/maxscale" ]; then
|
||||
MAXSCALE_VERSION=`strings ${BINARY_PATH}/bin/maxscale | grep "SkySQL MaxScale" | awk '{print $3}' | head -1`
|
||||
MAXSCALE_VERSION=`strings ${BINARY_PATH}/bin/maxscale | grep "MariaDB Corporation MaxScale" | awk '{print $3}' | head -1`
|
||||
echo "Found MaxScale, version: ${MAXSCALE_VERSION}"
|
||||
fi
|
||||
else
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file is distributed as part of the SkySQL Gateway. It is free
|
||||
# This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
# software: you can redistribute it and/or modify it under the terms of the
|
||||
# GNU General Public License as published by the Free Software Foundation,
|
||||
# version 2.
|
||||
@ -12,7 +12,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Copyright SkySQL Ab 2013
|
||||
# Copyright MariaDB Corporation Ab 2013
|
||||
#
|
||||
# Revision History
|
||||
# Date Who Description
|
||||
|
@ -1,11 +1,12 @@
|
||||
file(GLOB FULLCORE_SRC *.c)
|
||||
add_library(fullcore STATIC ${FULLCORE_SRC})
|
||||
target_link_libraries(fullcore log_manager utils pthread ${EMBEDDED_LIB} ssl aio rt crypt dl crypto inih z m stdc++)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
file(GLOB FULLCORE_SRC *.c)
|
||||
add_library(fullcore STATIC ${FULLCORE_SRC})
|
||||
target_link_libraries(fullcore log_manager utils pthread ${EMBEDDED_LIB} ssl aio rt crypt dl crypto inih z m stdc++)
|
||||
endif()
|
||||
add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c
|
||||
gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c
|
||||
poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c
|
||||
monitor.c adminusers.c secrets.c filter.c modutil.c hint.c housekeeper.c)
|
||||
gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c
|
||||
poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c
|
||||
monitor.c adminusers.c secrets.c filter.c modutil.c hint.c housekeeper.c)
|
||||
target_link_libraries(maxscale ${EMBEDDED_LIB} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++)
|
||||
install(TARGETS maxscale DESTINATION bin)
|
||||
|
||||
@ -18,5 +19,5 @@ target_link_libraries(maxpasswd log_manager utils pthread crypt crypto)
|
||||
install(TARGETS maxpasswd DESTINATION bin)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(test)
|
||||
endif()
|
@ -1,4 +1,4 @@
|
||||
# This file is distributed as part of the SkySQL Gateway. It is free
|
||||
# This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
# software: you can redistribute it and/or modify it under the terms of the
|
||||
# GNU General Public License as published by the Free Software Foundation,
|
||||
# version 2.
|
||||
@ -12,7 +12,7 @@
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Copyright SkySQL Ab 2013
|
||||
# Copyright MariaDB Corporation Ab 2013
|
||||
#
|
||||
# Revision History
|
||||
# Date Who Description
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,11 +13,11 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file buffer.h - The Gateway buffer management functions
|
||||
* @file buffer.h - The MaxScale buffer management functions
|
||||
*
|
||||
* The buffer management is based on the principle of a linked list
|
||||
* of variable size buffer, the intention beign to allow longer
|
||||
@ -87,7 +87,7 @@ SHARED_BUF *sbuf;
|
||||
}
|
||||
spinlock_init(&rval->gwbuf_lock);
|
||||
rval->start = sbuf->data;
|
||||
rval->end = rval->start + size;
|
||||
rval->end = (void*)((uint8_t*)rval->start + size);
|
||||
sbuf->refcount = 1;
|
||||
rval->sbuf = sbuf;
|
||||
rval->next = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of MaxScale from SkySQL. It is free
|
||||
* This file is distributed as part of MaxScale from MariaDB Corporation. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*
|
||||
*/
|
||||
|
||||
@ -88,7 +88,7 @@ extern int lm_enabled_logfiles_bitmask;
|
||||
* is not fixed here and will be updated elsewhere.
|
||||
*/
|
||||
static char* server_options[] = {
|
||||
"SkySQL Gateway",
|
||||
"MariaDB Corporation MaxScale",
|
||||
"--no-defaults",
|
||||
"--datadir=",
|
||||
"--language=",
|
||||
@ -387,7 +387,7 @@ static bool file_write_header(
|
||||
*t = time(NULL);
|
||||
*tm = *localtime(t);
|
||||
|
||||
header_buf1 = "\n\nSkySQL MaxScale " MAXSCALE_VERSION "\t";
|
||||
header_buf1 = "\n\nMariaDB Corporation MaxScale " MAXSCALE_VERSION "\t";
|
||||
header_buf2 = strdup(asctime(tm));
|
||||
|
||||
if (header_buf2 == NULL) {
|
||||
@ -1539,7 +1539,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"SkySQL MaxScale %s (C) SkySQL Ab 2013,2014",
|
||||
"MariaDB Corporation MaxScale %s (C) MariaDB Corporation Ab 2013-2014",
|
||||
MAXSCALE_VERSION)));
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of MaxScale from SkySQL. It is free
|
||||
* This file is distributed as part of MaxScale from MariaDB Corporation. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
#include <secrets.h>
|
||||
@ -74,16 +74,29 @@ int len;
|
||||
snprintf(secret_file, 255, "%s/etc/.secrets", home);
|
||||
|
||||
/* Try to access secrets file */
|
||||
if (access(secret_file, R_OK) == -1) {
|
||||
if (access(secret_file, R_OK) == -1)
|
||||
{
|
||||
int eno = errno;
|
||||
errno = 0;
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : access for secrets file "
|
||||
"[%s] failed. Error %d, %s.",
|
||||
secret_file,
|
||||
eno,
|
||||
strerror(eno))));
|
||||
if (eno == ENOENT)
|
||||
{
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"Encrypted password file %s can't be accessed "
|
||||
"(%s). Password encryption is not used.",
|
||||
secret_file,
|
||||
strerror(eno))));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : access for secrets file "
|
||||
"[%s] failed. Error %d, %s.",
|
||||
secret_file,
|
||||
eno,
|
||||
strerror(eno))));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,11 +13,11 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file spinlock.c - Spinlock operations for the SkySQL Gateway
|
||||
* @file spinlock.c - Spinlock operations for the MariaDB Corporation MaxScale
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <thread.h>
|
||||
#include <pthread.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -13,7 +13,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*
|
||||
*/
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* 10-06-2013 Massimiliano Pinto Initial implementation
|
||||
* 12-06-2013 Massimiliano Pinto Read function trought
|
||||
* the gwbuff strategy
|
||||
* 13-06-2013 Massimiliano Pinto Gateway local authentication
|
||||
* 13-06-2013 Massimiliano Pinto MaxScale local authentication
|
||||
* basics
|
||||
*
|
||||
* @endverbatim
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _ADMINUSERS_H
|
||||
#define _ADMINUSERS_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _ATOMIC_H
|
||||
#define _ATOMIC_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _BUFFER_H
|
||||
#define _BUFFER_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -47,6 +47,7 @@
|
||||
#include <skygw_debug.h>
|
||||
#include <hint.h>
|
||||
#include <spinlock.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
EXTERN_C_BLOCK_BEGIN
|
||||
@ -150,15 +151,15 @@ typedef struct gwbuf {
|
||||
#define GWBUF_DATA(b) ((b)->start)
|
||||
|
||||
/*< Number of bytes in the individual buffer */
|
||||
#define GWBUF_LENGTH(b) ((b)->end - (b)->start)
|
||||
#define GWBUF_LENGTH(b) ((unsigned int)(((uint8_t*)(b)->end) - ((uint8_t*)(b)->start)))
|
||||
|
||||
/*< True if all bytes in the buffer have been consumed */
|
||||
#define GWBUF_EMPTY(b) ((b)->start == (b)->end)
|
||||
|
||||
/*< Consume a number of bytes in the buffer */
|
||||
#define GWBUF_CONSUME(b, bytes) (b)->start += (bytes)
|
||||
#define GWBUF_CONSUME(b, bytes) (b)->start = (void*)((uint8_t*)(b)->start + (bytes))
|
||||
|
||||
#define GWBUF_RTRIM(b, bytes) (b)->end -= (bytes)
|
||||
#define GWBUF_RTRIM(b, bytes) (b)->end = (void*)((uint8_t*)(b)->end - (bytes))
|
||||
|
||||
#define GWBUF_TYPE(b) (b)->gwbuf_type
|
||||
/*<
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <skygw_utils.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _DBUSERS_H
|
||||
#define _DBUSERS_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
#include <service.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _DCB_H
|
||||
#define _DCB_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <spinlock.h>
|
||||
#include <buffer.h>
|
||||
@ -66,7 +66,7 @@ struct dcb;
|
||||
* The operations that can be performed on the descriptor
|
||||
*
|
||||
* read EPOLLIN handler for the socket
|
||||
* write Gateway data write entry point
|
||||
* write MaxScale data write entry point
|
||||
* write_ready EPOLLOUT handler for the socket, indicates
|
||||
* that the socket is ready to send more data
|
||||
* error EPOLLERR handler for the socket
|
||||
@ -74,7 +74,7 @@ struct dcb;
|
||||
* accept Accept handler for listener socket only
|
||||
* connect Create a connection to the specified server
|
||||
* for the session pased in
|
||||
* close Gateway close entry point for the socket
|
||||
* close MaxScale close entry point for the socket
|
||||
* listen Create a listener for the protocol
|
||||
* auth Authentication entry point
|
||||
* session Session handling entry point
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _FILTER_H
|
||||
#define _FILTER_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _GWBITMASK_H
|
||||
#define _GWBITMASK_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <spinlock.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _HASTABLE_H
|
||||
#define _HASTABLE_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _HOUSEKEEPER_H
|
||||
#define _HOUSEKEEPER_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _MAXSCALE_H
|
||||
#define _MAXSCALE_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <dcb.h>
|
||||
#include <modinfo.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _MODUTIL_H
|
||||
#define _MODUTIL_H
|
||||
/*
|
||||
* This file is distributed as part of MaxScale from SkySQL. It is free
|
||||
* This file is distributed as part of MaxScale from MariaDB Corporation. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _MONITOR_H
|
||||
#define _MONITOR_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <server.h>
|
||||
#include <dcb.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _POLL_H
|
||||
#define _POLL_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <dcb.h>
|
||||
#include <gwbitmask.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _RDTSC_H
|
||||
#define _RDTSC_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2014
|
||||
* Copyright MariaDB Corporation Ab 2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _ROUTER_H
|
||||
#define _ROUTER_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _SECRETS_H
|
||||
#define _SECRETS_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _SERVER_H
|
||||
#define _SERVER_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <dcb.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _SERVICE_H
|
||||
#define _SERVICE_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _SESSION_H
|
||||
#define _SESSION_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _SPINLOCK_H
|
||||
#define _SPINLOCK_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _THREAD_H
|
||||
#define _THREAD_H
|
||||
/*
|
||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
||||
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
* software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation,
|
||||
* version 2.
|
||||
@ -15,7 +15,7 @@
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright SkySQL Ab 2013
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <pthread.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user