The name of the object (i.e. the section name from the configuration
file), is now stored in the configuration object for that object.
That way, more contextual and hence morfe user friendly errors and
warnings can be generated.
If the server (a real one or a service exposed as a server) is
on the same machine as MaxScale, then for performance reasons
a Unix domain socket and not a TCP/IP socket should be used.
Rename config::Configuration::configure() to
config::Configuration::post_configure(). Latter name makes it
unambiguously clear at what point the function is called.
The test performs the following:
CREATE tbl (x INT PRIMARY KEY)
t1 t2
BEGIN BEGIN
INSERT INTO tbl VALUES (1)
SELECT * FROM tbl FOR UPDATE
That will cause t2 to wait.
INSERT INTO tbl VALUES (0)
That will cause t2 to be rolled back due to a deadlock.
Without transaction replay, the SELECT will return with an error.
With transaction replay, the deadlock error will be caught, the
transaction replayed and SELECT will return successfully.
As an error returned by the server is now stored inside RWBackend,
irrespective of whether it is returned solely or e.g. last after
a result set, there is no need to examine the GWBUF in rws, but
we can use the information that exists.
This is the base for Smart Router. Review and TODO comments are in the
code. This commit will be squashed several times so don't pay attention to this
specific commit message. I will add and remove TODO's in the code, rather
than save them in git commits. RBCommons will contain the history.
Before the MXS-2250 fix, the following ends with an error:
CREATE TEMPORARY TABLE t (f INT);
DESCRIBE t;
Reason is that the first is sent to the master (and the table will
not be replicated to slaves) and the latter to some slave.
When a statement like 'DESCRIBE tbl' is classified, the table
name will now be available so that a router can check whether the
table is a temporary one. In that case, the statement must be sent
to the master.