7259 Commits

Author SHA1 Message Date
Johan Wikman
53dfa818e3 MXS-1196: Make MODE_ORACLE optional
Turned on by providing an argument when loading the query classifier.
2017-06-28 21:33:04 +02:00
Johan Wikman
cd6e9fa44b MXS-1196: Extend flags of compare
Sometimes you want to know whether the parsing using different
queryclassifiers differs, irrespective of whether they agree
upon the outcome or not.

With -R it is now possible to cause a difference in the return
value of qc_parse() to be printed.
2017-06-28 21:33:04 +02:00
Johan Wikman
62a64cba31 MXS-1196: Report user var read when prepared statements 2017-06-28 21:33:04 +02:00
Johan Wikman
da0900786a MXS-1196: Accept UNIQUE as synonym for DISTINCT 2017-06-28 21:33:04 +02:00
Johan Wikman
518f7e81ca MXS-1196: Handle preparable statements when db is 10.3 2017-06-28 21:33:04 +02:00
Johan Wikman
298d5642f6 MXS-1196: Accept top-level variable assignments
In Oracle you can write

    set autocommit=1
or
    autocommit:=1
2017-06-28 21:33:04 +02:00
Johan Wikman
9ae3ab522d MXS-1196: Turn on Oracle compatibility 2017-06-28 21:33:04 +02:00
Johan Wikman
13fad9933c MXS-1196: Make qc_mysqlembedded 10.3 compatible.
- Strings no longer null-terminated but pointer + length.
- Preparable statements NOT yet handled.
2017-06-28 21:33:04 +02:00
Johan Wikman
b191e6ecda MXS-1196: qc_mysqlembedded will not always claim a stmt was parsed
When developing the oracle related parser extensions, it makes
things simpler if also qc_mysqlembedded properly reports when
it cannot parse a statement.

Note, although this change is marked for 2.1, it will not be
merged into the first 2.1 GA release.
2017-06-28 21:33:04 +02:00
Johan Wikman
43ab0f036e MXS-1196: Do not parse EXPLAIN statements
EXPLAIN statements are no longer parsed completely as doing so makes
it hard to modify the grammar for the needs or Oracle SQL.

Consequently, for an EXPLAIN statement you now bascially only get the
type and the operation (the newly added QUERY_OP_EXPLAIN and QUERY_OP_SHOW).
The other information is not interesting and is related to
information_schema and similar tables.
2017-06-28 21:33:04 +02:00
Johan Wikman
951c96383c MXS-1196: Sort operation constants 2017-06-28 21:33:04 +02:00
Johan Wikman
49897a22ad MXS-1196: Make operation constants sequential
The operations do not form a bitmask. Consequently their
values can be sequential.
2017-06-28 21:33:04 +02:00
Johan Wikman
92d9356968 Update release notes, change log and upgrading 2017-06-28 12:13:10 +02:00
Markus Mäkelä
8e3d4d9dd2 MXS-1298: Fix typo in avro error message
Changed 'numer' to 'number'.
2017-06-28 11:52:50 +03:00
Markus Mäkelä
2bc5188dae MXS-1304: Don't null-terminate buffers in gw_str_xor
The gw_str_xor function is used only for doing XOR operations on binary
buffers.
2017-06-28 11:36:17 +03:00
Markus Mäkelä
40b1739249 MXS-1299: Fix CREATE TABLE t1 LIKE t2 processing
The creation of tables from other tables was not working even though the
information was available inside the avrorouter.
2017-06-28 11:25:57 +03:00
Markus Mäkelä
84925b3f10 Merge branch '2.0' into 2.1 2017-06-28 10:59:06 +03:00
Markus Mäkelä
9b0631f30b MXS-1289: Fix crash on TABLE_MAP with ID > 1024
The active table map was acquired with a modulo operation on the size of
the array instead of the number of elements.
2017-06-28 08:49:57 +03:00
Markus Mäkelä
7bb76f52e5 Disable ssl_load_galera test
The normal replication version of the test is disabled so there is no
reason to have the Galera version enabled.
2017-06-28 08:10:49 +03:00
Markus Mäkelä
dc849d1c0f MXS-1291: Attempt to bind on 0.0.0.0 when :: fails
If binding on the IPv6 all interfaces address fails, MaxScale will attempt
to bind on the IPv4 address.
2017-06-27 21:27:20 +03:00
Markus Mäkelä
1df8fda93f Merge branch '2.0' into 2.1 2017-06-27 20:52:58 +03:00
Markus Mäkelä
cd09e65714 MXS-1296: Always use a case-insensitive parser
The two cases where the case-sensitive parser functions were used don't
appear to hold any special meaning. The case-insensitive function should
be used as it implements a superset of functionality compared to the
case-sensitive version.
2017-06-26 21:05:42 +03:00
Timofey Turenko
9737ffe092 Fix masking tests
The masking filter now has a default fill value, so that if a
provided value does not match, then "X" is used.

The tests were modified to use "Y" as an explicitly provided
fill value (to distinguish from the default "X") and the results
were the default fill value would kick in were modified accordingly.
2017-06-26 12:22:39 +02:00
Johan Wikman
90ab2bc106 Update 2.1 version 2017-06-26 12:09:18 +03:00
Johan Wikman
500f79a150 MXS-1296: Test that lc statements are parsed correctly
The transaction boundary parser - TrxBoundaryParser - must handle
upper and lowercase statements correctly.
2017-06-26 10:57:27 +03:00
Markus Mäkelä
bd1da82c96 Fix cdc_schema.py
There's no need to use Python 3 for the script and using it introduces
problems due to the poor availability of MySQL Connector/Python for
Python3.

ENUM, SET and DECIMAL values should have a length of -1 as the length is
meaningless for these types.
2017-06-23 11:10:41 +03:00
Markus Mäkelä
b29cda10a2 Merge branch '2.0' into 2.1 2017-06-20 10:45:02 +03:00
Markus Mäkelä
469ed1de1b MXS-1271: Remove unnecessary encode call
The trailing newline can be removed from the string without encoding it
first.
2017-06-20 10:40:22 +03:00
Esa Korhonen
b7a6e4b7b0 Fix HintParser line break detection
The HintParser wrongly ignored linebreaks, causing parsing faults
e.g. parsing too far or accepting invalid comments. Now, the parser
detects a line break and terminates comments unless they started with
'/*'. Also, fixed a memory leak when parsing parameter-value-combinations.
2017-06-19 10:49:47 +03:00
Markus Mäkelä
567fbce735 MXS-1287: Assign Slave status for all external slaves
Whenever a server which is a slave of an external master is detected, it
will be assigned the slave status. This will allow the status to be used
the way it was intended to be used.
2017-06-16 22:26:33 +03:00
Esa Korhonen
7e59254454 Change modutil_get_SQL() to modutil_extract_SQL() + length limit
The modutil_get_SQL()-function allocates storage, while
modutil_extract_SQL() does not. The strings given by the latter
are not 0-terminated so require a length limit when matched using
regexec().

This commit changes the used function in those cases where the
sql-string is not modified nor is the pointer saved for later use.
2017-06-16 10:07:27 +03:00
Markus Mäkelä
ce8d712b46 Add version to VERSION.cmake filename
The VERSION.cmake file now includes the major and minor versions in the
filename. This will prevent merge conflicts when merging changes upstream.
2017-06-15 10:13:19 +03:00
Johan Wikman
49556d07b1 Merge branch '2.0' into 2.1 2017-06-15 10:03:49 +03:00
Johan Wikman
673eb3d500 Update 2.0.6 version number 2017-06-15 08:48:18 +03:00
Markus Mäkelä
4c9fc1a39e Merge branch '2.0' into 2.1 2017-06-14 13:36:40 +03:00
Johan Wikman
9285283ac5 Update release date of maxscale-2.0.6 2017-06-14 11:05:41 +03:00
Timofey Turenko
9889889221 remove gnutls and gcrypt from install_build_deps.sh 2017-06-13 10:14:43 +03:00
Markus Mäkelä
6381dd0703 MXS-1281: Add password to grant example
The CREATE USER statement in the example document now also has a
password. This should make it more obvious that the same credentials must
work from all hosts.
2017-06-12 18:24:05 +03:00
Johan Wikman
2c8b666ac6 Add MaxScale 2.0.6 release notes 2017-06-07 14:22:50 +03:00
Timofey Turenko
9c0bb4ae29 fix avro install script 2017-06-07 11:34:42 +03:00
Markus Mäkelä
2ab4a4fd20 Stop timeout before fixing replication
The timeout is hit very often if the cluster fixing takes some time. This
causes false positives so the timeout should be stopped before attempting
to fix the cluster.
2017-06-06 23:40:54 +03:00
Markus Mäkelä
943662d2b5 Rewrite temporary table test
Use stack allocated test class and use const char pointers for const
functions. Simplify the test and improve error messages.
2017-06-06 22:45:19 +03:00
Markus Mäkelä
de23297944 Speed up session_limits test
The test now waits for a shorter time. Also refactored the test to use
stack allocated objects.
2017-06-06 12:45:20 +03:00
Markus Mäkelä
8d5c6ca00f Disallow all prepared statement commands with dbfwfilter
All binary protocol prepared statements should be rejected by the
dbfwfilter in 2.0 as they aren't supported.
2017-06-06 12:34:46 +03:00
Markus Mäkelä
c3ffc0ba9c Improve cdc.py error handling
When the CDC service reponds with an error, the program prints the error
and exits.
2017-06-05 20:40:29 +03:00
Markus Mäkelä
d93edf02e2 Fix SQL tokenization in avrorouter
There were minor bugs in the token processing which caused ALTER TABLE
statements to be skipped.
2017-06-05 19:59:25 +03:00
Markus Mäkelä
e21bec2e14 Add test for ALTER TABLE with avrorouter
The test does a set of ALTER TABLE operations and checks that MaxScale
outputs the correct data.
2017-06-05 15:33:14 +03:00
Markus Mäkelä
808f1b34e1 Fix use of pcre2_substitute
The length parameter is not set to the required string length unless a
parameter is set. The previous length should be stored before calling
pcre2_substitute.
2017-06-05 14:43:08 +03:00
Markus Mäkelä
5964622839 Fix ALTER TABLE handling in avrorouter
The addition of field types and lengths wasn't added to the avrorouter
ALTER TABLE handler. This caused crashes when an alter table was done and
new rows were inserted afterwards.
2017-06-05 14:42:05 +03:00
Esa Korhonen
2990edc424 Update MaskingFilter documentation 2017-06-05 13:47:39 +03:00