We now use the ephemeral policy for both reads and writes:
- renamed the write enums to have 'Write' in their names.
- added three enum types for reads.
- added a recycleReadPacket method, has to be called after a packet
has been fully read (and before starting any other packet).
* use DNSNames (Subject Alternative Names) from cert as immediate callerid Groups
* add no_test to grpcvtgateservice
* fix copy/paste errors, making comment accurate
And moving endtoend tests from go/mysql to go/mysql/endtoend.
This breaks the go/vt/vttest circular dependency, and makes the
tests that need a MySQL instance all in the same place, cleaner.
* Add parser support for multi-table updates. Add unsupported errors to ensure they don't go through the builder yet
* fix compile issues
* Add parser support for multi-table deletes. Add unsupported errors to ensure they don't go through the builder yet
* Add tests for PASS_DML
* use processTableExprs to support pass through on unsharded and simple equal unique sharded cases
* only process table exprs if there's more than 1, otherwise preserve old logic
* clarify error
* Add keyspace to plan, catch more types of routable queries, update tests
* use bldr for both cases
That way two things can happen:
- ConnectionID is always valid, even if Close() has been called. Useful
to remove Connection objects from maps for instance, after closed.
- IsClosed() can use the flag, and be accurate. Before that, calling
IsClosed() after Close() would return false.
last_insert_id was disallowed for all keyspaces because it
conflicted with Vitess sequences. Now, on special request,
we'll allow it for only unsharded keyspaces with the caveat that
it's a simple pass-through.
* parseTaget->executor.ParseTarget. If the vschema has only
one keyspace, the target is set to that. This should cover
a few more use cases.
* Find: improved signature.
* newRoute does not set the table for the symtab because there
are flows where there is no table (union). The setting is
done only where it's required.
* AddAlias->InitWithAlias: it's a more appropriate name. The
function also panics if the symtab already contains symbols.
As we add more opcodes, it's getting harder to chase down
all places that reference it. This change moves all those
checks into route. It should make it easier to add new ones.
Some installs of mysql don't have mysqld_safe. Update mysqlctl
to directly launch mysqld if mysqld_safe cannot be found.
I've tested this manually by renaming mysqld_safe.
Auto-resolve has been improved as follows:
* If a vindex column is unique across all tables, then you
are allowed to reference it without a qualifier.
* If all tables in the symtab are in the same route, there
is no need to use a qualifer. The column reference will
be anonymously assigned to that route.
On the implementation side, the autoResolve flag is not
passed in any more. Instead, it becomes an internal property of
symtab.
Symtab also acquires a new member 'globals' which are used
to resolve unqualified references. We also add oneRoute, which
is set if all tables belong to a single route.
Order was incorrectly named. Its true meaning was MaxOrder.
Join nodes do not have an Order because they are not traversal
destinations. Only a route has an order, and it now has a
member called Order to indicate that.
This design presumes that only route nodes can have order.
In the future, newer nodes may also become valid traversal
destinations. If this happens, the APIs will be adjusted
accordingly.
I've merged the comments in doc.go and builder.go into
the description of MaxOrder.
This is prep work for being able to allow more constructs to
be recognized as pass-through, especially for unsharded keyspaces.
The fundamental intent behind this change is to allow for a symbol
to be associated to just a route without knowing which table it's
coming from. So, if you have a query like 'select a from t1, t2'
where t1 and t2 are from the same keyspace, then we can still
push-down 'a' into that route without knowing which table it comes
from.
Additionally, the concept of colRef was confusing because it had
different interpretations depending on whether it was a select
column or table column. Colsym was another confusing name because
it wasn't really a column symbol.
The new scheme is actually easier to understand if studied fresh:
symtab contains tables, and tables contain columns.
A table column pointer uniquely identifies the column.
symtab also contains result columns. A result column contains a
column reference. If it's a real column, then it points to the
actual table column. Otherwise, it's a unique anonymous reference
that just points to the originating route.
This column reference is saved as Metadata in ColName elements
where they previously used to store colRef. This results in
some simplification. More importantly, a 'column' can now be
anonymous, which should let us support more constructs.