Граф коммитов

9422 Коммитов

Автор SHA1 Сообщение Дата
sougou 5d8a853331 Merge pull request #1665 from sougou/bugs
sqltypes bug: incorrect vitess type returned
2016-04-29 11:10:24 -07:00
Sugu Sougoumarane 9eb47e2de2 bug fix: code improvement
Now that we don't mix mysql flags with MySQL types, there's
no need to bit-shift them. Makes the code more readable.
2016-04-28 16:31:02 -07:00
Sugu Sougoumarane 0eecb3c753 sqltypes bug: safer fix for type resolution
The previous fix was still vulnerable to unexpected MySQL
behavior. The new fix checks the flags based on the type.
So, it's more robust.
2016-04-28 16:22:33 -07:00
Sugu Sougoumarane 939ec958b2 sqltypes bug: incorrect vitess type returned
Bug: b/28409793
MySQL sometimes sets stray flags that have to be ignored.
Specifically, for this query:
select max(uint) from t
MySQL sets the binary flag along with the unsigned flag.
The bug fix changes the behavior where vitess only looks at
the relevant flags and ignores all others.
2016-04-28 14:47:40 -07:00
Anthony Yeh 97b183d622 Merge pull request #1663 from youtube/jdbc
Return AutoGeneratedKey as ResultSet
2016-04-28 12:29:50 -07:00
Anthony Yeh 48405d9c8b Merge pull request #1664 from youtube/ResultSet_Changes
Fix from bloating the byte[] values in GetByte()/GetBytes()
2016-04-28 11:30:33 -07:00
Anthony Yeh 0f10c842ff Merge pull request #1662 from enisoc/java-null-bindvar
java: Fix for null bind variable value.
2016-04-28 11:27:42 -07:00
Ashudeep Sharma a2d8f65096 Fix from bloating the byte[] values in GetByte()/GetBytes() 2016-04-28 16:14:09 +05:30
Harshit Gangal 7f28127b49 code formating 2016-04-28 15:34:33 +05:30
Harshit Gangal 448724ace5 code formating 2016-04-28 15:26:39 +05:30
Harshit Gangal dfe4e78855 resolved merge conflict of VitessPreparedStatement class 2016-04-28 15:12:40 +05:30
Harshit Gangal 12db645a4d AutoGeneratedKeys 2016-04-28 15:05:25 +05:30
Anthony Yeh bc3bc34c1c java: Fix for null bind variable value.
When Java `null` is passed as a bind variable value, we should translate
it to a non-null, empty `ByteString` at the protobuf level.
2016-04-28 00:01:24 -07:00
Michael Berlin 4aa8402b50 BinlogPlayer: Do not use unhealthy REPLICA tablets as source. 2016-04-27 21:15:49 -07:00
Michael Berlin 0434ae24a2 discovery: Provide filter helper functions to reduce code duplication.
Note: The GetCurrentMaster() function which will be used by vtworker when we switch to the discovery package.
2016-04-27 21:15:39 -07:00
sougou b44ed6c0ac Merge pull request #1660 from sougou/v3
v3: support sqltypes.Value for string vindexes
2016-04-27 16:47:01 -07:00
Sugu Sougoumarane 35c5aa2018 v3: support sqltypes.Value for string vindexes
All vindexes must accept sqltypes.Value because that's
how values are supplied for cross-shard joins.
I've also updated the example and the v3 e2e test.
2016-04-27 15:17:19 -07:00
sougou 55b6665b35 Merge pull request #1654 from sougou/v3
v3: revised vindexes
2016-04-27 14:52:45 -07:00
Alain Jobart da0b99b597 Merge pull request #1658 from alainjobart/v3error
V3error
2016-04-27 14:13:18 -07:00
Michael Berlin 0beecb01da Merge pull request #1659 from michael-berlin/worker_refactor
vtworker: Do not reuse the mutex from StatusWorker in implementations.
2016-04-27 14:04:44 -07:00
Alain Jobart b7655d2278 Better version of the keyspace watcher in v3.
We now wait synchronously for the first version, when we get them all we
build the initial vschema. We then process changes incrementally as we
did before.
2016-04-27 13:06:34 -07:00
Alain Jobart 1f8f722528 Only log v3 schema errors after all keyspaces.
Otherwise at startup, some keyspace vschemas may depend on others.
We will only log:
- an error when loading vschema once we have all keyspaces.
- any refresh error.
2016-04-27 13:06:34 -07:00
Alain Jobart 6ace21037a Merge pull request #1656 from alainjobart/combo
Add BeginExecute{,Batch} to gRPC, removing tabletconn.ERR*
2016-04-27 13:05:50 -07:00
Michael Berlin 49d7fa3333 vtworker: Do not reuse the mutex from StatusWorker in implementations.
Removing this dependency makes it easier to reason about which components need synchronization and use the lock.

StatusWorker is now fully isolated and can be accessed only through its exported methods.

