The test failed because the linux user it used was not available
on buildbot. Now the test is part of the larger pam_authentication-
test, which sets up the users.
The LOAD DATA LOCAL INFILE is handled in a way where it returns two
results that both are complete: the first one with the file being
requested and the second one with the final OK packet. Readwritesplit
called session_book_server_response for both statements which caused the
current query index to drop to -1 which in turn was unconditionally used
as the buffer offset.
The new check for the invalid index value will help prevent crashes in
production while still allowing it to be detected while testing.
The error messages are now generated at the site where the error is
detected. This allows a more accurate error to be reported when invalid
parameter values are read.
As Xpand does not have a mysql.user table but a system.users
table, we need to arrange things so that the query used for
selecting annymous users can be different depending on the cluster.
Needs to be a member function as the dropping of anonymous
users must be done differently for Xpand. With current code,
no anonymous users in Xpand will be dropped, and there will
always be an error (so, should someone care about the return
code, this would not work).
Xpand nodes must be added one by one to the cluster as an attempt
to add more nodes will fail, if any of the nodes to be added
already are in the cluster.
Further, the adding of a node may also fail if, when the addition
is made, the addition of the previous node is still in process.
Now it will be attempted at most 5 times, while sleaping as many
seconds between each attempt as there has been attempts.
Some additional logging was also added.
To make it possible to have more tokens than 255.
Parsers operators (i.e. tokens) is one thing and opcodes
for the virtual machine of sqlite3 is another. Unfortunately
they are not completely separate, but some of the opcodes
in <build-directory>/opcodes.h are the same as the tokens in
<build-directory>/parse.h. And while the parser tokens are now
16-bit, the VM opcodes are 8-bit. However, this is probably not
a problem even if some of the parser tokens that are duplicated
in the opcodes are > 256 as we only use sqlite3 for parsing and
not for executing anything (on the sqlite3 VM).
The directory was created when the configuration was being processed and
it wasn't checked unless it was configured to a non-default value. With
the addition of the path validation, the directory must be created
earlier.
Responses generated by replayed session commands must not be treated as
actual responses to retained statements. In 2.5 this is not a problem as
it is done implicitly with the pre-assignment of the server that delivers
the session command response.
Doing the directory permission checks after all the values have been set
helps avoid problems with intermediate values that aren't valid. This
happens when --basedir generates invalid derived paths and the correct path
is provided as an argument right after it.
The path parameter is read from the configuration file only if it hasn't
been modified by a command line option. The case where an invalid command
line option is given but a valid configuration parameter would override it
is still treated as an error.
Also added a clarifying comment into set_dirs to make sure the handling
for the two path parameters is not moved inside set_runtime_dirs.
Fixed the testing scripts for the REST API and MaxCtrl now that the
directory permission checks are done correctly. Previously some paths seem
to have been ignored.
The original code for catenating an SrcList to another assumed
that the list to be catenated had only 1 element. Now works
regardless of the number of items.
The assumption that errno would be the same for the duration of the whole
call chain is wrong as it's possible that other calls that modify it are
made. Using the actual error string itself is much more reliable.