diff --git a/client/maxadmin.c b/client/maxadmin.c index 97459171e..45e010bb3 100644 --- a/client/maxadmin.c +++ b/client/maxadmin.c @@ -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 */ /** diff --git a/log_manager/log_manager.cc b/log_manager/log_manager.cc index 2b274a610..9dc2a0f87 100644 --- a/log_manager/log_manager.cc +++ b/log_manager/log_manager.cc @@ -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 */ #include #include @@ -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 @@ -2063,11 +2063,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 +2169,7 @@ static bool logfile_init( } } } - file_create_fail: +file_create_fail: if (namecreatefail || nameconflicts) { logfile->lf_name_seqno += 1; @@ -2161,7 +2184,7 @@ static bool logfile_init( free(logfile->lf_full_link_name); logfile->lf_full_link_name = NULL; } - + goto return_with_succp; } } while (namecreatefail || nameconflicts); /** diff --git a/log_manager/log_manager.h b/log_manager/log_manager.h index 6a4c1d6cc..4c42905d7 100644 --- a/log_manager/log_manager.h +++ b/log_manager/log_manager.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 */ diff --git a/log_manager/test/testlog.c b/log_manager/test/testlog.c index c21d30e17..c82442173 100644 --- a/log_manager/test/testlog.c +++ b/log_manager/test/testlog.c @@ -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 */ diff --git a/log_manager/test/testorder.c b/log_manager/test/testorder.c index e2bb94a7b..dd598cb75 100644 --- a/log_manager/test/testorder.c +++ b/log_manager/test/testorder.c @@ -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 */ #include diff --git a/query_classifier/query_classifier.cc b/query_classifier/query_classifier.cc index ecf305308..6eea51cdb 100644 --- a/query_classifier/query_classifier.cc +++ b/query_classifier/query_classifier.cc @@ -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; +} diff --git a/query_classifier/query_classifier.h b/query_classifier/query_classifier.h index 4ad960524..db2011642 100644 --- a/query_classifier/query_classifier.h +++ b/query_classifier/query_classifier.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 @@ 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 diff --git a/query_classifier/test/canonical_tests/canonizer.c b/query_classifier/test/canonical_tests/canonizer.c index b9b17222f..7e33fe4a1 100644 --- a/query_classifier/test/canonical_tests/canonizer.c +++ b/query_classifier/test/canonical_tests/canonizer.c @@ -7,7 +7,7 @@ #include static char* server_options[] = { - "SkySQL Gateway", + "MariaDB Corporation MaxScale", "--datadir=./", "--language=./", "--skip-innodb", diff --git a/query_classifier/test/testmain.c b/query_classifier/test/testmain.c index 00000de98..08a25d4fa 100644 --- a/query_classifier/test/testmain.c +++ b/query_classifier/test/testmain.c @@ -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 diff --git a/replication_listener/access_method_factory.h b/replication_listener/access_method_factory.h index af245fa36..2a3b6d73e 100644 --- a/replication_listener/access_method_factory.h +++ b/replication_listener/access_method_factory.h @@ -1,7 +1,7 @@ /* 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 diff --git a/replication_listener/basic_content_handler.h b/replication_listener/basic_content_handler.h index 449d0f8d4..55a52d8b2 100644 --- a/replication_listener/basic_content_handler.h +++ b/replication_listener/basic_content_handler.h @@ -1,7 +1,7 @@ /* 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 diff --git a/replication_listener/binlog_api.h b/replication_listener/binlog_api.h index 2a73423af..4920bec30 100644 --- a/replication_listener/binlog_api.h +++ b/replication_listener/binlog_api.h @@ -1,7 +1,7 @@ /* 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 diff --git a/replication_listener/binlog_driver.h b/replication_listener/binlog_driver.h index cdec99e06..9d0cbb4cb 100644 --- a/replication_listener/binlog_driver.h +++ b/replication_listener/binlog_driver.h @@ -1,7 +1,7 @@ /* 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 diff --git a/replication_listener/binlog_event.h b/replication_listener/binlog_event.h index 2b0d650e2..74022287e 100644 --- a/replication_listener/binlog_event.h +++ b/replication_listener/binlog_event.h @@ -1,7 +1,7 @@ /* 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 diff --git a/replication_listener/gtid.h b/replication_listener/gtid.h index b0ca43548..a0308b623 100644 --- a/replication_listener/gtid.h +++ b/replication_listener/gtid.h @@ -1,7 +1,7 @@ /* -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. diff --git a/replication_listener/listener_exception.h b/replication_listener/listener_exception.h index b9da4f0ae..2ed663c56 100644 --- a/replication_listener/listener_exception.h +++ b/replication_listener/listener_exception.h @@ -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. diff --git a/replication_listener/tcp_driver.h b/replication_listener/tcp_driver.h index 268f3dcee..035173608 100644 --- a/replication_listener/tcp_driver.h +++ b/replication_listener/tcp_driver.h @@ -1,7 +1,7 @@ /* 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 diff --git a/server/core/adminusers.c b/server/core/adminusers.c index 61cd7c077..3d86bd83b 100644 --- a/server/core/adminusers.c +++ b/server/core/adminusers.c @@ -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 */ #include #include diff --git a/server/core/atomic.c b/server/core/atomic.c index f8dd4a07f..5d3b99c46 100644 --- a/server/core/atomic.c +++ b/server/core/atomic.c @@ -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 */ /** diff --git a/server/core/buffer.c b/server/core/buffer.c index 290da6bde..c31373d5d 100644 --- a/server/core/buffer.c +++ b/server/core/buffer.c @@ -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 */ /** @@ -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; diff --git a/server/core/config.c b/server/core/config.c index 995e0e0f4..d32b1e317 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -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 */ /** diff --git a/server/core/dbusers.c b/server/core/dbusers.c index 4f8de392b..5b0b9c77a 100644 --- a/server/core/dbusers.c +++ b/server/core/dbusers.c @@ -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 */ /** diff --git a/server/core/dcb.c b/server/core/dcb.c index 0b2b038e7..d4333e9bc 100644 --- a/server/core/dcb.c +++ b/server/core/dcb.c @@ -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 */ /** diff --git a/server/core/filter.c b/server/core/filter.c index b199e931f..fef852d40 100644 --- a/server/core/filter.c +++ b/server/core/filter.c @@ -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 */ /** diff --git a/server/core/gateway.c b/server/core/gateway.c index f2c1eefb2..2b70d66c2 100644 --- a/server/core/gateway.c +++ b/server/core/gateway.c @@ -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 * */ @@ -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=", @@ -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", + "SkySQL MaxScale %s (C) MariaDB Corporation Ab 2013,2014", MAXSCALE_VERSION))); LOGIF(LM, (skygw_log_write( LOGFILE_MESSAGE, diff --git a/server/core/gw_utils.c b/server/core/gw_utils.c index 2662ab41d..39c5e1542 100644 --- a/server/core/gw_utils.c +++ b/server/core/gw_utils.c @@ -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 * */ diff --git a/server/core/gwbitmask.c b/server/core/gwbitmask.c index d3f031080..3a959c9f4 100644 --- a/server/core/gwbitmask.c +++ b/server/core/gwbitmask.c @@ -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 */ #include #include diff --git a/server/core/hashtable.c b/server/core/hashtable.c index 0f129e825..523048330 100644 --- a/server/core/hashtable.c +++ b/server/core/hashtable.c @@ -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 */ #include #include diff --git a/server/core/hint.c b/server/core/hint.c index 2d716771a..052c02486 100644 --- a/server/core/hint.c +++ b/server/core/hint.c @@ -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 #include diff --git a/server/core/housekeeper.c b/server/core/housekeeper.c index fe6cb9047..50556b0c6 100644 --- a/server/core/housekeeper.c +++ b/server/core/housekeeper.c @@ -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 #include diff --git a/server/core/load_utils.c b/server/core/load_utils.c index cba0c6533..3756f2485 100644 --- a/server/core/load_utils.c +++ b/server/core/load_utils.c @@ -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 */ /** diff --git a/server/core/maxkeys.c b/server/core/maxkeys.c index 9ae59f8c7..c731aaaf9 100644 --- a/server/core/maxkeys.c +++ b/server/core/maxkeys.c @@ -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 */ /** diff --git a/server/core/maxpasswd.c b/server/core/maxpasswd.c index d11980ba3..89fab40ef 100644 --- a/server/core/maxpasswd.c +++ b/server/core/maxpasswd.c @@ -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 */ /** diff --git a/server/core/modutil.c b/server/core/modutil.c index ec7f8530b..b0d846abb 100644 --- a/server/core/modutil.c +++ b/server/core/modutil.c @@ -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 */ /** diff --git a/server/core/monitor.c b/server/core/monitor.c index 101ce2e10..07fc047eb 100644 --- a/server/core/monitor.c +++ b/server/core/monitor.c @@ -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 */ /** diff --git a/server/core/poll.c b/server/core/poll.c index 12cb1d69d..d6f309c77 100644 --- a/server/core/poll.c +++ b/server/core/poll.c @@ -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 */ #include #include diff --git a/server/core/secrets.c b/server/core/secrets.c index f9ac62aef..fa6ff3244 100644 --- a/server/core/secrets.c +++ b/server/core/secrets.c @@ -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 */ #include diff --git a/server/core/server.c b/server/core/server.c index 43c535d0e..3520d2918 100644 --- a/server/core/server.c +++ b/server/core/server.c @@ -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 */ /** diff --git a/server/core/service.c b/server/core/service.c index a5e08f937..933da8d5e 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -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 */ /** diff --git a/server/core/session.c b/server/core/session.c index eb9d42a2b..a2f1e0178 100644 --- a/server/core/session.c +++ b/server/core/session.c @@ -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 */ /** diff --git a/server/core/spinlock.c b/server/core/spinlock.c index ce64042e3..b37c628e4 100644 --- a/server/core/spinlock.c +++ b/server/core/spinlock.c @@ -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 */ /** - * @file spinlock.c - Spinlock operations for the SkySQL Gateway + * @file spinlock.c - Spinlock operations for the MariaDB Corporation MaxScale * * @verbatim * Revision History diff --git a/server/core/test/test_mysql_users.c b/server/core/test/test_mysql_users.c index 97476b3ae..15ef96c23 100644 --- a/server/core/test/test_mysql_users.c +++ b/server/core/test/test_mysql_users.c @@ -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 */ /** diff --git a/server/core/test/testadminusers.c b/server/core/test/testadminusers.c index 00ec3a452..4a67b1f5b 100644 --- a/server/core/test/testadminusers.c +++ b/server/core/test/testadminusers.c @@ -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 */ /** diff --git a/server/core/test/testfilter.c b/server/core/test/testfilter.c index 55f7fadf3..bf97d7897 100644 --- a/server/core/test/testfilter.c +++ b/server/core/test/testfilter.c @@ -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 */ /** diff --git a/server/core/test/testhash.c b/server/core/test/testhash.c index 3fa9d7f0d..9fc2fb9cf 100644 --- a/server/core/test/testhash.c +++ b/server/core/test/testhash.c @@ -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 */ /** diff --git a/server/core/test/testspinlock.c b/server/core/test/testspinlock.c index ecdbdf108..f6ea810c8 100644 --- a/server/core/test/testspinlock.c +++ b/server/core/test/testspinlock.c @@ -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 */ /** diff --git a/server/core/thread.c b/server/core/thread.c index dded79507..84b0325ce 100644 --- a/server/core/thread.c +++ b/server/core/thread.c @@ -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 */ #include #include diff --git a/server/core/users.c b/server/core/users.c index 3b4dadf15..f77083454 100644 --- a/server/core/users.c +++ b/server/core/users.c @@ -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 */ #include #include diff --git a/server/core/utils.c b/server/core/utils.c index 1b8c6b5fe..f31731942 100644 --- a/server/core/utils.c +++ b/server/core/utils.c @@ -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 * */ diff --git a/server/include/adminusers.h b/server/include/adminusers.h index 07afa5390..6c44079ab 100644 --- a/server/include/adminusers.h +++ b/server/include/adminusers.h @@ -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 */ /** diff --git a/server/include/atomic.h b/server/include/atomic.h index 7fea0926e..07223319d 100644 --- a/server/include/atomic.h +++ b/server/include/atomic.h @@ -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 */ /** diff --git a/server/include/buffer.h b/server/include/buffer.h index eefdd431d..5b4490381 100644 --- a/server/include/buffer.h +++ b/server/include/buffer.h @@ -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 */ /** @@ -47,6 +47,7 @@ #include #include #include +#include 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 /*< diff --git a/server/include/config.h b/server/include/config.h index 659fb6378..13e515d9e 100644 --- a/server/include/config.h +++ b/server/include/config.h @@ -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 */ #include diff --git a/server/include/dbusers.h b/server/include/dbusers.h index 3b0afe50b..511beefd8 100644 --- a/server/include/dbusers.h +++ b/server/include/dbusers.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 */ #include diff --git a/server/include/dcb.h b/server/include/dcb.h index 72686b7b7..e6604a758 100644 --- a/server/include/dcb.h +++ b/server/include/dcb.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 */ #include #include diff --git a/server/include/filter.h b/server/include/filter.h index 3076587e6..ad0b9a21a 100644 --- a/server/include/filter.h +++ b/server/include/filter.h @@ -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 */ /** diff --git a/server/include/gwbitmask.h b/server/include/gwbitmask.h index 6b3b6b622..5e987d53c 100644 --- a/server/include/gwbitmask.h +++ b/server/include/gwbitmask.h @@ -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 */ #include diff --git a/server/include/hashtable.h b/server/include/hashtable.h index 175bd5d32..78b6b4032 100644 --- a/server/include/hashtable.h +++ b/server/include/hashtable.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 */ /** diff --git a/server/include/hint.h b/server/include/hint.h index 03c319142..4cc687731 100644 --- a/server/include/hint.h +++ b/server/include/hint.h @@ -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 */ /** diff --git a/server/include/housekeeper.h b/server/include/housekeeper.h index 35e76e80d..14523747d 100644 --- a/server/include/housekeeper.h +++ b/server/include/housekeeper.h @@ -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 diff --git a/server/include/maxscale.h b/server/include/maxscale.h index 4fb5dd75f..521c42dd9 100644 --- a/server/include/maxscale.h +++ b/server/include/maxscale.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 */ /** diff --git a/server/include/modinfo.h b/server/include/modinfo.h index bc4107b39..759cea0fb 100644 --- a/server/include/modinfo.h +++ b/server/include/modinfo.h @@ -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 */ /** diff --git a/server/include/modules.h b/server/include/modules.h index 199e3a24b..abdb5725a 100644 --- a/server/include/modules.h +++ b/server/include/modules.h @@ -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 */ #include #include diff --git a/server/include/modutil.h b/server/include/modutil.h index a0624752a..593e1cc61 100644 --- a/server/include/modutil.h +++ b/server/include/modutil.h @@ -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 */ /** diff --git a/server/include/monitor.h b/server/include/monitor.h index 04337d761..7fb22eb9a 100644 --- a/server/include/monitor.h +++ b/server/include/monitor.h @@ -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 */ #include #include diff --git a/server/include/poll.h b/server/include/poll.h index 6524f1bbb..31ff02e50 100644 --- a/server/include/poll.h +++ b/server/include/poll.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 */ #include #include diff --git a/server/include/rdtsc.h b/server/include/rdtsc.h index 50a752f31..b221417b7 100644 --- a/server/include/rdtsc.h +++ b/server/include/rdtsc.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 */ /** diff --git a/server/include/router.h b/server/include/router.h index 6c29fe1bf..92bdeeda2 100644 --- a/server/include/router.h +++ b/server/include/router.h @@ -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 */ /** diff --git a/server/include/secrets.h b/server/include/secrets.h index 0325d75ae..b37bde164 100644 --- a/server/include/secrets.h +++ b/server/include/secrets.h @@ -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 */ /** diff --git a/server/include/server.h b/server/include/server.h index f6d146ccd..34ce7f8b9 100644 --- a/server/include/server.h +++ b/server/include/server.h @@ -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 */ #include diff --git a/server/include/service.h b/server/include/service.h index 139a08056..b5a4c8acb 100644 --- a/server/include/service.h +++ b/server/include/service.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 */ #include diff --git a/server/include/session.h b/server/include/session.h index cbd43fe40..e12d48618 100644 --- a/server/include/session.h +++ b/server/include/session.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 */ /** diff --git a/server/include/spinlock.h b/server/include/spinlock.h index e5f938815..bbab314f6 100644 --- a/server/include/spinlock.h +++ b/server/include/spinlock.h @@ -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 */ /** diff --git a/server/include/thread.h b/server/include/thread.h index e3ea6f0dc..9cc3eee88 100644 --- a/server/include/thread.h +++ b/server/include/thread.h @@ -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 */ #include diff --git a/server/include/users.h b/server/include/users.h index ffa091e3b..c86813e31 100644 --- a/server/include/users.h +++ b/server/include/users.h @@ -1,7 +1,7 @@ #ifndef _USERS_H #define _USERS_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 */ #include #include diff --git a/server/modules/filter/hint/hintfilter.c b/server/modules/filter/hint/hintfilter.c index e54319d5d..73a392703 100644 --- a/server/modules/filter/hint/hintfilter.c +++ b/server/modules/filter/hint/hintfilter.c @@ -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 #include diff --git a/server/modules/filter/hint/hintparser.c b/server/modules/filter/hint/hintparser.c index 77d9c98ec..ac487fd11 100644 --- a/server/modules/filter/hint/hintparser.c +++ b/server/modules/filter/hint/hintparser.c @@ -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 #include diff --git a/server/modules/filter/mqfilter.c b/server/modules/filter/mqfilter.c index 9761fa777..f56425937 100644 --- a/server/modules/filter/mqfilter.c +++ b/server/modules/filter/mqfilter.c @@ -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 */ /** diff --git a/server/modules/filter/qlafilter.c b/server/modules/filter/qlafilter.c index b3accfbf8..d44660eae 100644 --- a/server/modules/filter/qlafilter.c +++ b/server/modules/filter/qlafilter.c @@ -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 */ /** diff --git a/server/modules/filter/regexfilter.c b/server/modules/filter/regexfilter.c index 79cf70c09..f5d579a4a 100644 --- a/server/modules/filter/regexfilter.c +++ b/server/modules/filter/regexfilter.c @@ -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 #include diff --git a/server/modules/filter/tee.c b/server/modules/filter/tee.c index 2d164ad42..0694d80ee 100644 --- a/server/modules/filter/tee.c +++ b/server/modules/filter/tee.c @@ -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 */ /** diff --git a/server/modules/filter/testfilter.c b/server/modules/filter/testfilter.c index 289ccf4a2..31d8872b1 100644 --- a/server/modules/filter/testfilter.c +++ b/server/modules/filter/testfilter.c @@ -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 #include diff --git a/server/modules/filter/topfilter.c b/server/modules/filter/topfilter.c index 9ca281ef1..d7ee07875 100644 --- a/server/modules/filter/topfilter.c +++ b/server/modules/filter/topfilter.c @@ -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 */ /** diff --git a/server/modules/include/blr.h b/server/modules/include/blr.h index 6e151d923..70be1f579 100644 --- a/server/modules/include/blr.h +++ b/server/modules/include/blr.h @@ -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 */ /** diff --git a/server/modules/include/debugcli.h b/server/modules/include/debugcli.h index b373cae6b..fa8a3df27 100644 --- a/server/modules/include/debugcli.h +++ b/server/modules/include/debugcli.h @@ -1,7 +1,7 @@ #ifndef _DEBUGCLI_H #define _DEBUGCLI_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 */ #include #include diff --git a/server/modules/include/httpd.h b/server/modules/include/httpd.h index 0d5e65604..ba1989ec4 100644 --- a/server/modules/include/httpd.h +++ b/server/modules/include/httpd.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 */ /* diff --git a/server/modules/include/maxscaled.h b/server/modules/include/maxscaled.h index fd4e6439e..01a3da227 100644 --- a/server/modules/include/maxscaled.h +++ b/server/modules/include/maxscaled.h @@ -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 */ /** diff --git a/server/modules/include/mysql_client_server_protocol.h b/server/modules/include/mysql_client_server_protocol.h index 18771aecd..3df4712d9 100644 --- a/server/modules/include/mysql_client_server_protocol.h +++ b/server/modules/include/mysql_client_server_protocol.h @@ -1,7 +1,7 @@ #ifndef _MYSQL_PROTOCOL_H #define _MYSQL_PROTOCOL_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 */ /* diff --git a/server/modules/include/mysqlhint.h b/server/modules/include/mysqlhint.h index 3e936b847..f61ebf366 100644 --- a/server/modules/include/mysqlhint.h +++ b/server/modules/include/mysqlhint.h @@ -1,7 +1,7 @@ #ifndef _MYSQLHINT_H #define _MYSQLHINT_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 */ /* diff --git a/server/modules/include/readconnection.h b/server/modules/include/readconnection.h index 589296302..d6468114d 100644 --- a/server/modules/include/readconnection.h +++ b/server/modules/include/readconnection.h @@ -1,7 +1,7 @@ #ifndef _READCONNECTION_H #define _READCONNECTION_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 */ /** diff --git a/server/modules/include/readwritesplit.h b/server/modules/include/readwritesplit.h index 482ecea27..6754efaa9 100644 --- a/server/modules/include/readwritesplit.h +++ b/server/modules/include/readwritesplit.h @@ -1,7 +1,7 @@ #ifndef _RWSPLITROUTER_H #define _RWSPLITROUTER_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 */ /** diff --git a/server/modules/include/telnetd.h b/server/modules/include/telnetd.h index 2c1bcf32a..ce95716c5 100644 --- a/server/modules/include/telnetd.h +++ b/server/modules/include/telnetd.h @@ -1,7 +1,7 @@ #ifndef _TELNETD_H #define _TELNETD_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 */ /** diff --git a/server/modules/monitor/galera_mon.c b/server/modules/monitor/galera_mon.c index bbde5ca49..162d91b30 100644 --- a/server/modules/monitor/galera_mon.c +++ b/server/modules/monitor/galera_mon.c @@ -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 */ /** diff --git a/server/modules/monitor/mysql_mon.c b/server/modules/monitor/mysql_mon.c index c4cea23ee..5abfdf68e 100644 --- a/server/modules/monitor/mysql_mon.c +++ b/server/modules/monitor/mysql_mon.c @@ -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 */ /** diff --git a/server/modules/monitor/mysqlmon.h b/server/modules/monitor/mysqlmon.h index eb2d37bcd..69ba160fd 100644 --- a/server/modules/monitor/mysqlmon.h +++ b/server/modules/monitor/mysqlmon.h @@ -1,7 +1,7 @@ #ifndef _MYSQLMON_H #define _MYSQLMON_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 */ #include #include diff --git a/server/modules/monitor/ndbcluster_mon.c b/server/modules/monitor/ndbcluster_mon.c index b35af4fe2..56b038246 100644 --- a/server/modules/monitor/ndbcluster_mon.c +++ b/server/modules/monitor/ndbcluster_mon.c @@ -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 */ /** diff --git a/server/modules/protocol/httpd.c b/server/modules/protocol/httpd.c index 7db1366ad..0715b5b94 100644 --- a/server/modules/protocol/httpd.c +++ b/server/modules/protocol/httpd.c @@ -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 */ /** diff --git a/server/modules/protocol/maxscaled.c b/server/modules/protocol/maxscaled.c index 268b33b52..ebd67636d 100644 --- a/server/modules/protocol/maxscaled.c +++ b/server/modules/protocol/maxscaled.c @@ -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 #include diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index 2772e8e7b..9865174a8 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -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 */ #include "mysql_client_server_protocol.h" diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 42958fc2d..a31c6473c 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -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 */ /** diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index b1bd5481d..89ffd890e 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -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 */ /* @@ -1653,9 +1653,11 @@ void protocol_archive_srv_command( s1 = &p->protocol_command; - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, - "Move command %s from fd %d to command history.", + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, + "%lu [protocol_archive_srv_command] Move command %s from fd %d " + "to command history.", + pthread_self(), STRPACKETTYPE(s1->scom_cmd), p->owner_dcb->fd))); @@ -1727,8 +1729,8 @@ void protocol_add_srv_command( p->protocol_command.scom_next = server_command_init(NULL, cmd); } - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, "Added command %s to fd %d.", STRPACKETTYPE(cmd), p->owner_dcb->fd))); @@ -1738,8 +1740,8 @@ void protocol_add_srv_command( while (c != NULL && c->scom_cmd != MYSQL_COM_UNDEFINED) { - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, "fd %d : %d %s", p->owner_dcb->fd, c->scom_cmd, diff --git a/server/modules/protocol/telnetd.c b/server/modules/protocol/telnetd.c index aeb6607c4..908ead8b5 100644 --- a/server/modules/protocol/telnetd.c +++ b/server/modules/protocol/telnetd.c @@ -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 */ #include #include diff --git a/server/modules/routing/GaleraHACRoute.c b/server/modules/routing/GaleraHACRoute.c index 33a9597cc..2c0773f2b 100644 --- a/server/modules/routing/GaleraHACRoute.c +++ b/server/modules/routing/GaleraHACRoute.c @@ -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 */ /** diff --git a/server/modules/routing/binlog/blr.c b/server/modules/routing/binlog/blr.c index d92f03c10..5f83eb5f0 100644 --- a/server/modules/routing/binlog/blr.c +++ b/server/modules/routing/binlog/blr.c @@ -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 */ /** diff --git a/server/modules/routing/binlog/blr_cache.c b/server/modules/routing/binlog/blr_cache.c index 5bc46f036..a7213aa8a 100644 --- a/server/modules/routing/binlog/blr_cache.c +++ b/server/modules/routing/binlog/blr_cache.c @@ -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 */ /** diff --git a/server/modules/routing/binlog/blr_file.c b/server/modules/routing/binlog/blr_file.c index 7a44033fe..74aacdc99 100644 --- a/server/modules/routing/binlog/blr_file.c +++ b/server/modules/routing/binlog/blr_file.c @@ -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 */ /** diff --git a/server/modules/routing/binlog/blr_master.c b/server/modules/routing/binlog/blr_master.c index ee14cec4c..684b80a0b 100644 --- a/server/modules/routing/binlog/blr_master.c +++ b/server/modules/routing/binlog/blr_master.c @@ -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 */ /** diff --git a/server/modules/routing/binlog/blr_slave.c b/server/modules/routing/binlog/blr_slave.c index 5d7a16475..878c5e157 100644 --- a/server/modules/routing/binlog/blr_slave.c +++ b/server/modules/routing/binlog/blr_slave.c @@ -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 */ /** diff --git a/server/modules/routing/cli.c b/server/modules/routing/cli.c index ac525f695..eb581f4c7 100644 --- a/server/modules/routing/cli.c +++ b/server/modules/routing/cli.c @@ -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 */ /** diff --git a/server/modules/routing/debugcli.c b/server/modules/routing/debugcli.c index aa0e82ef8..66f5d8f1f 100644 --- a/server/modules/routing/debugcli.c +++ b/server/modules/routing/debugcli.c @@ -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 */ /** diff --git a/server/modules/routing/debugcmd.c b/server/modules/routing/debugcmd.c index f238e16e6..070c37ef3 100644 --- a/server/modules/routing/debugcmd.c +++ b/server/modules/routing/debugcmd.c @@ -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 */ /** diff --git a/server/modules/routing/readconnroute.c b/server/modules/routing/readconnroute.c index 68e2dfcef..bc2d5633a 100644 --- a/server/modules/routing/readconnroute.c +++ b/server/modules/routing/readconnroute.c @@ -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 */ /** diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index c602d8913..e08386089 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -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 */ #include #include @@ -1282,9 +1282,10 @@ static route_target_t get_route_target ( if (hint->type == HINT_ROUTE_TO_MASTER) { target = TARGET_MASTER; /*< override */ - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, - "Hint: route to master."))); + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, + "%lu [get_route_target] Hint: route to master.", + pthread_self()))); break; } else if (hint->type == HINT_ROUTE_TO_NAMED_SERVER) @@ -1294,9 +1295,11 @@ static route_target_t get_route_target ( * found, the oroginal target is chosen. */ target |= TARGET_NAMED_SERVER; - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, - "Hint: route to named server : "))); + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, + "%lu [get_route_target] Hint: route to " + "named server : ", + pthread_self()))); } else if (hint->type == HINT_ROUTE_TO_UPTODATE_SERVER) { @@ -1334,9 +1337,11 @@ static route_target_t get_route_target ( else if (hint->type == HINT_ROUTE_TO_SLAVE) { target = TARGET_SLAVE; - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, - "Hint: route to slave."))); + LOGIF(LD, (skygw_log_write( + LOGFILE_DEBUG, + "%lu [get_route_target] Hint: route to " + "slave.", + pthread_self()))); } hint = hint->next; } /*< while (hint != NULL) */ @@ -1653,7 +1658,6 @@ static int routeQuery( GWBUF* querybuf) { skygw_query_type_t qtype = QUERY_TYPE_UNKNOWN; - char* querystr = NULL; mysql_server_cmd_t packet_type; uint8_t* packet; int ret = 0; @@ -1793,8 +1797,33 @@ static int routeQuery( { router_cli_ses->rses_autocommit_enabled = true; router_cli_ses->rses_transaction_active = false; - } + } + if (LOG_IS_ENABLED(LOGFILE_TRACE)) + { + uint8_t* packet = GWBUF_DATA(querybuf); + unsigned char ptype = packet[4]; + size_t len = MIN(GWBUF_LENGTH(querybuf), + MYSQL_GET_PACKET_LEN((unsigned char *)querybuf->start)-1); + char* data = (char*)&packet[5]; + char* contentstr = strndup(data, len); + char* qtypestr = skygw_get_qtype_str(qtype); + + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "> Autocommit: %s, trx is %s, cmd: %s, type: %s, " + "stmt: %s%s %s", + (router_cli_ses->rses_autocommit_enabled ? "[enabled]" : "[disabled]"), + (router_cli_ses->rses_transaction_active ? "[open]" : "[not open]"), + STRPACKETTYPE(ptype), + (qtypestr==NULL ? "N/A" : qtypestr), + contentstr, + (querybuf->hint == NULL ? "" : ", Hint:"), + (querybuf->hint == NULL ? "" : STRHINTTYPE(querybuf->hint->type))))); + + free(contentstr); + free(qtypestr); + } /** * Find out where to route the query. Result may not be clear; it is * possible to have a hint for routing to a named server which can @@ -1911,6 +1940,27 @@ static int routeQuery( btype, named_server, rlag_max); + if (!succp) + { + if (TARGET_IS_NAMED_SERVER(route_target)) + { + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "Was supposed to route to named server " + "%s but couldn't find the server in a " + "suitable state.", + named_server))); + } + else if (TARGET_IS_RLAG_MAX(route_target)) + { + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "Was supposed to route to server with " + "replication lag at most %d but couldn't " + "find such a slave.", + rlag_max))); + } + } } if (!succp && TARGET_IS_SLAVE(route_target)) @@ -1930,9 +1980,16 @@ static int routeQuery( NULL, rlag_max); if (succp) - { + { atomic_add(&inst->stats.n_slave, 1); } + else + { + LOGIF(LT, (skygw_log_write(LOGFILE_TRACE, + "Was supposed to route to slave" + "but finding suitable one " + "failed."))); + } } if (!succp && TARGET_IS_MASTER(route_target)) @@ -1944,6 +2001,16 @@ static int routeQuery( BE_MASTER, NULL, MAX_RLAG_UNDEFINED); + if (!succp) + { + LOGIF(LT, (skygw_log_write(LOGFILE_TRACE, + "Was supposed to " + "route to master " + "but couldn't find " + "master in a " + "suitable state " + "failed."))); + } } else { @@ -1951,9 +2018,7 @@ static int routeQuery( } atomic_add(&inst->stats.n_master, 1); target_dcb = master_dcb; - } - ss_dassert(succp); - + } if (succp) /*< Have DCB of the target backend */ { @@ -1962,6 +2027,14 @@ static int routeQuery( bref = get_bref_from_dcb(router_cli_ses, target_dcb); scur = &bref->bref_sescmd_cur; + + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "Route query to %s\t%s:%d <", + (SERVER_IS_MASTER(bref->bref_backend->backend_server) ? + "master" : "slave"), + bref->bref_backend->backend_server->name, + bref->bref_backend->backend_server->port))); /** * Store current stmt if execution of previous session command * haven't completed yet. Note that according to MySQL protocol @@ -1993,8 +2066,7 @@ static int routeQuery( { LOGIF(LE, (skygw_log_write_flush( LOGFILE_ERROR, - "Error : Routing query \"%s\" failed.", - querystr))); + "Error : Routing query failed."))); } } rses_end_locked_router_action(router_cli_ses); @@ -3441,12 +3513,6 @@ static bool execute_sescmd_in_backend( sescmd_cursor_clone_querybuf(scur)); break; } - LOGIF(LT, (skygw_log_write_flush( - LOGFILE_TRACE, - "%lu [execute_sescmd_in_backend] Routed %s cmd %p.", - pthread_self(), - STRPACKETTYPE(scur->scmd_cur_cmd->my_sescmd_packet_type), - scur->scmd_cur_cmd))); if (rc == 1) { @@ -3573,8 +3639,8 @@ static void tracelog_routed_query( querystr = (char *)malloc(len); memcpy(querystr, startpos, len-1); querystr[len-1] = '\0'; - LOGIF(LT, (skygw_log_write_flush( - LOGFILE_TRACE, + LOGIF(LD, (skygw_log_write_flush( + LOGFILE_DEBUG, "%lu [%s] %d bytes long buf, \"%s\" -> %s:%d %s dcb %p", pthread_self(), funcname, @@ -3595,8 +3661,8 @@ static void tracelog_routed_query( querystr = (char *)malloc(len); memcpy(querystr, startpos, len-1); querystr[len-1] = '\0'; - LOGIF(LT, (skygw_log_write_flush( - LOGFILE_TRACE, + LOGIF(LD, (skygw_log_write_flush( + LOGFILE_DEBUG, "%lu [%s] %d bytes long buf, \"%s\" -> %s:%d %s dcb %p", pthread_self(), funcname, @@ -3663,10 +3729,7 @@ static bool route_session_write( LOGIF(LT, (skygw_log_write( LOGFILE_TRACE, - "Session write, query type\t%s, packet type %s, " - "routing to all servers.", - STRQTYPE(qtype), - STRPACKETTYPE(packet_type)))); + "Session write, routing to all servers."))); backend_ref = router_cli_ses->rses_backend_ref; @@ -3693,7 +3756,19 @@ static bool route_session_write( for (i=0; irses_nbackends; i++) { - DCB* dcb = backend_ref[i].bref_dcb; + DCB* dcb = backend_ref[i].bref_dcb; + + if (LOG_IS_ENABLED(LOGFILE_TRACE)) + { + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "Route query to %s\t%s:%d%s", + (SERVER_IS_MASTER(backend_ref[i].bref_backend->backend_server) ? + "master" : "slave"), + backend_ref[i].bref_backend->backend_server->name, + backend_ref[i].bref_backend->backend_server->port, + (i+1==router_cli_ses->rses_nbackends ? " <" : "")))); + } if (BREF_IS_IN_USE((&backend_ref[i]))) { @@ -3703,14 +3778,7 @@ static bool route_session_write( { succp = false; } - else if (LOG_IS_ENABLED(LOGFILE_TRACE)) - { - LOGIF(LT, (skygw_log_write( - LOGFILE_TRACE, - "Wrote to %s:%d", - backend_ref[i].bref_backend->backend_server->name, - backend_ref[i].bref_backend->backend_server->port))); - } + } } rses_end_locked_router_action(router_cli_ses); @@ -3740,6 +3808,18 @@ static bool route_session_write( { sescmd_cursor_t* scur; + if (LOG_IS_ENABLED(LOGFILE_TRACE)) + { + LOGIF(LT, (skygw_log_write( + LOGFILE_TRACE, + "Route query to %s\t%s:%d%s", + (SERVER_IS_MASTER(backend_ref[i].bref_backend->backend_server) ? + "master" : "slave"), + backend_ref[i].bref_backend->backend_server->name, + backend_ref[i].bref_backend->backend_server->port, + (i+1==router_cli_ses->rses_nbackends ? " <" : "")))); + } + scur = backend_ref_get_sescmd_cursor(&backend_ref[i]); /** @@ -3747,7 +3827,7 @@ static bool route_session_write( */ bref_set_state(get_bref_from_dcb(router_cli_ses, backend_ref[i].bref_dcb), - BREF_WAITING_RESULT); + BREF_WAITING_RESULT); /** * Start execution if cursor is not already executing. * Otherwise, cursor will execute pending commands diff --git a/server/modules/routing/testroute.c b/server/modules/routing/testroute.c index ce2ce2ca9..ad6b2ca96 100644 --- a/server/modules/routing/testroute.c +++ b/server/modules/routing/testroute.c @@ -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 */ #include #include diff --git a/server/modules/routing/webserver.c b/server/modules/routing/webserver.c index 28102dfd4..af00a4e7b 100644 --- a/server/modules/routing/webserver.c +++ b/server/modules/routing/webserver.c @@ -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 #include diff --git a/table_replication_consistency/table_replication_consistency.h b/table_replication_consistency/table_replication_consistency.h index 92a423818..b7a79af27 100644 --- a/table_replication_consistency/table_replication_consistency.h +++ b/table_replication_consistency/table_replication_consistency.h @@ -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. diff --git a/table_replication_consistency/table_replication_listener.h b/table_replication_consistency/table_replication_listener.h index c207a37d0..1fd43dea9 100644 --- a/table_replication_consistency/table_replication_listener.h +++ b/table_replication_consistency/table_replication_listener.h @@ -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. diff --git a/table_replication_consistency/table_replication_metadata.h b/table_replication_consistency/table_replication_metadata.h index 78436714f..36f2979ab 100644 --- a/table_replication_consistency/table_replication_metadata.h +++ b/table_replication_consistency/table_replication_metadata.h @@ -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. diff --git a/table_replication_consistency/table_replication_parser.h b/table_replication_consistency/table_replication_parser.h index 0b13a6438..8baa624d6 100644 --- a/table_replication_consistency/table_replication_parser.h +++ b/table_replication_consistency/table_replication_parser.h @@ -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. diff --git a/utils/skygw_debug.h b/utils/skygw_debug.h index acc59bc85..7c070cd6f 100644 --- a/utils/skygw_debug.h +++ b/utils/skygw_debug.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 */ #include @@ -129,13 +129,29 @@ typedef enum skygw_chk_t { # define STRBOOL(b) ((b) ? "true" : "false") -# define STRQTYPE(t) ((t) == QUERY_TYPE_WRITE ? "QUERY_TYPE_WRITE" : \ - ((t) == QUERY_TYPE_READ ? "QUERY_TYPE_READ" : \ - ((t) == QUERY_TYPE_SESSION_WRITE ? "QUERY_TYPE_SESSION_WRITE" : \ - ((t) == QUERY_TYPE_UNKNOWN ? "QUERY_TYPE_UNKNOWN" : \ - ((t) == QUERY_TYPE_LOCAL_READ ? "QUERY_TYPE_LOCAL_READ" : \ - ((t) == QUERY_TYPE_EXEC_STMT ? "QUERY_TYPE_EXEC_STMT" : \ - "Unknown query type")))))) +# define STRQTYPE(t) ((t) == QUERY_TYPE_WRITE ? "QUERY_TYPE_WRITE" : \ + ((t) == QUERY_TYPE_READ ? "QUERY_TYPE_READ" : \ + ((t) == QUERY_TYPE_SESSION_WRITE ? "QUERY_TYPE_SESSION_WRITE" : \ + ((t) == QUERY_TYPE_UNKNOWN ? "QUERY_TYPE_UNKNOWN" : \ + ((t) == QUERY_TYPE_LOCAL_READ ? "QUERY_TYPE_LOCAL_READ" : \ + ((t) == QUERY_TYPE_MASTER_READ ? "QUERY_TYPE_MASTER_READ" : \ + ((t) == QUERY_TYPE_USERVAR_READ ? "QUERY_TYPE_USERVAR_READ" : \ + ((t) == QUERY_TYPE_SYSVAR_READ ? "QUERY_TYPE_SYSVAR_READ" : \ + ((t) == QUERY_TYPE_GSYSVAR_READ ? "QUERY_TYPE_GSYSVAR_READ" : \ + ((t) == QUERY_TYPE_GSYSVAR_WRITE ? "QUERY_TYPE_GSYSVAR_WRITE" : \ + ((t) == QUERY_TYPE_BEGIN_TRX ? "QUERY_TYPE_BEGIN_TRX" : \ + ((t) == QUERY_TYPE_ENABLE_AUTOCOMMIT ? "QUERY_TYPE_ENABLE_AUTOCOMMIT" : \ + ((t) == QUERY_TYPE_DISABLE_AUTOCOMMIT ? "QUERY_TYPE_DISABLE_AUTOCOMMIT" : \ + ((t) == QUERY_TYPE_ROLLBACK ? "QUERY_TYPE_ROLLBACK" : \ + ((t) == QUERY_TYPE_COMMIT ? "QUERY_TYPE_COMMIT" : \ + ((t) == QUERY_TYPE_PREPARE_NAMED_STMT ? "QUERY_TYPE_PREPARE_NAMED_STMT" : \ + ((t) == QUERY_TYPE_PREPARE_STMT ? "QUERY_TYPE_PREPARE_STMT" : \ + ((t) == QUERY_TYPE_EXEC_STMT ? "QUERY_TYPE_EXEC_STMT" : \ + ((t) == QUERY_TYPE_CREATE_TMP_TABLE ? "QUERY_TYPE_CREATE_TMP_TABLE" : \ + ((t) == QUERY_TYPE_READ_TMP_TABLE ? "QUERY_TYPE_READ_TMP_TABLE" : \ + ((t) == QUERY_TYPE_SHOW_DATABASES ? "QUERY_TYPE_SHOW_DATABASES" : \ + ((t) == QUERY_TYPE_SHOW_TABLES ? "QUERY_TYPE_SHOW_TABLES" : \ + "Unknown query type")))))))))))))))))))))) #define STRLOGID(i) ((i) == LOGFILE_TRACE ? "LOGFILE_TRACE" : \ ((i) == LOGFILE_MESSAGE ? "LOGFILE_MESSAGE" : \ @@ -247,6 +263,14 @@ typedef enum skygw_chk_t { (SERVER_IS_RELAY_SERVER(s) ? "RUNNING RELAY" : \ (SERVER_IS_RUNNING(s) ? "RUNNING (only)" : "NO STATUS"))))))) +#define STRHINTTYPE(t) (t == HINT_ROUTE_TO_MASTER ? "HINT_ROUTE_TO_MASTER" : \ + ((t) == HINT_ROUTE_TO_SLAVE ? "HINT_ROUTE_TO_SLAVE" : \ + ((t) == HINT_ROUTE_TO_NAMED_SERVER ? "HINT_ROUTE_TO_NAMED_SERVER" : \ + ((t) == HINT_ROUTE_TO_UPTODATE_SERVER ? "HINT_ROUTE_TO_UPTODATE_SERVER" : \ + ((t) == HINT_ROUTE_TO_ALL ? "HINT_ROUTE_TO_ALL" : \ + ((t) == HINT_PARAMETER ? "HINT_PARAMETER" : "UNKNOWN HINT TYPE")))))) + + #define CHK_MLIST(l) { \ ss_info_dassert((l->mlist_chk_top == CHK_NUM_MLIST && \ l->mlist_chk_tail == CHK_NUM_MLIST), \ diff --git a/utils/skygw_types.h b/utils/skygw_types.h index a82db80ab..9d586e042 100644 --- a/utils/skygw_types.h +++ b/utils/skygw_types.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 */ #if !defined(SKYGW_TYPES_H) #define SKYGW_TYPES_H diff --git a/utils/skygw_utils.cc b/utils/skygw_utils.cc index 4845c73a2..30b7ae8a9 100644 --- a/utils/skygw_utils.cc +++ b/utils/skygw_utils.cc @@ -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 */ @@ -1955,7 +1955,19 @@ retblock: return newstr; } - +/** + * Calculate the number of decimal numbers from a size_t value. + * + * @param value value + * + * @return number of decimal numbers of which the value consists of + * value==123 returns 3, for example. + */ +size_t get_decimal_len( + size_t value) +{ + return value > 0 ? (size_t) log10 ((double) value) + 1 : 1; +} diff --git a/utils/skygw_utils.h b/utils/skygw_utils.h index a54859392..80793fbca 100644 --- a/utils/skygw_utils.h +++ b/utils/skygw_utils.h @@ -192,6 +192,7 @@ int skygw_rwlock_unlock(skygw_rwlock_t* rwlock); int skygw_rwlock_init(skygw_rwlock_t** rwlock); int atomic_add(int *variable, int value); +size_t get_decimal_len(size_t s); EXTERN_C_BLOCK_BEGIN