Other changes:
- Unexported remaining fields in StatusWorker 
- Added State() to worker interface to deduplicate code in unit tests.
- created TabletStatusList which aggregates TableStatus objects and has its own lock now. By resing it, we reduce code duplication in SplitClone and VerticalSplitClone.
- Changed Status* functions to not use the previous global mutex. Instead, StatusWorker and TabletStatusList are called independently now.
2016-04-27 13:01:06 -07:00
Sugu Sougoumarane ef3f030c6e v3 vindexes: handle space padding
Ref: http://dev.mysql.com/doc/refman/5.7/en/char.html
MySQL ignores trailing spaces. So, vindexes should reflect this.
2016-04-27 12:48:41 -07:00
Alain Jobart 8c015b0b10 Removing Err* from tabletserver.
We now use canonical errors. Note over the RPC channel we were always
sending the canonical errors already, and not really using the old style
errors anyway.
2016-04-27 11:35:16 -07:00
Sugu Sougoumarane d0bfecf3d7 v3: fix third_party dependency 2016-04-27 11:27:22 -07:00
Erez Louidor be79afda7b Merge pull request #1657 from erzel/fixing_equal_splits_value_to_big_rat
Added a workaround for b/28409793
2016-04-27 11:22:09 -07:00
Michael Berlin 22d0eb4b50 Merge pull request #1655 from michael-berlin/worker_fixes
vtworker: Abort when filtered replication is already enabled.
2016-04-27 11:12:42 -07:00
Erez Louidor 915a3ef9de Added a workaround for b/28409793 2016-04-27 10:37:57 -07:00
Alain Jobart 7d38d2a036 Removing tabletconn error codes.
They are now unused, we just depend on canonical errors.
2016-04-27 09:37:49 -07:00
Alain Jobart c1189537bb vtgate doesn't use tabletconn.ServerError.Code.
Instead, it just relies on tabletconn.ServerError.ServerCode, which is
the vtrpcpb version of the code.
2016-04-27 09:30:15 -07:00
Alain Jobart 6fbfebc2a4 resolver.isConnError -> resolver.isRetryableError.
It's all it's used for anyway, so it's just clearer.
2016-04-27 09:08:32 -07:00
Alain Jobart 894a34a53e Removing Code from ScatterConnError.
This is part of the next wave of clean-up, to remove tabletconn.ERR_*
values and replace them with vtrpcpb.ErrorCode.
2016-04-27 08:57:33 -07:00
Alain Jobart af6a18b817 Adding BeginExecute{,Batch} rpc to gRPC code.
It is behind a flag for now, until it's been around for long enough, and
then I'll just enable it by default.
2016-04-27 08:11:32 -07:00
Michael Berlin faa3f2f2c2 vtworker: Log head of stacktrace in case of a panic. 2016-04-26 23:52:06 -07:00
Michael Berlin dd05dec73c vtworker: Abort when filtered replication is already enabled. 2016-04-26 23:50:19 -07:00
Sugu Sougoumarane 16174fc5e2 v3: fix []byte vs string bug
The v3 router used to convert all []byte to string to
check for uniqueness (a futile exercise). The uniqueness
check was removed, but the conversion remained. Now, I've
removed it, and fixed tests and other dependencies accordingly.
2016-04-26 22:53:06 -07:00
Michael Berlin 34b6790b16 Merge pull request #1653 from michael-berlin/v3_demo_message
examples: Log port of v3 demo on stdout.
2016-04-26 21:57:10 -07:00
Sugu Sougoumarane 169207ebc0 v3: rename binary & char vindexes
The new vindexes now have more precise names. This is because
their behavior is not supposed to change over time.
2016-04-26 21:48:57 -07:00
Erez Louidor fec6433e28 Merge pull request #1651 from erzel/fix_equal_splits_default
Made equal_splits use the first split_column if more than one is give rather than complain
2016-04-26 20:36:26 -07:00
Sugu Sougoumarane 79423e9f6e v3: fix binary & char vindexes
Fix 1: Use proper unicode methods to generate
reliable unique keys for unicode strings. The reference
is here: http://www.unicode.org/reports/tr10/#Multi_Level_Comparison.
We're using level 1 comparison, which is the most
permissive.

Fix 2: Use MD5 hash instead of the weaker 3DES algorithm.
2016-04-26 18:23:27 -07:00
Erez Louidor 57812424fd Made equal_splits use the first split_column if more than one is given, rather than complain. 2016-04-26 16:27:34 -07:00
Erez Louidor 734d20a78e Merge pull request #1652 from erzel/adding_support_for_random_population_of_vttest_to_go_client
Allow initialization of vttest DB with random data from go.
2016-04-26 13:52:03 -07:00
Michael Berlin 87cf663fd8 examples: Log port of v3 demo on stdout. 2016-04-26 13:21:24 -07:00
Erez Louidor 5c5b269b79 Allow initialization of vttest DB with random data from go. 2016-04-26 11:46:14 -07:00
Alain Jobart e00aed5743 Merge pull request #1650 from alainjobart/beginexecute
Adding combo methods Begin+Execute{Batch}
2016-04-26 10:52:30 -07:00
Alain Jobart 39980a6184 Fixing a few tests that were using GetSessionId.
It was all implicit, and lazy, really.
2016-04-26 10:36:16 -07:00
Alain Jobart dbc71f23e5 Removing sessionID in one more place in tests. 2016-04-26 10:15:41 -07:00
Alain Jobart 7eda94d924 Clean up of tabletconntest for no more Session. 2016-04-26 10:02:39 -07:00