Commit 285e7aa1 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-4425 REGEXP enhancements

parent 9d83468e
...@@ -1148,6 +1148,19 @@ packaging/solaris/postinstall-solaris ...@@ -1148,6 +1148,19 @@ packaging/solaris/postinstall-solaris
extra/jemalloc/jemalloc-* extra/jemalloc/jemalloc-*
extra/jemalloc/build extra/jemalloc/build
*.tdb *.tdb
pcre/CTestCustom.ctest
pcre/pcre_grep_test.sh
pcre/pcre_scanner_unittest
pcre/pcre_stringpiece_unittest
pcre/pcre_test.sh
pcre/pcrecpp_unittest
pcre/pcregrep
pcre/pcretest
testNinput
teststderr
testtemp1
testtemp2
testtry
storage/tokudb/ft-index/CTestCustom.cmake storage/tokudb/ft-index/CTestCustom.cmake
storage/tokudb/ft-index/DartConfiguration.tcl storage/tokudb/ft-index/DartConfiguration.tcl
storage/tokudb/ft-index/ctags-stamp storage/tokudb/ft-index/ctags-stamp
......
...@@ -302,7 +302,7 @@ ADD_SUBDIRECTORY(include) ...@@ -302,7 +302,7 @@ ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(dbug) ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(regex) ADD_SUBDIRECTORY(pcre)
ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(mysys)
ADD_SUBDIRECTORY(libmysql) ADD_SUBDIRECTORY(libmysql)
ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(client)
......
...@@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES( ...@@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES(
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/pcre
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings ${CMAKE_SOURCE_DIR}/strings
${MY_READLINE_INCLUDE_DIR} ${MY_READLINE_INCLUDE_DIR}
...@@ -36,7 +36,8 @@ ENDIF(UNIX) ...@@ -36,7 +36,8 @@ ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex) TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcre)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient pcreposix)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include <hash.h> #include <hash.h>
#include <stdarg.h> #include <stdarg.h>
#include <violite.h> #include <violite.h>
#include "my_regex.h" /* Our own version of regex */ #include <pcreposix.h> /* pcreposix regex library */
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
...@@ -250,12 +250,12 @@ static const char *opt_suite_dir, *opt_overlay_dir; ...@@ -250,12 +250,12 @@ static const char *opt_suite_dir, *opt_overlay_dir;
static size_t suite_dir_len, overlay_dir_len; static size_t suite_dir_len, overlay_dir_len;
/* Precompiled re's */ /* Precompiled re's */
static my_regex_t ps_re; /* the query can be run using PS protocol */ static regex_t ps_re; /* the query can be run using PS protocol */
static my_regex_t sp_re; /* the query can be run as a SP */ static regex_t sp_re; /* the query can be run as a SP */
static my_regex_t view_re; /* the query can be run as a view*/ static regex_t view_re; /* the query can be run as a view*/
static void init_re(void); static void init_re(void);
static int match_re(my_regex_t *, char *); static int match_re(regex_t *, char *);
static void free_re(void); static void free_re(void);
static char *get_string(char **to_ptr, char **from_ptr, static char *get_string(char **to_ptr, char **from_ptr,
...@@ -7246,13 +7246,13 @@ void str_to_file(const char *fname, char *str, int size) ...@@ -7246,13 +7246,13 @@ void str_to_file(const char *fname, char *str, int size)
} }
void check_regerr(my_regex_t* r, int err) void check_regerr(regex_t* r, int err)
{ {
char err_buf[1024]; char err_buf[1024];
if (err) if (err)
{ {
my_regerror(err,r,err_buf,sizeof(err_buf)); regerror(err,r,err_buf,sizeof(err_buf));
die("Regex error: %s\n", err_buf); die("Regex error: %s\n", err_buf);
} }
} }
...@@ -8544,19 +8544,18 @@ char *re_eprint(int err) ...@@ -8544,19 +8544,18 @@ char *re_eprint(int err)
{ {
static char epbuf[100]; static char epbuf[100];
size_t len __attribute__((unused))= size_t len __attribute__((unused))=
my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf)); regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
assert(len <= sizeof(epbuf)); assert(len <= sizeof(epbuf));
return(epbuf); return(epbuf);
} }
void init_re_comp(my_regex_t *re, const char* str) void init_re_comp(regex_t *re, const char* str)
{ {
int err= my_regcomp(re, str, (REG_EXTENDED | REG_ICASE | REG_NOSUB), int err= regcomp(re, str, (REG_EXTENDED | REG_ICASE | REG_NOSUB | REG_DOTALL));
&my_charset_latin1);
if (err) if (err)
{ {
char erbuf[100]; char erbuf[100];
int len= my_regerror(err, re, erbuf, sizeof(erbuf)); int len= regerror(err, re, erbuf, sizeof(erbuf));
die("error %s, %d/%d `%s'\n", die("error %s, %d/%d `%s'\n",
re_eprint(err), (int)len, (int)sizeof(erbuf), erbuf); re_eprint(err), (int)len, (int)sizeof(erbuf), erbuf);
} }
...@@ -8601,7 +8600,7 @@ void init_re(void) ...@@ -8601,7 +8600,7 @@ void init_re(void)
} }
int match_re(my_regex_t *re, char *str) int match_re(regex_t *re, char *str)
{ {
while (my_isspace(charset_info, *str)) while (my_isspace(charset_info, *str))
str++; str++;
...@@ -8613,7 +8612,7 @@ int match_re(my_regex_t *re, char *str) ...@@ -8613,7 +8612,7 @@ int match_re(my_regex_t *re, char *str)
str= comm_end + 2; str= comm_end + 2;
} }
int err= my_regexec(re, str, (size_t)0, NULL, 0); int err= regexec(re, str, (size_t)0, NULL, 0);
if (err == 0) if (err == 0)
return 1; return 1;
...@@ -8622,7 +8621,7 @@ int match_re(my_regex_t *re, char *str) ...@@ -8622,7 +8621,7 @@ int match_re(my_regex_t *re, char *str)
{ {
char erbuf[100]; char erbuf[100];
int len= my_regerror(err, re, erbuf, sizeof(erbuf)); int len= regerror(err, re, erbuf, sizeof(erbuf));
die("error %s, %d/%d `%s'\n", die("error %s, %d/%d `%s'\n",
re_eprint(err), (int)len, (int)sizeof(erbuf), erbuf); re_eprint(err), (int)len, (int)sizeof(erbuf), erbuf);
} }
...@@ -8631,10 +8630,9 @@ int match_re(my_regex_t *re, char *str) ...@@ -8631,10 +8630,9 @@ int match_re(my_regex_t *re, char *str)
void free_re(void) void free_re(void)
{ {
my_regfree(&ps_re); regfree(&ps_re);
my_regfree(&sp_re); regfree(&sp_re);
my_regfree(&view_re); regfree(&view_re);
my_regex_end();
} }
/****************************************************************************/ /****************************************************************************/
...@@ -10071,13 +10069,13 @@ void free_replace_regex() ...@@ -10071,13 +10069,13 @@ void free_replace_regex()
int reg_replace(char** buf_p, int* buf_len_p, char *pattern, int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
char *replace, char *string, int icase) char *replace, char *string, int icase)
{ {
my_regex_t r; regex_t r;
my_regmatch_t *subs; regmatch_t *subs;
char *replace_end; char *replace_end;
char *buf= *buf_p; char *buf= *buf_p;
int len; int len;
int buf_len, need_buf_len; int buf_len, need_buf_len;
int cflags= REG_EXTENDED; int cflags= REG_EXTENDED | REG_DOTALL;
int err_code; int err_code;
char *res_p,*str_p,*str_end; char *res_p,*str_p,*str_end;
...@@ -10096,13 +10094,13 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern, ...@@ -10096,13 +10094,13 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
if (icase) if (icase)
cflags|= REG_ICASE; cflags|= REG_ICASE;
if ((err_code= my_regcomp(&r,pattern,cflags,&my_charset_latin1))) if ((err_code= regcomp(&r,pattern,cflags)))
{ {
check_regerr(&r,err_code); check_regerr(&r,err_code);
return 1; return 1;
} }
subs= (my_regmatch_t*)my_malloc(sizeof(my_regmatch_t) * (r.re_nsub+1), subs= (regmatch_t*)my_malloc(sizeof(regmatch_t) * (r.re_nsub+1),
MYF(MY_WME+MY_FAE)); MYF(MY_WME+MY_FAE));
*res_p= 0; *res_p= 0;
...@@ -10113,14 +10111,14 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern, ...@@ -10113,14 +10111,14 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
while (!err_code) while (!err_code)
{ {
/* find the match */ /* find the match */
err_code= my_regexec(&r,str_p, r.re_nsub+1, subs, err_code= regexec(&r,str_p, r.re_nsub+1, subs,
(str_p == string) ? REG_NOTBOL : 0); (str_p == string) ? REG_NOTBOL : 0);
/* if regular expression error (eg. bad syntax, or out of memory) */ /* if regular expression error (eg. bad syntax, or out of memory) */
if (err_code && err_code != REG_NOMATCH) if (err_code && err_code != REG_NOMATCH)
{ {
check_regerr(&r,err_code); check_regerr(&r,err_code);
my_regfree(&r); regfree(&r);
return 1; return 1;
} }
...@@ -10233,7 +10231,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern, ...@@ -10233,7 +10231,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
} }
} }
my_free(subs); my_free(subs);
my_regfree(&r); regfree(&r);
*res_p= 0; *res_p= 0;
*buf_p= buf; *buf_p= buf;
*buf_len_p= buf_len; *buf_len_p= buf_len;
......
...@@ -54,7 +54,7 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -54,7 +54,7 @@ MACRO(MYSQL_ADD_PLUGIN)
# Add common include directories # Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/pcre
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}) ${ZLIB_INCLUDE_DIR})
......
...@@ -6,124 +6,121 @@ ...@@ -6,124 +6,121 @@
#define _PROBES_MYSQL_D #define _PROBES_MYSQL_D
#ifdef __cplusplus #ifdef __cplusplus
#define MYSQL_PROBES_FALSE false
extern "C" { extern "C" {
#else
#define MYSQL_PROBES_FALSE 0
#endif #endif
#define MYSQL_CONNECTION_START(arg0, arg1, arg2) #define MYSQL_CONNECTION_START(arg0, arg1, arg2)
#define MYSQL_CONNECTION_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_CONNECTION_START_ENABLED() (0)
#define MYSQL_CONNECTION_DONE(arg0, arg1) #define MYSQL_CONNECTION_DONE(arg0, arg1)
#define MYSQL_CONNECTION_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_CONNECTION_DONE_ENABLED() (0)
#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) #define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
#define MYSQL_COMMAND_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_COMMAND_START_ENABLED() (0)
#define MYSQL_COMMAND_DONE(arg0) #define MYSQL_COMMAND_DONE(arg0)
#define MYSQL_COMMAND_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_COMMAND_DONE_ENABLED() (0)
#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) #define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
#define MYSQL_QUERY_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_START_ENABLED() (0)
#define MYSQL_QUERY_DONE(arg0) #define MYSQL_QUERY_DONE(arg0)
#define MYSQL_QUERY_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_DONE_ENABLED() (0)
#define MYSQL_QUERY_PARSE_START(arg0) #define MYSQL_QUERY_PARSE_START(arg0)
#define MYSQL_QUERY_PARSE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_PARSE_START_ENABLED() (0)
#define MYSQL_QUERY_PARSE_DONE(arg0) #define MYSQL_QUERY_PARSE_DONE(arg0)
#define MYSQL_QUERY_PARSE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_PARSE_DONE_ENABLED() (0)
#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) #define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
#define MYSQL_QUERY_CACHE_HIT_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_CACHE_HIT_ENABLED() (0)
#define MYSQL_QUERY_CACHE_MISS(arg0) #define MYSQL_QUERY_CACHE_MISS(arg0)
#define MYSQL_QUERY_CACHE_MISS_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_CACHE_MISS_ENABLED() (0)
#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) #define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
#define MYSQL_QUERY_EXEC_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_EXEC_START_ENABLED() (0)
#define MYSQL_QUERY_EXEC_DONE(arg0) #define MYSQL_QUERY_EXEC_DONE(arg0)
#define MYSQL_QUERY_EXEC_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_QUERY_EXEC_DONE_ENABLED() (0)
#define MYSQL_INSERT_ROW_START(arg0, arg1) #define MYSQL_INSERT_ROW_START(arg0, arg1)
#define MYSQL_INSERT_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_ROW_START_ENABLED() (0)
#define MYSQL_INSERT_ROW_DONE(arg0) #define MYSQL_INSERT_ROW_DONE(arg0)
#define MYSQL_INSERT_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_ROW_DONE_ENABLED() (0)
#define MYSQL_UPDATE_ROW_START(arg0, arg1) #define MYSQL_UPDATE_ROW_START(arg0, arg1)
#define MYSQL_UPDATE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_UPDATE_ROW_START_ENABLED() (0)
#define MYSQL_UPDATE_ROW_DONE(arg0) #define MYSQL_UPDATE_ROW_DONE(arg0)
#define MYSQL_UPDATE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_UPDATE_ROW_DONE_ENABLED() (0)
#define MYSQL_DELETE_ROW_START(arg0, arg1) #define MYSQL_DELETE_ROW_START(arg0, arg1)
#define MYSQL_DELETE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_DELETE_ROW_START_ENABLED() (0)
#define MYSQL_DELETE_ROW_DONE(arg0) #define MYSQL_DELETE_ROW_DONE(arg0)
#define MYSQL_DELETE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_DELETE_ROW_DONE_ENABLED() (0)
#define MYSQL_READ_ROW_START(arg0, arg1, arg2) #define MYSQL_READ_ROW_START(arg0, arg1, arg2)
#define MYSQL_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_READ_ROW_START_ENABLED() (0)
#define MYSQL_READ_ROW_DONE(arg0) #define MYSQL_READ_ROW_DONE(arg0)
#define MYSQL_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_READ_ROW_DONE_ENABLED() (0)
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1) #define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
#define MYSQL_INDEX_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INDEX_READ_ROW_START_ENABLED() (0)
#define MYSQL_INDEX_READ_ROW_DONE(arg0) #define MYSQL_INDEX_READ_ROW_DONE(arg0)
#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0)
#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) #define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0)
#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) #define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0)
#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) #define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0)
#define MYSQL_HANDLER_RDLOCK_DONE(arg0) #define MYSQL_HANDLER_RDLOCK_DONE(arg0)
#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0)
#define MYSQL_HANDLER_WRLOCK_DONE(arg0) #define MYSQL_HANDLER_WRLOCK_DONE(arg0)
#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0)
#define MYSQL_HANDLER_UNLOCK_DONE(arg0) #define MYSQL_HANDLER_UNLOCK_DONE(arg0)
#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0)
#define MYSQL_FILESORT_START(arg0, arg1) #define MYSQL_FILESORT_START(arg0, arg1)
#define MYSQL_FILESORT_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_FILESORT_START_ENABLED() (0)
#define MYSQL_FILESORT_DONE(arg0, arg1) #define MYSQL_FILESORT_DONE(arg0, arg1)
#define MYSQL_FILESORT_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_FILESORT_DONE_ENABLED() (0)
#define MYSQL_SELECT_START(arg0) #define MYSQL_SELECT_START(arg0)
#define MYSQL_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_SELECT_START_ENABLED() (0)
#define MYSQL_SELECT_DONE(arg0, arg1) #define MYSQL_SELECT_DONE(arg0, arg1)
#define MYSQL_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_SELECT_DONE_ENABLED() (0)
#define MYSQL_INSERT_START(arg0) #define MYSQL_INSERT_START(arg0)
#define MYSQL_INSERT_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_START_ENABLED() (0)
#define MYSQL_INSERT_DONE(arg0, arg1) #define MYSQL_INSERT_DONE(arg0, arg1)
#define MYSQL_INSERT_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_DONE_ENABLED() (0)
#define MYSQL_INSERT_SELECT_START(arg0) #define MYSQL_INSERT_SELECT_START(arg0)
#define MYSQL_INSERT_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_SELECT_START_ENABLED() (0)
#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) #define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
#define MYSQL_INSERT_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_INSERT_SELECT_DONE_ENABLED() (0)
#define MYSQL_UPDATE_START(arg0) #define MYSQL_UPDATE_START(arg0)
#define MYSQL_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_UPDATE_START_ENABLED() (0)
#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) #define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
#define MYSQL_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_UPDATE_DONE_ENABLED() (0)
#define MYSQL_MULTI_UPDATE_START(arg0) #define MYSQL_MULTI_UPDATE_START(arg0)
#define MYSQL_MULTI_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_MULTI_UPDATE_START_ENABLED() (0)
#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) #define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0)
#define MYSQL_DELETE_START(arg0) #define MYSQL_DELETE_START(arg0)
#define MYSQL_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_DELETE_START_ENABLED() (0)
#define MYSQL_DELETE_DONE(arg0, arg1) #define MYSQL_DELETE_DONE(arg0, arg1)
#define MYSQL_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_DELETE_DONE_ENABLED() (0)
#define MYSQL_MULTI_DELETE_START(arg0) #define MYSQL_MULTI_DELETE_START(arg0)
#define MYSQL_MULTI_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_MULTI_DELETE_START_ENABLED() (0)
#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) #define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
#define MYSQL_MULTI_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_MULTI_DELETE_DONE_ENABLED() (0)
#define MYSQL_NET_READ_START() #define MYSQL_NET_READ_START()
#define MYSQL_NET_READ_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_NET_READ_START_ENABLED() (0)
#define MYSQL_NET_READ_DONE(arg0, arg1) #define MYSQL_NET_READ_DONE(arg0, arg1)
#define MYSQL_NET_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_NET_READ_DONE_ENABLED() (0)
#define MYSQL_NET_WRITE_START(arg0) #define MYSQL_NET_WRITE_START(arg0)
#define MYSQL_NET_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_NET_WRITE_START_ENABLED() (0)
#define MYSQL_NET_WRITE_DONE(arg0) #define MYSQL_NET_WRITE_DONE(arg0)
#define MYSQL_NET_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_NET_WRITE_DONE_ENABLED() (0)
#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3) #define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
#define MYSQL_KEYCACHE_READ_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_READ_START_ENABLED() (0)
#define MYSQL_KEYCACHE_READ_BLOCK(arg0) #define MYSQL_KEYCACHE_READ_BLOCK(arg0)
#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0)
#define MYSQL_KEYCACHE_READ_HIT() #define MYSQL_KEYCACHE_READ_HIT()
#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0)
#define MYSQL_KEYCACHE_READ_MISS() #define MYSQL_KEYCACHE_READ_MISS()
#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0)
#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1) #define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0)
#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3) #define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0)
#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0) #define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0)
#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1) #define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) #define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0)
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/pcre
${CMAKE_SOURCE_DIR}/strings ${CMAKE_SOURCE_DIR}/strings
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
${SSL_INTERNAL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS}
......
...@@ -22,7 +22,7 @@ ${CMAKE_SOURCE_DIR}/libmysql ...@@ -22,7 +22,7 @@ ${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/libmysqld ${CMAKE_SOURCE_DIR}/libmysqld
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_BINARY_DIR}/sql ${CMAKE_BINARY_DIR}/sql
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/pcre
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
${SSL_INCLUDE_DIRS} ${SSL_INCLUDE_DIRS}
${SSL_INTERNAL_INCLUDE_DIRS} ${SSL_INTERNAL_INCLUDE_DIRS}
...@@ -118,7 +118,7 @@ ENDIF() ...@@ -118,7 +118,7 @@ ENDIF()
SET(LIBS SET(LIBS
dbug strings regex mysys vio dbug strings mysys pcre vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${ZLIB_LIBRARY} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
${MYSQLD_STATIC_PLUGIN_LIBS} ${MYSQLD_STATIC_PLUGIN_LIBS}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld/include ${CMAKE_SOURCE_DIR}/libmysqld/include
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/pcre
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${MY_READLINE_INCLUDE_DIR} ${MY_READLINE_INCLUDE_DIR}
) )
...@@ -34,7 +34,7 @@ ENDIF(UNIX) ...@@ -34,7 +34,7 @@ ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc
COMPONENT Test) COMPONENT Test)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver) TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre pcreposix)
IF(CMAKE_GENERATOR MATCHES "Xcode") IF(CMAKE_GENERATOR MATCHES "Xcode")
# It does not seem possible to tell Xcode the resulting target might need # It does not seem possible to tell Xcode the resulting target might need
......
...@@ -234,15 +234,15 @@ set names utf8mb4; ...@@ -234,15 +234,15 @@ set names utf8mb4;
set names utf8mb4; set names utf8mb4;
# This should return TRUE # This should return TRUE
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
# This should return FALSE # This should return FALSE
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
# #
# Bug #4555 # Bug #4555
......
...@@ -94,7 +94,7 @@ while ($_show_slave_status_items) ...@@ -94,7 +94,7 @@ while ($_show_slave_status_items)
--replace_regex /\.[\\\/]master/master/ --replace_regex /\.[\\\/]master/master/
--let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1) --let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1)
--let $_slave_field_result_replace= /[\\]/\// $slave_field_result_replace --let $_slave_field_result_replace= /[\\\\]/\// $slave_field_result_replace
--replace_regex $_slave_field_result_replace --replace_regex $_slave_field_result_replace
--let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')` --let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`
--echo $_show_slave_status_name = '$_show_slave_status_value' --echo $_show_slave_status_name = '$_show_slave_status_value'
......
...@@ -316,26 +316,26 @@ NULL ...@@ -316,26 +316,26 @@ NULL
drop table t1; drop table t1;
set names utf8; set names utf8;
set names utf8; set names utf8;
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
'вася' rlike '[[:<:]]вася[[:>:]]' 'вася' rlike '\\bвася\\b'
1 1
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
'вася ' rlike '[[:<:]]вася[[:>:]]' 'вася ' rlike '\\bвася\\b'
1 1
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
' вася' rlike '[[:<:]]вася[[:>:]]' ' вася' rlike '\\bвася\\b'
1 1
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
' вася ' rlike '[[:<:]]вася[[:>:]]' ' вася ' rlike '\\bвася\\b'
1 1
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
'васяz' rlike '[[:<:]]вася[[:>:]]' 'васяz' rlike '\\bвася\\b'
0 0
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
'zвася' rlike '[[:<:]]вася[[:>:]]' 'zвася' rlike '\\bвася\\b'
0 0
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
'zвасяz' rlike '[[:<:]]вася[[:>:]]' 'zвасяz' rlike '\\bвася\\b'
0 0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci); CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci);
ALTER TABLE t1 ADD COLUMN b CHAR(20); ALTER TABLE t1 ADD COLUMN b CHAR(20);
......
...@@ -316,26 +316,26 @@ NULL ...@@ -316,26 +316,26 @@ NULL
drop table t1; drop table t1;
set names utf8mb4; set names utf8mb4;
set names utf8mb4; set names utf8mb4;
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
'вася' rlike '[[:<:]]вася[[:>:]]' 'вася' rlike '\\bвася\\b'
1 1
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
'вася ' rlike '[[:<:]]вася[[:>:]]' 'вася ' rlike '\\bвася\\b'
1 1
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
' вася' rlike '[[:<:]]вася[[:>:]]' ' вася' rlike '\\bвася\\b'
1 1
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
' вася ' rlike '[[:<:]]вася[[:>:]]' ' вася ' rlike '\\bвася\\b'
1 1
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
'васяz' rlike '[[:<:]]вася[[:>:]]' 'васяz' rlike '\\bвася\\b'
0 0
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
'zвася' rlike '[[:<:]]вася[[:>:]]' 'zвася' rlike '\\bвася\\b'
0 0
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
'zвасяz' rlike '[[:<:]]вася[[:>:]]' 'zвасяz' rlike '\\bвася\\b'
0 0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci); CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci);
ALTER TABLE t1 ADD COLUMN b CHAR(20); ALTER TABLE t1 ADD COLUMN b CHAR(20);
......
...@@ -306,26 +306,26 @@ NULL ...@@ -306,26 +306,26 @@ NULL
drop table t1; drop table t1;
set names utf8mb4; set names utf8mb4;
set names utf8mb4; set names utf8mb4;
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
'вася' rlike '[[:<:]]вася[[:>:]]' 'вася' rlike '\\bвася\\b'
1 1
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
'вася ' rlike '[[:<:]]вася[[:>:]]' 'вася ' rlike '\\bвася\\b'
1 1
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
' вася' rlike '[[:<:]]вася[[:>:]]' ' вася' rlike '\\bвася\\b'
1 1
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
' вася ' rlike '[[:<:]]вася[[:>:]]' ' вася ' rlike '\\bвася\\b'
1 1
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
'васяz' rlike '[[:<:]]вася[[:>:]]' 'васяz' rlike '\\bвася\\b'
0 0
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
'zвася' rlike '[[:<:]]вася[[:>:]]' 'zвася' rlike '\\bвася\\b'
0 0
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
'zвасяz' rlike '[[:<:]]вася[[:>:]]' 'zвасяz' rlike '\\bвася\\b'
0 0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE heap; CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE heap;
ALTER TABLE t1 ADD COLUMN b CHAR(20); ALTER TABLE t1 ADD COLUMN b CHAR(20);
......
...@@ -316,26 +316,26 @@ NULL ...@@ -316,26 +316,26 @@ NULL
drop table t1; drop table t1;
set names utf8mb4; set names utf8mb4;
set names utf8mb4; set names utf8mb4;
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
'вася' rlike '[[:<:]]вася[[:>:]]' 'вася' rlike '\\bвася\\b'
1 1
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
'вася ' rlike '[[:<:]]вася[[:>:]]' 'вася ' rlike '\\bвася\\b'
1 1
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
' вася' rlike '[[:<:]]вася[[:>:]]' ' вася' rlike '\\bвася\\b'
1 1
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
' вася ' rlike '[[:<:]]вася[[:>:]]' ' вася ' rlike '\\bвася\\b'
1 1
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
'васяz' rlike '[[:<:]]вася[[:>:]]' 'васяz' rlike '\\bвася\\b'
0 0
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
'zвася' rlike '[[:<:]]вася[[:>:]]' 'zвася' rlike '\\bвася\\b'
0 0
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
'zвасяz' rlike '[[:<:]]вася[[:>:]]' 'zвасяz' rlike '\\bвася\\b'
0 0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE InnoDB; CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE InnoDB;
ALTER TABLE t1 ADD COLUMN b CHAR(20); ALTER TABLE t1 ADD COLUMN b CHAR(20);
......
...@@ -316,26 +316,26 @@ NULL ...@@ -316,26 +316,26 @@ NULL
drop table t1; drop table t1;
set names utf8mb4; set names utf8mb4;
set names utf8mb4; set names utf8mb4;
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
'вася' rlike '[[:<:]]вася[[:>:]]' 'вася' rlike '\\bвася\\b'
1 1
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
'вася ' rlike '[[:<:]]вася[[:>:]]' 'вася ' rlike '\\bвася\\b'
1 1
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
' вася' rlike '[[:<:]]вася[[:>:]]' ' вася' rlike '\\bвася\\b'
1 1
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
' вася ' rlike '[[:<:]]вася[[:>:]]' ' вася ' rlike '\\bвася\\b'
1 1
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
'васяz' rlike '[[:<:]]вася[[:>:]]' 'васяz' rlike '\\bвася\\b'
0 0
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
'zвася' rlike '[[:<:]]вася[[:>:]]' 'zвася' rlike '\\bвася\\b'
0 0
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
'zвасяz' rlike '[[:<:]]вася[[:>:]]' 'zвасяz' rlike '\\bвася\\b'
0 0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE MyISAM; CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE MyISAM;
ALTER TABLE t1 ADD COLUMN b CHAR(20); ALTER TABLE t1 ADD COLUMN b CHAR(20);
......
This diff is collapsed.
...@@ -76,10 +76,10 @@ SET SESSION innodb_strict_mode = ON; ...@@ -76,10 +76,10 @@ SET SESSION innodb_strict_mode = ON;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. --echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
--echo # But it is an invalid mode in InnoDB --echo # But it is an invalid mode in InnoDB
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
SHOW WARNINGS; SHOW WARNINGS;
...@@ -108,20 +108,20 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE ...@@ -108,20 +108,20 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
--echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE --echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
--echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC --echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
SHOW WARNINGS; SHOW WARNINGS;
...@@ -240,10 +240,10 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE ...@@ -240,10 +240,10 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
--echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. --echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and --echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
...@@ -251,20 +251,20 @@ SHOW WARNINGS; ...@@ -251,20 +251,20 @@ SHOW WARNINGS;
--echo # and that they can be set to default values during strict mode. --echo # and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope; SET GLOBAL innodb_file_format=Antelope;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS; SHOW WARNINGS;
...@@ -312,20 +312,20 @@ SET GLOBAL innodb_file_format=Barracuda; ...@@ -312,20 +312,20 @@ SET GLOBAL innodb_file_format=Barracuda;
--echo # values during strict mode. --echo # values during strict mode.
SET GLOBAL innodb_file_per_table=OFF; SET GLOBAL innodb_file_per_table=OFF;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
SHOW WARNINGS; SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS; SHOW WARNINGS;
......
...@@ -178,10 +178,10 @@ set innodb_strict_mode = on; ...@@ -178,10 +178,10 @@ set innodb_strict_mode = on;
create table t1 (id int primary key) engine = innodb key_block_size = 0; create table t1 (id int primary key) engine = innodb key_block_size = 0;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 9; create table t2 (id int primary key) engine = innodb key_block_size = 9;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
...@@ -205,25 +205,25 @@ drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; ...@@ -205,25 +205,25 @@ drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
create table t1 (id int primary key) engine = innodb create table t1 (id int primary key) engine = innodb
key_block_size = 8 row_format = compressed; key_block_size = 8 row_format = compressed;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb create table t2 (id int primary key) engine = innodb
key_block_size = 8 row_format = redundant; key_block_size = 8 row_format = redundant;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb create table t3 (id int primary key) engine = innodb
key_block_size = 8 row_format = compact; key_block_size = 8 row_format = compact;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t4 (id int primary key) engine = innodb create table t4 (id int primary key) engine = innodb
key_block_size = 8 row_format = dynamic; key_block_size = 8 row_format = dynamic;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
create table t5 (id int primary key) engine = innodb create table t5 (id int primary key) engine = innodb
...@@ -234,25 +234,25 @@ FROM information_schema.tables WHERE engine='innodb'; ...@@ -234,25 +234,25 @@ FROM information_schema.tables WHERE engine='innodb';
drop table t1, t5; drop table t1, t5;
#test multiple errors #test multiple errors
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb create table t1 (id int primary key) engine = innodb
key_block_size = 9 row_format = redundant; key_block_size = 9 row_format = redundant;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = compact; key_block_size = 9 row_format = compact;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = dynamic; key_block_size = 9 row_format = dynamic;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
SELECT table_schema, table_name, row_format, data_length, index_length SELECT table_schema, table_name, row_format, data_length, index_length
...@@ -261,40 +261,40 @@ FROM information_schema.tables WHERE engine='innodb'; ...@@ -261,40 +261,40 @@ FROM information_schema.tables WHERE engine='innodb';
#test valid values with innodb_file_per_table unset #test valid values with innodb_file_per_table unset
set global innodb_file_per_table = off; set global innodb_file_per_table = off;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb key_block_size = 1; create table t1 (id int primary key) engine = innodb key_block_size = 1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 2; create table t2 (id int primary key) engine = innodb key_block_size = 2;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb key_block_size = 4; create table t3 (id int primary key) engine = innodb key_block_size = 4;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t4 (id int primary key) engine = innodb key_block_size = 8; create table t4 (id int primary key) engine = innodb key_block_size = 8;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t5 (id int primary key) engine = innodb key_block_size = 16; create table t5 (id int primary key) engine = innodb key_block_size = 16;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t6 (id int primary key) engine = innodb row_format = compressed; create table t6 (id int primary key) engine = innodb row_format = compressed;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic; create table t7 (id int primary key) engine = innodb row_format = dynamic;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact; create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant; create table t9 (id int primary key) engine = innodb row_format = redundant;
...@@ -307,40 +307,40 @@ drop table t8, t9; ...@@ -307,40 +307,40 @@ drop table t8, t9;
set global innodb_file_per_table = on; set global innodb_file_per_table = on;
set global innodb_file_format = `0`; set global innodb_file_format = `0`;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb key_block_size = 1; create table t1 (id int primary key) engine = innodb key_block_size = 1;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 2; create table t2 (id int primary key) engine = innodb key_block_size = 2;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb key_block_size = 4; create table t3 (id int primary key) engine = innodb key_block_size = 4;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t4 (id int primary key) engine = innodb key_block_size = 8; create table t4 (id int primary key) engine = innodb key_block_size = 8;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t5 (id int primary key) engine = innodb key_block_size = 16; create table t5 (id int primary key) engine = innodb key_block_size = 16;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t6 (id int primary key) engine = innodb row_format = compressed; create table t6 (id int primary key) engine = innodb row_format = compressed;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE --error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic; create table t7 (id int primary key) engine = innodb row_format = dynamic;
--replace_regex / - .*[0-9]*)/)/ --replace_regex / - .*[0-9]*[)]/)/
show warnings; show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact; create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant; create table t9 (id int primary key) engine = innodb row_format = redundant;
......
...@@ -10,14 +10,23 @@ sub list_cases { ...@@ -10,14 +10,23 @@ sub list_cases {
sub start_test { sub start_test {
my ($self, $tinfo)= @_; my ($self, $tinfo)= @_;
my $args=[ ]; my $args;
my $path;
my $cmd = $self->{ctests}->{$tinfo->{shortname}};
if ($cmd =~ /[ "'><%!*?]/) {
($path, $args) = ('/bin/sh', [ '-c', $cmd ])
} else {
($path, $args) = ($cmd, , [ ])
}
my $oldpwd=getcwd(); my $oldpwd=getcwd();
chdir $::opt_vardir; chdir $::opt_vardir;
my $proc=My::SafeProcess->new my $proc=My::SafeProcess->new
( (
name => $tinfo->{shortname}, name => $tinfo->{shortname},
path => $self->{ctests}->{$tinfo->{shortname}}, path => $path,
args => \$args, args => \$args,
append => 1, append => 1,
output => $::path_current_testlog, output => $::path_current_testlog,
......
...@@ -209,15 +209,15 @@ set names utf8; ...@@ -209,15 +209,15 @@ set names utf8;
set names utf8; set names utf8;
# This should return TRUE # This should return TRUE
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
# This should return FALSE # This should return FALSE
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
# #
# Bug #4555 # Bug #4555
......
...@@ -207,15 +207,15 @@ set names utf8mb4; ...@@ -207,15 +207,15 @@ set names utf8mb4;
set names utf8mb4; set names utf8mb4;
# This should return TRUE # This should return TRUE
select 'вася' rlike '[[:<:]]вася[[:>:]]'; select 'вася' rlike '\\bвася\\b';
select 'вася ' rlike '[[:<:]]вася[[:>:]]'; select 'вася ' rlike '\\bвася\\b';
select ' вася' rlike '[[:<:]]вася[[:>:]]'; select ' вася' rlike '\\bвася\\b';
select ' вася ' rlike '[[:<:]]вася[[:>:]]'; select ' вася ' rlike '\\bвася\\b';
# This should return FALSE # This should return FALSE
select 'васяz' rlike '[[:<:]]вася[[:>:]]'; select 'васяz' rlike '\\bвася\\b';
select 'zвася' rlike '[[:<:]]вася[[:>:]]'; select 'zвася' rlike '\\bвася\\b';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; select 'zвасяz' rlike '\\bвася\\b';
# #
# Bug #4555 # Bug #4555
......
SET NAMES utf8;
--echo #
--echo # MDEV-4425 REGEXP enhancements
--echo #
--echo #
--echo # Checking RLIKE
--echo #
# Checking that à is a single character
SELECT 'à' RLIKE '^.$';
# Checking \x{FFFF} syntax and case sensitivity
SELECT 'à' RLIKE '\\x{00E0}';
SELECT 'À' RLIKE '\\x{00E0}';
SELECT 'à' RLIKE '\\x{00C0}';
SELECT 'À' RLIKE '\\x{00C0}';
SELECT 'à' RLIKE '\\x{00E0}' COLLATE utf8_bin;
SELECT 'À' RLIKE '\\x{00E0}' COLLATE utf8_bin;
SELECT 'à' RLIKE '\\x{00C0}' COLLATE utf8_bin;
SELECT 'À' RLIKE '\\x{00C0}' COLLATE utf8_bin;
# Checking Unicode character classes
CREATE TABLE t1 (ch VARCHAR(22)) CHARACTER SET utf8;
CREATE TABLE t2 (class VARCHAR(32)) CHARACTER SET utf8;
INSERT INTO t1 VALUES ('Я'),('Σ'),('A'),('À');
INSERT INTO t1 VALUES ('я'),('σ'),('a'),('à');
INSERT INTO t1 VALUES ('㐗'),('갷'),('ප');
INSERT INTO t1 VALUES ('1'),('௨');
INSERT INTO t2 VALUES ('\\p{Cyrillic}'),('\\p{Greek}'),('\\p{Latin}');
INSERT INTO t2 VALUES ('\\p{Han}'),('\\p{Hangul}');
INSERT INTO t2 VALUES ('\\p{Sinhala}'), ('\\p{Tamil}');
INSERT INTO t2 VALUES ('\\p{L}'),('\\p{Ll}'),('\\p{Lu}'),('\\p{L&}');
INSERT INTO t2 VALUES ('[[:alpha:]]'),('[[:digit:]]');
SELECT class, ch, ch RLIKE class FROM t1, t2 ORDER BY class, BINARY ch;
DROP TABLE t1, t2;
# newline character
SELECT '\n' RLIKE '(*CR)';
SELECT '\n' RLIKE '(*LF)';
SELECT '\n' RLIKE '(*CRLF)';
SELECT '\n' RLIKE '(*ANYCRLF)';
SELECT '\n' RLIKE '(*ANY)';
SELECT 'a\nb' RLIKE '(*LF)(?m)^a$';
SELECT 'a\nb' RLIKE '(*CR)(?m)^a$';
SELECT 'a\nb' RLIKE '(*CRLF)(?m)^a$';
SELECT 'a\nb' RLIKE '(*ANYCRLF)(?m)^a$';
SELECT 'a\rb' RLIKE '(*LF)(?m)^a$';
SELECT 'a\rb' RLIKE '(*CR)(?m)^a$';
SELECT 'a\rb' RLIKE '(*CRLF)(?m)^a$';
SELECT 'a\rb' RLIKE '(*ANYCRLF)(?m)^a$';
SELECT 'a\r\nb' RLIKE '(*LF)(?m)^a$';
SELECT 'a\r\nb' RLIKE '(*CR)(?m)^a$';
SELECT 'a\r\nb' RLIKE '(*CRLF)(?m)^a$';
SELECT 'a\r\nb' RLIKE '(*ANYCRLF)(?m)^a$';
#backreference
SELECT 'aa' RLIKE '(a)\\g1';
SELECT 'aa bb' RLIKE '(a)\\g1 (b)\\g2';
#repitition
SELECT 'aaaaa' RLIKE 'a{0,5}';
SELECT 'aaaaa' RLIKE 'a{1,3}';
SELECT 'aaaaa' RLIKE 'a{0,}';
SELECT 'aaaaa' RLIKE 'a{10,20}';
#Recursion
SELECT 'aabb' RLIKE 'a(?R)?b';
SELECT 'aabb' RLIKE 'aa(?R)?bb';
#subroutine
#SELECT 'abbbc' RLIKE '(a(b|(?1))*c)';
#SELECT 'abca' RLIKE '([abc])(?1){3}';
#Atomic grouping
SELECT 'abcc' RLIKE 'a(?>bc|b)c';
SELECT 'abc' RLIKE 'a(?>bc|b)c';
#lookahead - negative
SELECT 'ab' RLIKE 'a(?!b)';
SELECT 'ac' RLIKE 'a(?!b)';
#lookahead - positive
SELECT 'ab' RLIKE 'a(?=b)';
SELECT 'ac' RLIKE 'a(?=b)';
#lookbehind - negative
SELECT 'ab' RLIKE '(?<!a)b';
SELECT 'cb' RLIKE '(?<!a)b';
#lookbehind - positive
SELECT 'ab' RLIKE '(?<=a)b';
SELECT 'cb' RLIKE '(?<=a)b';
# named subpatterns
SELECT 'aa' RLIKE '(?P<pattern>a)(?P=pattern)';
SELECT 'aba' RLIKE '(?P<pattern>a)b(?P=pattern)';
#comments
SELECT 'a' RLIKE 'a(?#comment)';
SELECT 'aa' RLIKE 'a(?#comment)a';
SELECT 'aba' RLIKE 'a(?#b)a';
#ungreedy maching
#SELECT 'ddd <ab>cc</ab> eee' RLIKE '<.+?>';
#Extended character classes
SELECT 'aaa' RLIKE '\\W\\W\\W';
SELECT '%' RLIKE '\\W';
SELECT '%a$' RLIKE '\\W.\\W';
SELECT '123' RLIKE '\\d\\d\\d';
SELECT 'aaa' RLIKE '\\d\\d\\d';
SELECT '1a3' RLIKE '\\d.\\d';
SELECT 'a1b' RLIKE '\\d.\\d';
SELECT '8' RLIKE '\\D';
SELECT 'a' RLIKE '\\D';
SELECT '%' RLIKE '\\D';
SELECT 'a1' RLIKE '\\D\\d';
SELECT 'a1' RLIKE '\\d\\D';
SELECT '\t' RLIKE '\\s';
SELECT '\r' RLIKE '\\s';
SELECT '\n' RLIKE '\\s';
SELECT '\v' RLIKE '\\s';
SELECT 'a' RLIKE '\\S';
SELECT '1' RLIKE '\\S';
SELECT '!' RLIKE '\\S';
SELECT '.' RLIKE '\\S';
--echo #
--echo # Checking REGEXP_REPLACE
--echo #
# Check data type
CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x');
SHOW CREATE TABLE t1;
DROP TABLE t1;
# Check print()
EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x');
# Check decimals
CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0;
SHOW CREATE TABLE t1;
DROP TABLE t1;
# Return NULL if any of the arguments are NULL
SELECT REGEXP_REPLACE(NULL,'b','c');
SELECT REGEXP_REPLACE('a',NULL,'c');
SELECT REGEXP_REPLACE('a','b',NULL);
# Return the original string if no match
SELECT REGEXP_REPLACE('a','x','b');
# Return the original string for an empty pattern
SELECT REGEXP_REPLACE('a','','b');
# Check that replace stops on the first empty match
# 'a5b' matches the pattern and '5' is replaced to 'x'
# then 'ab' matches the pattern, but the match '5*' is empty,
# so replacing stops here.
SELECT REGEXP_REPLACE('a5b ab a5b','(?<=a)5*(?=b)','x');
# A modified version of the previous example,
# to check that all matches are replaced if no empty match is met.
SELECT REGEXP_REPLACE('a5b a5b a5b','(?<=a)5*(?=b)','x');
# Check that case sensitiviry respects the collation
SELECT REGEXP_REPLACE('A','a','b');
SELECT REGEXP_REPLACE('a','A','b');
SELECT REGEXP_REPLACE('A' COLLATE utf8_bin,'a','b');
SELECT REGEXP_REPLACE('a' COLLATE utf8_bin,'A','b');
# Pattern references in the "replace" string
SELECT REGEXP_REPLACE('James Bond', '(.*) (.*)', '\\2, \\1 \\2');
# Checking with UTF8
SELECT REGEXP_REPLACE('абвгд','в','ц');
# Check that it does not treat binary strings as UTF8
SELECT REGEXP_REPLACE('г',0xB3,0xB4);
# Check that it replaces all matches by default
SELECT REGEXP_REPLACE('aaaa','a','b');
# Replace all matches except the first letter
SELECT REGEXP_REPLACE('aaaa','(?<=.)a','b');
# Replace all matches except the last letter
SELECT REGEXP_REPLACE('aaaa','a(?=.)','b');
# Replace all matches except the first and the last letter
SELECT REGEXP_REPLACE('aaaa','(?<=.)a(?=.)','b');
# newline character
SELECT REGEXP_REPLACE('a\nb','(*LF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\nb','(*CR)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\nb','(*CRLF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\nb','(*ANYCRLF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\rb','(*LF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\rb','(*CR)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\rb','(*CRLF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\rb','(*ANYCRLF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\r\nb','(*LF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\r\nb','(*CR)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\r\nb','(*CRLF)(?m)^a$','c');
SELECT REGEXP_REPLACE('a\r\nb','(*ANYCRLF)(?m)^a$','c');
#backreference
SELECT REGEXP_REPLACE('aa','(a)\\g1','b');
SELECT REGEXP_REPLACE('aa bb','(a)\\g1 (b)\\g2','c');
#repitition
SELECT REGEXP_REPLACE('aaaaa','a{1,3}','b');
SELECT REGEXP_REPLACE('aaaaa','a{10,20}','b');
#Recursion
SELECT REGEXP_REPLACE('daabbd','a(?R)?b','c');
SELECT REGEXP_REPLACE('daabbd','aa(?R)?bb','c');
#Atomic grouping
SELECT REGEXP_REPLACE('dabccd','a(?>bc|b)c','e');
SELECT REGEXP_REPLACE('dabcd','a(?>bc|b)c','e');
#lookahead - negative
SELECT REGEXP_REPLACE('ab','a(?!b)','e');
SELECT REGEXP_REPLACE('ac','a(?!b)','e');
#lookahead - positive
SELECT REGEXP_REPLACE('ab','a(?=b)','e');
SELECT REGEXP_REPLACE('ac','a(?=b)','e');
#lookbehind - negative
SELECT REGEXP_REPLACE('ab','(?<!a)b','e');
SELECT REGEXP_REPLACE('cb','(?<!a)b','e');
#lookbehind - positive
SELECT REGEXP_REPLACE('ab','(?<=a)b','e');
SELECT REGEXP_REPLACE('cb','(?<=a)b','e');
# named subpatterns
SELECT REGEXP_REPLACE('aa','(?P<pattern>a)(?P=pattern)','b');
SELECT REGEXP_REPLACE('aba','(?P<pattern>a)b(?P=pattern)','c');
#comments
SELECT REGEXP_REPLACE('a','a(?#comment)','e');
SELECT REGEXP_REPLACE('aa','a(?#comment)a','e');
SELECT REGEXP_REPLACE('aba','a(?#b)a','e');
#ungreedy maching
SELECT REGEXP_REPLACE('ddd<ab>cc</ab>eee','<.+?>','*');
#Extended character classes
SELECT REGEXP_REPLACE('aaa','\\W\\W\\W','e');
SELECT REGEXP_REPLACE('aaa','\\w\\w\\w','e');
SELECT REGEXP_REPLACE('%','\\W','e');
SELECT REGEXP_REPLACE('%a$','\\W.\\W','e');
SELECT REGEXP_REPLACE('%a$','\\W\\w\\W','e');
SELECT REGEXP_REPLACE('123','\\d\\d\\d\\d\\d\\d','e');
SELECT REGEXP_REPLACE('123','\\d\\d\\d','e');
SELECT REGEXP_REPLACE('aaa','\\d\\d\\d','e');
SELECT REGEXP_REPLACE('1a3','\\d.\\d\\d.\\d','e');
SELECT REGEXP_REPLACE('1a3','\\d.\\d','e');
SELECT REGEXP_REPLACE('a1b','\\d.\\d','e');
SELECT REGEXP_REPLACE('8','\\D','e');
SELECT REGEXP_REPLACE('a','\\D','e');
SELECT REGEXP_REPLACE('%','\\D','e');
SELECT REGEXP_REPLACE('a1','\\D\\d','e');
SELECT REGEXP_REPLACE('a1','\\d\\D','e');
SELECT REGEXP_REPLACE('\t','\\s','e');
SELECT REGEXP_REPLACE('\r','\\s','e');
SELECT REGEXP_REPLACE('\n','\\s','e');
SELECT REGEXP_REPLACE('a','\\S','e');
SELECT REGEXP_REPLACE('1','\\S','e');
SELECT REGEXP_REPLACE('!','\\S','e');
SELECT REGEXP_REPLACE('.','\\S','e');
--echo #
--echo # Checking REGEXP_INSTR
--echo #
SELECT REGEXP_INSTR('abcd','X');
SELECT REGEXP_INSTR('abcd','a');
SELECT REGEXP_INSTR('abcd','b');
SELECT REGEXP_INSTR('abcd','c');
SELECT REGEXP_INSTR('abcd','d');
SELECT REGEXP_INSTR('aaaa','(?<=a)a');
SELECT REGEXP_INSTR('вася','в');
SELECT REGEXP_INSTR('вася','а');
SELECT REGEXP_INSTR('вася','с');
SELECT REGEXP_INSTR('вася','я');
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('в' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('а' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('с' USING koi8r));
SELECT REGEXP_INSTR(CONVERT('вася' USING koi8r), CONVERT('я' USING koi8r));
--echo #
--echo # Checking REGEXP_SUBSTR
--echo #
# Check data type
CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b');
SHOW CREATE TABLE t1;
DROP TABLE t1;
# Check print()
EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b');
# Check decimals
CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0;
SHOW CREATE TABLE t1;
DROP TABLE t1;
SELECT REGEXP_SUBSTR('See https://mariadb.org/en/foundation/ for details', 'https?://[^/]*');
THE MAIN PCRE LIBRARY
---------------------
Written by: Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
Copyright (c) 1997-2013 University of Cambridge
All rights reserved
PCRE JUST-IN-TIME COMPILATION SUPPORT
-------------------------------------
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2010-2013 Zoltan Herczeg
All rights reserved.
STACK-LESS JUST-IN-TIME COMPILER
--------------------------------
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2009-2013 Zoltan Herczeg
All rights reserved.
THE C++ WRAPPER LIBRARY
-----------------------
Written by: Google Inc.
Copyright (c) 2007-2012 Google Inc
All rights reserved
####
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
PCRE LICENCE
------------
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself.
The basic library functions are written in C and are freestanding. Also
included in the distribution is a set of C++ wrapper functions, and a
just-in-time compiler that can be used to optimize pattern matching. These
are both optional features that can be omitted when the library is built.
THE BASIC LIBRARY FUNCTIONS
---------------------------
Written by: Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
Copyright (c) 1997-2013 University of Cambridge
All rights reserved.
PCRE JUST-IN-TIME COMPILATION SUPPORT
-------------------------------------
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2010-2013 Zoltan Herczeg
All rights reserved.
STACK-LESS JUST-IN-TIME COMPILER
--------------------------------
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2009-2013 Zoltan Herczeg
All rights reserved.
THE C++ WRAPPER FUNCTIONS
-------------------------
Contributed by: Google Inc.
Copyright (c) 2007-2012, Google Inc.
All rights reserved.
THE "BSD" LICENCE
-----------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above 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 University of Cambridge nor the name of Google
Inc. nor the names of their contributors may be used to endorse or
promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
End
This diff is collapsed.
This diff is collapsed.
Compiling PCRE on non-Unix systems
----------------------------------
This has been renamed to better reflect its contents. Please see the file
NON-AUTOTOOLS-BUILD for details of how to build PCRE without using autotools.
####
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified from FindReadline.cmake (PH Feb 2012)
if(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY)
set(EDITLINE_FOUND TRUE)
else(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY)
FIND_PATH(EDITLINE_INCLUDE_DIR readline.h
/usr/include/editline
/usr/include/edit/readline
/usr/include/readline
)
FIND_LIBRARY(EDITLINE_LIBRARY NAMES edit)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Editline DEFAULT_MSG EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY )
MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY)
endif(EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY AND NCURSES_LIBRARY)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
# This macro is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
# it also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is found if all variables listed are TRUE.
# Example:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, the location is reported using the VAR1 argument, so
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
# If the second argument is DEFAULT_MSG, the message in the failure case will
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
IF (${_NAME}_FIND_REQUIRED)
SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}")
ELSE (${_NAME}_FIND_REQUIRED)
SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}")
ENDIF (${_NAME}_FIND_REQUIRED)
ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "${_FAIL_MSG}")
ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
STRING(TOUPPER ${_NAME} _NAME_UPPER)
SET(${_NAME_UPPER}_FOUND TRUE)
IF(NOT ${_VAR1})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_VAR1})
FOREACH(_CURRENT_VAR ${ARGN})
IF(NOT ${_CURRENT_VAR})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_CURRENT_VAR})
ENDFOREACH(_CURRENT_VAR)
IF (${_NAME_UPPER}_FOUND)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ELSE (${_NAME_UPPER}_FOUND)
IF (${_NAME}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
ELSE (${_NAME}_FIND_REQUIRED)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "${_FAIL_MESSAGE}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ENDIF (${_NAME}_FIND_REQUIRED)
ENDIF (${_NAME_UPPER}_FOUND)
ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
# from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake
# http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS
# --> BSD licensed
#
# GNU Readline library finder
if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
set(READLINE_FOUND TRUE)
else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h
/usr/include/readline
)
# 2008-04-22 The next clause used to read like this:
#
# FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
# FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )
# include(FindPackageHandleStandardArgs)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY )
#
# I was advised to modify it such that it will find an ncurses library if
# required, but not if one was explicitly given, that is, it allows the
# default to be overridden. PH
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY )
MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
/* config.h for CMake builds */
#cmakedefine HAVE_DIRENT_H 1
#cmakedefine HAVE_SYS_STAT_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_WINDOWS_H 1
#cmakedefine HAVE_TYPE_TRAITS_H 1
#cmakedefine HAVE_BITS_TYPE_TRAITS_H 1
#cmakedefine HAVE_BCOPY 1
#cmakedefine HAVE_MEMMOVE 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRTOLL 1
#cmakedefine HAVE_STRTOQ 1
#cmakedefine HAVE__STRTOI64 1
#cmakedefine PCRE_STATIC 1
#cmakedefine SUPPORT_PCRE8 1
#cmakedefine SUPPORT_PCRE16 1
#cmakedefine SUPPORT_PCRE32 1
#cmakedefine SUPPORT_JIT 1
#cmakedefine SUPPORT_PCREGREP_JIT 1
#cmakedefine SUPPORT_UTF 1
#cmakedefine SUPPORT_UCP 1
#cmakedefine EBCDIC 1
#cmakedefine EBCDIC_NL25 1
#cmakedefine BSR_ANYCRLF 1
#cmakedefine NO_RECURSE 1
#cmakedefine HAVE_LONG_LONG 1
#cmakedefine HAVE_UNSIGNED_LONG_LONG 1
#cmakedefine SUPPORT_LIBBZ2 1
#cmakedefine SUPPORT_LIBZ 1
#cmakedefine SUPPORT_LIBEDIT 1
#cmakedefine SUPPORT_LIBREADLINE 1
#cmakedefine SUPPORT_VALGRIND 1
#cmakedefine SUPPORT_GCOV 1
#define NEWLINE @NEWLINE@
#define POSIX_MALLOC_THRESHOLD @PCRE_POSIX_MALLOC_THRESHOLD@
#define LINK_SIZE @PCRE_LINK_SIZE@
#define MATCH_LIMIT @PCRE_MATCH_LIMIT@
#define MATCH_LIMIT_RECURSION @PCRE_MATCH_LIMIT_RECURSION@
#define PCREGREP_BUFSIZE @PCREGREP_BUFSIZE@
#define MAX_NAME_SIZE 32
#define MAX_NAME_COUNT 10000
/* end config.h for CMake builds */
/* config.h for CMake builds */
#define HAVE_DIRENT_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
/* #undef HAVE_WINDOWS_H */
/* #undef HAVE_TYPE_TRAITS_H */
/* #undef HAVE_BITS_TYPE_TRAITS_H */
#define HAVE_BCOPY 1
#define HAVE_MEMMOVE 1
#define HAVE_STRERROR 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOQ 1
/* #undef HAVE__STRTOI64 */
#define PCRE_STATIC 1
#define SUPPORT_PCRE8 1
/* #undef SUPPORT_PCRE16 */
/* #undef SUPPORT_PCRE32 */
/* #undef SUPPORT_JIT */
#define SUPPORT_PCREGREP_JIT 1
#define SUPPORT_UTF 1
#define SUPPORT_UCP 1
/* #undef EBCDIC */
/* #undef EBCDIC_NL25 */
/* #undef BSR_ANYCRLF */
/* #undef NO_RECURSE */
#define HAVE_LONG_LONG 1
#define HAVE_UNSIGNED_LONG_LONG 1
#define SUPPORT_LIBBZ2 1
#define SUPPORT_LIBZ 1
/* #undef SUPPORT_LIBEDIT */
#define SUPPORT_LIBREADLINE 1
/* #undef SUPPORT_VALGRIND */
/* #undef SUPPORT_GCOV */
#define NEWLINE 10
#define POSIX_MALLOC_THRESHOLD 10
#define LINK_SIZE 2
#define MATCH_LIMIT 10000000
#define MATCH_LIMIT_RECURSION MATCH_LIMIT
#define PCREGREP_BUFSIZE 20480
#define MAX_NAME_SIZE 32
#define MAX_NAME_COUNT 10000
/* end config.h for CMake builds */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<html>
<head>
<title>pcre-config specification</title>
</head>
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
<h1>pcre-config man page</h1>
<p>
Return to the <a href="index.html">PCRE index page</a>.
</p>
<p>
This page is part of the PCRE HTML documentation. It was generated automatically
from the original man page. If there is any nonsense in it, please consult the
man page, in case the conversion went wrong.
<br>
<ul>
<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
<li><a name="TOC3" href="#SEC3">OPTIONS</a>
<li><a name="TOC4" href="#SEC4">SEE ALSO</a>
<li><a name="TOC5" href="#SEC5">AUTHOR</a>
<li><a name="TOC6" href="#SEC6">REVISION</a>
</ul>
<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
<P>
<b>pcre-config [--prefix] [--exec-prefix] [--version] [--libs]</b>
<b>[--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b>
<b>[--cflags] [--cflags-posix]</b>
</P>
<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
<P>
<b>pcre-config</b> returns the configuration of the installed PCRE
libraries and the options required to compile a program to use them. Some of
the options apply only to the 8-bit, or 16-bit, or 32-bit libraries,
respectively, and are
not available if only one of those libraries has been built. If an unavailable
option is encountered, the "usage" information is output.
</P>
<br><a name="SEC3" href="#TOC1">OPTIONS</a><br>
<P>
<b>--prefix</b>
Writes the directory prefix used in the PCRE installation for architecture
independent files (<i>/usr</i> on many systems, <i>/usr/local</i> on some
systems) to the standard output.
</P>
<P>
<b>--exec-prefix</b>
Writes the directory prefix used in the PCRE installation for architecture
dependent files (normally the same as <b>--prefix</b>) to the standard output.
</P>
<P>
<b>--version</b>
Writes the version number of the installed PCRE libraries to the standard
output.
</P>
<P>
<b>--libs</b>
Writes to the standard output the command line options required to link
with the 8-bit PCRE library (<b>-lpcre</b> on many systems).
</P>
<P>
<b>--libs16</b>
Writes to the standard output the command line options required to link
with the 16-bit PCRE library (<b>-lpcre16</b> on many systems).
</P>
<P>
<b>--libs32</b>
Writes to the standard output the command line options required to link
with the 32-bit PCRE library (<b>-lpcre32</b> on many systems).
</P>
<P>
<b>--libs-cpp</b>
Writes to the standard output the command line options required to link with
PCRE's C++ wrapper library (<b>-lpcrecpp</b> <b>-lpcre</b> on many
systems).
</P>
<P>
<b>--libs-posix</b>
Writes to the standard output the command line options required to link with
PCRE's POSIX API wrapper library (<b>-lpcreposix</b> <b>-lpcre</b> on many
systems).
</P>
<P>
<b>--cflags</b>
Writes to the standard output the command line options required to compile
files that use PCRE (this may include some <b>-I</b> options, but is blank on
many systems).
</P>
<P>
<b>--cflags-posix</b>
Writes to the standard output the command line options required to compile
files that use PCRE's POSIX API wrapper library (this may include some <b>-I</b>
options, but is blank on many systems).
</P>
<br><a name="SEC4" href="#TOC1">SEE ALSO</a><br>
<P>
<b>pcre(3)</b>
</P>
<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
<P>
This manual page was originally written by Mark Baker for the Debian GNU/Linux
system. It has been subsequently revised as a generic PCRE man page.
</P>
<br><a name="SEC6" href="#TOC1">REVISION</a><br>
<P>
Last updated: 24 June 2012
<br>
<p>
Return to the <a href="index.html">PCRE index page</a>.
</p>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment