Commit Graph

305 Commits

Author SHA1 Message Date
524a083203 MXS-2439 Do not classify implicit commits as commits
The type mask of CREATE, ALTER, etc. that cause an implicit commit
will no longer contain the bit QUERY_TYPE_COMMIT.

As an implicit commit does not change the transaction state as seen
by MaxScale, it does not make sense to claim that the statement is
a commit.
2019-04-18 11:19:23 +03:00
3127aa85c5 MXS-2432 Add test that reveals issue
RESET is neither parsed not tokenized, so RESET statements ends
up being sent to the master. That is fine for all but RESET QUERY
CACHE that should be sent to all servers.
2019-04-12 14:51:01 +03:00
c643f9bc8d Merge branch '2.3' into develop 2019-04-12 13:23:49 +03:00
62f2a86a5f MXS-2431 Add test that reveals the problem 2019-04-12 10:30:36 +03:00
6bc2c54081 Merge commit 'a78f0fbe2537542dc7f3f0dd8b19b93ac8d9d7f8' into develop 2019-03-28 13:53:40 +02:00
f37340e9fd MXS-2397 Provide context information for fields
The query classifier now returns contextual information for a fields;
does it appear in the (right hand side) of a UNION or in a SUBQUERY.
2019-03-25 15:24:35 +02:00
42b5c39f43 Merge branch '2.3' into develop 2019-02-07 10:50:27 +02:00
cc6665c732 Add solo mode to compare
In this mode the compare program does a sanity check where it compares the
output of a classifier when a statement is classified multiple times. The
main use-case for this is to get the verbose output generated when the -v3
option is added, not the sanity check itself.
2019-02-06 13:55:41 +02:00
6038f1f386 Merge branch '2.3' into develop 2019-02-01 13:55:54 +02:00
f335dba2c0 Fix stack buffer overflow in compare
The buffer was three characters short.
2019-01-28 17:35:27 +02:00
3b55893a20 Combine maxscale/buffer.h with maxscale/buffer.hh 2019-01-17 12:37:40 +02:00
d4674faa7d Convert maxscale/query_classifier.h to .hh
The header was not merged with queryclassifier.hh since the latter
does not include the former.
2019-01-15 18:18:39 +02:00
269ab712bc Merge branch '2.3' into develop 2019-01-09 09:15:30 +02:00
78ea12b4c1 Merge branch '2.2' into 2.3 2019-01-09 09:13:59 +02:00
a456168fd0 MXS-2248 Add test that reveals problem 2019-01-09 09:11:49 +02:00
2c6e45a770 MXS-2242 Add test that reveals problem 2019-01-08 16:00:02 +02:00
7a7545f8f7 Merge branch '2.2' into 2.3 2019-01-08 15:59:03 +02:00
f94ddadc18 MXS-2242 Add test that reveals problem 2019-01-08 15:55:41 +02:00
eacf88f6a5 MXS-2220 Add server version and type information struct
The old fields are still used.
2018-12-19 13:18:16 +02:00
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
60cbeaf287 MXS-2208 Compile classify as C++ 2018-12-10 12:50:07 +02:00
9f721f725e MXS-2205 Convert maxscale/protocol/mysql.h to .hh 2018-12-05 11:12:20 +02:00
6c281d55e2 Merge branch '2.3' into develop 2018-12-04 11:23:56 +02:00
1a78f2ffbb Merge branch '2.2' into 2.3 2018-12-04 11:23:31 +02:00
d9ae298102 MXS-2205 Combine maxscale/server.h with maxscale/server.hh
The server-struct is still used in several .h-files.
2018-12-03 16:47:27 +02:00
964180804c MXS-2207 Add test that reveals problem
With qc_mysqlembedded statements like

    SET STATEMENT ... FOR stmt;

are always classified as READ, although their type should be
that of stmt.
2018-12-03 15:59:43 +02:00
7b001994b4 MXS-1978 Change qc_sqlite behaviour and update test
A statement like

  SELECT ... INTO OUTFILE|DUMPFILE ...

is now classified as a QUERY_TYPE_WRITE, instead of as
QUERY_TYPE_GSYSVAR_WRITE so that it will be sent only to the
master.
2018-11-01 11:24:44 +02:00
9d8a49af5d MXS-1978 Add test that tests current behaviour 2018-11-01 11:24:44 +02:00
66227301aa Merge branch '2.2' into develop 2018-09-27 11:47:32 +03:00
743daa5755 MXS-2043 Create test that exposes problem
A statement like

    SELECT a FROM tbl FOR UPDATE;

should be classified like QUERY_TYPE_WRITE so as to be sent
to master.
2018-09-27 10:17:47 +03:00
71ffef5708 Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
a29851a42c MXS-2026 Use qc_init(...)/qc_end()
Use qc_init(...)/qc_end() for initializing QC in test-programs.
2018-08-29 09:47:13 +03:00
5c1a1c2700 MXS-2026 Separate QC process and thread initialization
qc_thread_init() must now explicitly be called in every thread
and not just in other threads but the one where qc_process_init()
is called.

This change was caused by QC_INIT_SELF initialization actually
being performed in query_classifier.cc. Before this change, there
actually was a leak in the routing worker running in the main
thread, the query classification cache was created twice.
2018-08-29 09:47:13 +03:00
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
3576780f78 MXS-2008 Update gateway and tests to initialize maxbase
Update gateway and tests to initialize maxbase using

  maxbase::init();

instead of initializing individual components.
2018-08-21 10:02:39 +03:00
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
39ce6c624f MXS-2005: Remove unused code
Removed skygw_utils and relate files along with the old log manager
code. Also removed file flushing due to it being redundant; messages are
written to the file immediately. Adjusted tests to accommodate this
change.
2018-08-14 14:57:33 +03:00
f14380243b Rename cppdefs.hh to ccdefs.hh
For obvious reasons; the c++ suffix is .cc and not .cpp
2018-08-10 07:50:18 +03:00
f584b481eb MXS-1992 Add program for measuring cache performance
With this program it is possible to find out the difference in
performance between cached and non-cached query classification.
2018-08-01 11:10:34 +03:00
e7913cc022 MXS-1624 Update qc_setup() prototype
Now takes a structure that, if present, enables the query
classification caching and specifies the properties of the
cache.

For the time being no actual properties are yet available.
2018-07-06 12:12:31 +03:00
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
75ddfe4c14 Merge branch '2.2' into develop 2018-06-21 14:02:00 +03:00
254084fc5e MXS-1935 Accept "PREPARE name FROM @var" 2018-06-21 12:51:47 +03:00
457d74f6b4 MXS-1935 Add test that exposes problem
"PREPARE a FROM @var" is not classified.
2018-06-21 12:51:47 +03:00
45bda0f72e MXS-1936 Make qc_mysqlembedded compatible with qc_sqlite
qc_mysqlembedded must also be updated to handle the new type
QUERY_TYPE_DEALLOC_PREPARE. Some adjustements were also needed
elsewhere.
2018-06-21 12:51:47 +03:00
8094c67ac2 Merge branch '2.2' into develop 2018-06-13 00:25:56 +03:00
d9100278b0 MXS-1719 Update qc test parser
The recent change to the qc_sqlite parser also requires some
modifications to the parser used for reading .test-files.
2018-06-12 17:35:49 +03:00
cd136b11a7 MXS-1891: dealloc named prepare should route to all (#174)
* dealloc named prepare route to all

* add newline

* erase from ps manager too

* little refactor
2018-06-12 10:45:11 +03:00
765806a633 Merge branch '2.2' into develop 2018-05-18 13:40:27 +03:00