This option was renamed in MySQL 5.5, so it has been silently ignored
since we moved to MariaDB 10.0. I found out it was wrong because MySQL
5.6 quits if it sees an unknown option.
Otherwise, you may get permission denied when trying to remove the temp
dir as a normal user, because the files were created by the 'vitess'
user inside Docker.
It should match the convention established with "MariaDB".
I looked into making them case-insensitive, but it would be more tricky
than it's worth because flavor IDs are used as part of the protocol
between servers. So an old server that is case-sensitive would choke on
a message from a new one.
1. add newQueryServiceConfig, newDBConfigs and newMysqld to testutils_test.go.
2. enforce these funcs under testUtils struct for better code readability.
This is an alternative to 'make integration_test',
with the following advantages:
* Tests run in Docker, so no bootstrap is necessary.
* Tests are hermetic and can run in parallel.
* Test against different flavors just by setting a flag.
* Failing tests are retried to see if they are flaky.
* A failed test will be recorded for later inspection, while the script
continues to run other tests.
* A test that takes too long will be considered stuck and retried.
There's plenty of room for improvement, but now that we have something
in a more readable language than Makefile, we can iterate.
transaction.go only has a single func Commit, it might make more sense
to move Commit to QueryEngine since it uses the QueryEngine's tx pool
and schemaInfo.
Newer Maven versions fail compilation of Vitess with the error "Invalid
JDK version in profile 'doclint-java8-disable': Unbounded range [1.8,".
The original issue is documented here:
https://code.google.com/p/google-gson/issues/detail?id=588
The fix is to use gson-2.3.1 instead of gson-2.3.
This will let contributors test changes without having to do bootstrap
at all.
It also makes it easy to test against multiple flavors without having to
swap out installed packages. You can even run tests against multiple
flavors simultaneously without interfering, if you have enough RAM.
This makes it faster to use Docker images to test new changes, as
suggested in #492.
Since we don't need to re-bootstrap for every push to master, this also
makes our automated builds faster and more reliable (they often fail due
to network lag when installing dependencies with apt-get).
Lastly, this will make it easier to swap out bootstrap images built for
different flavors, such as MariaDB 10.0 vs MySQL 5.6.
this change effectively brings sqlquery.go test coverage to 99%
1. add "queryCalled" in fakesqldb.DB so that tests could know number of
times a query hits a database.
2. add testUtils struct in testutils_test and this struct contains common
test funcs that could be used in tabletserver package.
3. add sqlquery tests to test SqlQuery.allowQueries failure modes.
4. add sqlquery tests to test SqlQuery.checkMySQL failure modes.
5. add sqlquery tests to test transaction failure modes.
6. add sqlquery tests to test SqlQuery.ExecuteBatch failure modes.
7. add sqlquery tests to test SqlQuery.SplitQuery failure modes.