Commit Graph

747 Commits

Author SHA1 Message Date
df36ef86d0 2.4.14 Update Change Date 2020-11-16 14:23:26 +02:00
a1a1bdf93d MXS-3292 Fix bug
The string given to USE must be dequoted before being stored.
2020-11-11 12:37:36 +02:00
b459b6f13f MXS-3292 Add test that reveals bug 2020-11-11 12:37:36 +02:00
faaf7f483e 2.4.13 Update Change Date 2020-10-14 09:15:46 +03:00
babcda3eca 2.4.12 Update Change Date 2020-08-24 09:42:48 +03:00
c0cd751215 Merge branch '2.3' into 2.4 2020-08-20 14:29:16 +03:00
c5870cbaba MXS-3121 Expose statement currently being classified
Intended to be used from fatal signal handlers. As the statement will
be returned only while classification is in process, if a statement
is returned, it is an indication that the crash was caused by the
classification.
2020-08-20 13:27:55 +03:00
02b0a4c52c Merge branch '2.3' into 2.4 2020-08-19 16:37:52 +03:00
bf6ff8a578 MXS-3120 Check whether sqlite SrcList is NULL
According to bug-report it seems that a SrcList can be NULL. This
fixes the immediate problem, but it would be good to know in what
contexts the SrcList can be NULL so that the check could be made
before calling the function instead of checking (possibly
unnecessarily at times) in the function.
2020-08-19 16:37:24 +03:00
c0ea4cae54 Merge branch '2.3' into 2.4 2020-08-17 17:30:55 +03:00
9318319b96 Fix build failure with GCC 10.2
GCC is smart enough to detect that the address of a local variable is
returned. Since this appears to be code used for a debug assertion, we can
just return a null pointer.
2020-08-17 13:23:33 +03:00
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
31eade1a75 Merge branch '2.3' into 2.4 2020-06-18 11:58:38 +03:00
c2c0b4ef60 Merge branch '2.3' into 2.4 2020-06-18 11:43:01 +03:00
9fb5336615 MXS-2996 Fix classification of "SELECT ... LOCK IN SHARE MODE"
And also of "SELECT ... FOR SHARE"
2020-06-18 10:17:08 +03:00
1dd06c3ebc MXS-2996 Add test that reveals problem
SELECT * FROM test LOCK IN SHARE MODE
  SELECT * FROM test FOR SHARE

should be classified as QUERY_TYPE_WRITE.
2020-06-18 10:14:16 +03:00
3972e372ae MXS-3041 Fix 'SELECT handler FROM t FOR UPDATE'
Problem was that 'handler' is a keyword. To make it work,
the keyword must be listed as one of those that turns into
an id where it cannot be used as a keyword.
2020-06-18 08:40:22 +03:00
f96c8d3a97 MXS-3041 Add test that reveals problem 2020-06-18 08:35:33 +03:00
5ebae9be90 Merge branch '2.3' into 2.4 2020-06-05 09:36:24 +03:00
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
f5c118d27b Merge branch '2.3' into 2.4 2020-05-13 11:04:18 +03:00
b212117fd3 MXS-2990 Fix the problem, treat ! as not
If '!' is followed by '=' then it is NOT-EQUAL, otherwise it is
just NOT.
2020-05-13 10:38:07 +03:00
9999650bbe MXS-2990 Add test that reveals problem
Had to fix qc_mysqlembedded as well to work with 10.2.
2020-05-13 10:32:39 +03:00
d3d7054639 Merge branch '2.3' into 2.4 2020-04-24 16:09:20 +03:00
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
d0ab797938 Merge branch '2.3' into 2.4 2020-03-12 10:33:57 +02:00
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
163a7b3b84 MXS-2917 Add missing destructors to sqlite rules (2.4) 2020-03-09 16:01:49 +02:00
55425b22ce Merge branch '2.3' into 2.4 2020-03-09 15:45:37 +02:00
8dd9a4ca27 MXS-2917 Add missing destructors to sqlite rules
Lemon (the sqlite parser generator) destructors are needed for
all rules that return dynamically allocated structures. Otherwise
there may be leaks if a statement is not completely parsed.
2020-03-09 15:24:20 +02:00
0aae500577 MXS-2898 Classify @@last_insert_id() and last_insert_id() identically
With this change, both 'SET @my_id = (SELECT LAST_INSERT_ID())' and
'SET @my_id = (SELECT @@LAST_INSERT_ID)' are classified as

QUERY_TYPE_MASTER_READ|QUERY_TYPE_SESSION_WRITE|QUERY_TYPE_USERVAR_WRITE

Earlier @@last_insert_id had the QUERY_TYPE_READ bit set as well, which
indirectly caused the problems of MXS-2898.
2020-03-04 13:18:09 +02:00
4c2909e86c MXS-2227 Fix problem, parse OPTIMIZE statements
OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
    tbl_name [, tbl_name] ...
    [WAIT n | NOWAIT]
2020-03-04 13:10:46 +02:00
3df8429db3 MXS-2227 Add test that reveals problem 2020-03-04 13:10:46 +02:00
ee8e43f26b MXS-2508 Fix problem
DIV and MOD are now also accepted instead of / and % respectively.
MOD is a keyword but (in principle incorrectly) decays into an id
when used in some other context. That is so that it will be
parser by the general function rule ("id ( ... )"). If used
incorrectly, the server will later reject.
2020-03-03 11:30:58 +02:00
be3be3bf99 MXS-2508 Add test that reveals problem 2020-03-03 11:30:58 +02:00
f66d7ca838 MXS-2508 Fix qc_mysqlembedded
It appears that the function db_my_assert may be used but not
built into the library.

With 10.4.12 there seem to occasionally be superfluous empty
table names.
2020-03-03 11:30:58 +02:00
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
08e572b139 Merge branch '2.3' into 2.4 2020-01-28 12:28:19 +02:00
ea2665214f MXS-2851 Fix bug 2020-01-28 12:10:24 +02:00
399f312911 MXS-2850 Fix bug 2020-01-28 11:08:27 +02:00
a7e0142224 Merge branch '2.3' into 2.4 2020-01-15 11:29:37 +02:00
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
dcd3e60630 Merge branch '2.3' into 2.4 2019-11-01 14:21:48 +02:00
6cba7e8201 MXS-2732 Recognize character set names
In the tokenizer we will now recognize the character set names
of MariaDB and return a specific token for those. However, where
a character set name is not expected, it will automatically be
treated as an identifier.

Note that when the character set name is explicitly specified
for a literal string, the name must be prefixed with an underscore.
That is, if the character set name is "latin1", when used when
specifying a literal string, it's used as "_latin1 'a'".

Note that this does not fix the sqlite3 bug causing a leak, but
since the statement will now correctly be parsed, the leak will
not manifest itself.
2019-10-31 16:09:52 +02:00
177d95c3bc MXS-2732 Add test that reveals problem 2019-10-31 15:49:28 +02:00
ef184deb1f Merge branch '2.3' into 2.4 2019-10-31 10:06:27 +02:00