server/modules/filter/Makefile: Added path to libmysqld (-L<path>) so that linker finds it at compile time.
server/test/MaxScale_template.cnf: added write_ses_variables_to_all=Yes and read_ses_variables_from_slaves=Yes so that tests included in testall target succeed (at server/modules/routing/readwritesplit/test). Added hint filter to 'normal' rwsplit service.
server/core/config.c: Removed unused if..else block from config_get_valint. Changed it also to return value which indicates whether the operation succeed. Added config_get_valbool similar to config_get_valint.
service.c:Added typelib-like struct and array of valid boolean values. Fixed parameter type test in service_set_param_value. Completed boolean type parameter handling.
hintparser.c:Fixed error message for non-maxscale hints.
readwritesplit.c:Added loading of configuration parameters from service to instance and from instance to each new session. Fixed routing condition in get_route_target. Modified get_route_target so that it takes also rw_read_sesvars_from_slaves and rw_write_sesvars_to_all as parameters.
skygw_types.h: added array size counting macro.
- Monitor automatically builds the replication topology tree if at least Slave_IO thread is running in slaves and the master server will be available.
- If the replication is stopped or configuration removed the previos master server may be still available with detect_stale_master=1
The SERVER_STALE_STATUS bit is added to the server->status field
Monitor diagnostic routine print all new status descriptions
Includes imprvements to hints processing. If hint can't be followed query is routed possibly to slave, and eventually to master if other attempts fail.
Fix for broken replication has been added to mysql_monitor.
Both Slave_IO and Slave_SQL threads must be running in order to assign
the SERVER_SLAVE status but If only Slave_IO is running let’s assign
the master_id to current server and continue building the replication
tree; if no slaves at all the master will be still available.
The “detect_stale_master” option has been added, its default is 0.
If set to 1 the monitor will keep the last detected master even if the
replication setup is completely not working, i.e. both Slave_IO and
Slave_SQL threads are not running: this applies only to the server that
was master before.
After monitor or MaxScale are restarted and the replication is still
stopped or not configured there will be no master because it’s not
possible to compute the replication topology tree.
query_classifier.h: added QUERY_TYPE_CREATE_TMP_TABLE and QUERY_TYPE_READ_TMP_TABLE for use of temporary table support.
hashtable.c:Added variant of hashtable which is 'flat', that is, stored to existing memory instead of allocating memory as a part of the call. Existing function declarations don't change but added hashtable_alloc_flat for the purpose. Both hashtable_alloc and hashtable_alloc_flat now call the real allocation function, hashtable_alloc_real. hashtable_free only frees memory which is allocated in hashtable_alloc_real.
hashtable.h: added a flag to HASHTABLE struct to indicate whether hashtable owns its memory or not.
readwritesplit.h: Added RSES_PROP_TYPE_TMPTABLES property type to be used for keeping the hashtable for tablenames.
readwritesplit.c: Added comments about temporary table support implementation.
query_classifier.h: added parsing information structure to query classifier away from buffer.h.
buffer.c:introduced a buffer object which includes object pointer and a clean-up call-back function. Buffer objects form a list which is cleaned up by the last referrer of the buffer, as a part of gwbuf_free. Buffer object list is protected by a spinlock gwbuf_lock.
Also added identifier type, bufobj_id_t which is enumerated type and currently includes one value only, GWBUF_PARSING_INFO. Added also a bitfield for information about the buffer. It currently has one type only, GWBUF_INFO_PARSED indicating that buffer content is parsed and there is buffer object of type GWBUF_PARSING_INFO.
skygw_utils.cc:replace_literal:changed regexec matching to case insensitive because user-defined literals are sometimes converted to upper-case ones.
query_classifier.cc: Now query can be parsed outside query_classifier_get_type by calling function parse_query. It creates parsing_info_t struct which is then added to the GWBUF which also includes the query. Parsing information follows the buffered query and it is freed at the same time with query buffer, in gwbuf_free.
buffer.c: additions of parsing information to gwbuf struct.
modutil.c: added function which returns query from GWBUF in plain text string.
readwritesplit.c:routeQuery now only calls query_classifier_get_type to get the query type instead of extracting plain text query from the GWBUF buffer.
* ignore typical backup files created by common editors
* move general ignore rules like "*.o" or "depend.mk" to top level gitignore
* ignore executables and test directories in target dir gitignore
as these are local and there's no general catch-all pattern for them
mysql_common.c:gw_MySQL_get_next_packet didn't handle case where an insert command followed by alter table in the same read buffer. It shouldn't been possible without multi-statement being set.
Fix to #473, http://bugs.skysql.com/show_bug.cgi?id=473
Several memory issues. Read the code.
In general one-off hint is only added to gwbuf and freed in gwbuf_free. Stacked hint is copied to stack and to gwbuf. gwbuf is freed after routing but stacked hint is freed either in stop or when session is closed. All this applies to named hint as well except that in addition, it has one more copy in named hint struct which is emptied when session is closed.