Merge branch 'develop' into 1.2.1-binlog_router_trx

This commit is contained in:
Markus Makela
2015-11-02 18:09:59 +02:00
24 changed files with 2962 additions and 2258 deletions

View File

@ -88,4 +88,5 @@ int gw_getsockerrno(int fd);
int parse_bindconfig(char *, unsigned short, struct sockaddr_in *);
int setipaddress(struct in_addr *, char *);
char* get_libdir();
long get_processor_count();
#endif

View File

@ -20,6 +20,7 @@
#include <skygw_utils.h>
#include <stdint.h>
#include <openssl/sha.h>
#include <spinlock.h>
/**
* @file config.h The configuration handling elements
*

View File

@ -0,0 +1,52 @@
#ifndef _MAXSCALE_PCRE2_H
#define _MAXSCALE_PCRE2_H
/*
* 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.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* 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 MariaDB Corporation Ab 2015
*
*/
#ifndef PCRE2_CODE_UNIT_WIDTH
#define PCRE2_CODE_UNIT_WIDTH 8
#endif
#include <pcre2.h>
/**
* @file maxscale_pcre2.h - Utility functions for regular expression matching
* with the bundled PCRE2 library.
*
* @verbatim
* Revision History
*
* Date Who Description
* 30-10-2015 Markus Makela Initial implementation
* @endverbatim
*/
typedef enum
{
MXS_PCRE2_MATCH,
MXS_PCRE2_NOMATCH,
MXS_PCRE2_ERROR
} mxs_pcre2_result_t;
mxs_pcre2_result_t mxs_pcre2_substitute(pcre2_code *re, const char *subject,
const char *replace, char** dest, size_t* size);
mxs_pcre2_result_t mxs_pcre2_simple_match(const char* pattern, const char* subject,
int options, int* error);
#endif

View File

@ -34,6 +34,7 @@
#include <buffer.h>
#include <dcb.h>
#include <string.h>
#include <maxscale_pcre2.h>
#define PTR_IS_RESULTSET(b) (b[0] == 0x01 && b[1] == 0x0 && b[2] == 0x0 && b[3] == 0x01)
#define PTR_IS_EOF(b) (b[0] == 0x05 && b[1] == 0x0 && b[2] == 0x0 && b[4] == 0xfe)
@ -68,4 +69,5 @@ GWBUF *modutil_create_mysql_err_msg(
const char *msg);
int modutil_count_signal_packets(GWBUF*,int,int,int*);
mxs_pcre2_result_t modutil_mysql_wildcard_match(const char* pattern, const char* string);
#endif