Ammar Aijazi
d2780b7fe8
Demote MySQL DataOutOfRange errors (errno 1264)
2015-08-28 12:04:40 -07:00
Anthony Yeh
5b1055f2b5
Stop using non-standard uint64 BSON encoding.
...
We can still decode the uint64 type if we receive it.
If we receive an int64 and try to decode into a statically-typed uint64
variable, it will pretend the received type had been uint64.
If we receive an int64 and decode into interface{}, it will have type
int64, which can cause problems. This mainly happens for arrays of
dynamic values, like BindVars.
2015-08-22 16:01:45 -07:00
Ammar Aijazi
2b96585758
Suppress or demote some Execute errors in logs
2015-08-19 16:00:06 -07:00
Ammar Aijazi
b66031eefb
Fix a small behavioral change when converting QueryResult from Proto3 to internal data structures
2015-08-07 18:36:13 -07:00
Alain Jobart
e5bc509f07
Finishing gRPC vtgate client / server.
2015-07-21 08:43:07 -07:00
Alain Jobart
842b233ed6
First pas at vtgate gRPC client/server. Not finished yet.
2015-07-20 15:40:09 -07:00
Alain Jobart
75c4dfe75c
Adding proto3 and grpc code for update stream, now that API is good.
2015-07-10 15:20:43 -07:00
Alain Jobart
1da6040140
Fixing worker to not use the first character of a number
...
to see if it's negative, but use the new flags we have.
2015-06-26 16:49:42 -07:00
Alain Jobart
72dd02252e
Moving mysql proto conversions to their own file.
2015-06-24 11:47:35 -07:00
Ammar Aijazi
d339c32c49
Pass RPCErrors by pointer instead of value
2015-06-04 20:26:00 -07:00
Ammar Aijazi
6e0f5d68c3
Add a flag and some tests for returning RPC errors in RPC responses
2015-06-03 19:27:21 -07:00
Ammar Aijazi
fb4c5fb10e
queryservice's Execute should return RPCErrors as part of QueryResult
2015-06-03 19:27:21 -07:00
Michael Berlin
54421665c4
Process new "Flags" MySQL field when converting a result set to Go types.
...
This change breaks the previous behavior: Before, unsigned BIGINT fields were always mapped to an int64 unless they were out of range for it. Now BIGINT are mapped to int64 or uint64 based on the unsigned information in the schema.
Smaller MySQL integer types are mapped to int64 as before, regardless of their signed information.
2015-05-27 13:53:45 -07:00
Michael Berlin
92a7984ce2
Merge pull request #618 from youtube/mysql_flags
...
Pass "Flags" from MySQL field from the result set e.g. to preserve if integers are unsigned.
2015-04-27 17:16:56 -07:00
Sugu Sougoumarane
bc30358eab
Fix build issue with mysql.go
...
Including errmsg.h causes build problems on import.
So, punting on this for now by hardcoding the error code.
2015-04-24 15:03:22 -07:00
Michael Berlin
68ddcf73ae
Pass "Flags" from MySQL field from the result set e.g. to preserve if
...
integers are unsigned.
2015-04-24 14:59:48 -07:00
sougou
c88513e39a
Merge pull request #619 from youtube/suguwork
...
tabletserver: verbose error for killed queries
2015-04-24 00:44:18 -07:00
Sugu Sougoumarane
9a8f8b8a35
tabletserver: verbose error for killed queries
2015-04-23 15:35:32 -07:00
Anthony Yeh
7f444655db
Implement vio_socket_shutdown for MySQL 5.6.
2015-04-22 14:21:40 -07:00
Shengzhe Yao
defc9d9398
add sqldb.Conn interface for low level db connection
...
1. add sqldb.Conn and move mysql.ConnectionParams to sqldb package.
2. change mysql.Connect function to return sqldb.Conn.
3. update places using *mysql.Connection to sqldb.Conn.
4. update places using *mysql.ConnectionParams to *sqldb.ConnParams.
5. changes places that use mysql.Connect to sqldb.Get().
6. Some randome go style fix (suggested by golint).
7. define package level variable DefaultDB in sqldb.
8. go/mysql will register its Connect func in init function.
2015-03-24 15:31:11 -07:00
Sugu Sougoumarane
edb546eb64
tabletserver: New connection pool and connection
...
Implementing a new pool and associated connection to
better manage connection problems. This new combination
addresses the following problems:
- On connection error, retry if allowed.
- CheckMySQL if necessary.
- New Exec API with deadline.
- Improved connection killer that kills the connection on
both sides.
This is just the framework for now. The next CL will
actually change the tabletserver to use this.
The test is manual for now. So, it's disabled by default.
2015-02-05 13:20:15 -08:00
Anthony Yeh
dc910a32e7
Fix MySQL force close for real this time.
...
Closing the socket was too harsh, because that makes the socket handle
invalid for any calls, even checking its status. Instead, we should only
call shutdown on the socket.
2015-01-28 22:44:11 -08:00
Anthony Yeh
4135ac9432
Finish force_close before calling mysql_close.
...
Trying to address crashes in CGO that happen when closing a connection
that was previously force-closed.
2015-01-27 17:53:59 -08:00
Alain Jobart
d2b4be1402
Big batch of linter fixes.
2015-01-06 09:37:34 -08:00
Anthony Yeh
d86142c589
Use "go generate" for bsongen instead of Makefile.
...
Now the bsongen command can live next to the type it operates on.
Note that you need Go 1.4 to run "go generate", but that only needs
to be done when you've modified a type that is the subject of a
generate command.
2014-12-24 02:10:49 -08:00
Sugu Sougoumarane
13f45b5ea6
v3 proto: lookup hash unique index and handling of non-primary indexes for inserts
2014-12-07 21:56:51 -08:00
Anthony Yeh
f0186fbe22
Fix charset handling in filtered replication.
2014-09-26 15:36:12 -07:00
Anthony Yeh
a91d8823ad
Add or fix package comments for reusable packages.
2014-09-24 14:35:23 -07:00
Anthony Yeh
e2f4fc3a9d
Better error messages from binlog streamer.
2014-09-23 17:39:51 -07:00
Anthony Yeh
d933b997d5
Add EnableSSL() to mysql.ConnectionParams.
2014-09-03 17:44:12 -07:00
Anthony Yeh
94d343aadc
Fix declaration of internal libmysql functions for MariaDB.
2014-08-20 21:11:49 -07:00
Anthony Yeh
b9827a25a3
Add mysql.ForceQuit() to close mysql connection at socket level.
2014-08-12 10:21:04 -07:00
Anthony Yeh
79e2159a12
Raise a compile error for implicit declarations in CGO.
2014-08-06 10:29:37 -07:00
Alain Jobart
a0b4b67be0
Adding extra headers so compiler has them.
2014-08-06 09:55:24 -07:00
Anthony Yeh
2fc9f65e46
Add low-level MySQL command functions to libmysqlclient wrapper.
2014-08-05 12:01:08 -07:00
Sugu Sougoumarane
3785916fbe
Merge branch 'master' into monitoring
2014-04-04 12:03:14 -07:00
Sugu Sougoumarane
9c8cab6c91
queryservice: categorize read-only errors as RETRY
...
When we get a read-only error, it means that the current
server is not the master anymore. Categorize such errors
as RETRY, which will make the clients re-resolve to the
new master.
2014-04-04 11:40:43 -07:00
Alain Jobart
8302b2ae94
First pass at MariaDB support.
...
test/tabletmanager.py passes!
It's enabled by setting MYSQL_FLAVOR=MariaDB before anything.
2014-04-02 14:52:07 -07:00
Sugu Sougoumarane
a8b519a46c
bsongen: undoing Nullification till clients are deployed
2014-03-21 17:34:34 -07:00
Sugu Sougoumarane
6a637b8c4d
bsongen: mysql/proto & some vtgate/proto
2014-03-21 15:55:49 -07:00
Sugu Sougoumarane
5ff2643d57
bson: RecordLen -> Close
2014-03-16 20:22:24 -07:00
Sugu Sougoumarane
5789e34650
bson: convert custom marshalers to new API
2014-02-28 20:50:42 -08:00
Sugu Sougoumarane
b4999d05ac
bsongen: Slice support
...
Also changed ExpectIndex to SkipIndex. The check
is not worth it.
2014-02-26 15:09:30 -08:00
Sugu Sougoumarane
353168b71f
bson: Plan B on encoding of QueryResult
...
Switching the types back to uint64, and encoding
to encode as unsigned instead of the other way round.
2014-02-25 14:05:52 -08:00
Sugu Sougoumarane
faed110d1c
bsongen: []byte support
2014-02-24 16:56:13 -08:00
Sugu Sougoumarane
e1402b8c4f
bsongen: EncodeInt
...
Also make some of the types match the encoding.
2014-02-23 19:19:40 -08:00
Alain Jobart
6e86e0f69b
Fixing all bson encoders to support extra fields.
...
In the process, fixing a bug in '*Session' decoding,
where a field with a 'bson.Null' kind would fail.
2014-02-19 10:19:12 -08:00
Alain Jobart
6b580d1ab1
Refactoring mysql passwords for CredentialServer.
...
We now ask the CredentialsServer everytime we connect for
an up to date password. Refactor code everywhere to use that
feature, and not duplicate mysql.ConnectionParams everywhere.
2014-01-31 13:21:33 -08:00
Sugu Sougoumarane
8c574d50d2
Sessionless VTGate rewrite: WIP (not building yet)
2014-01-09 15:13:46 -08:00
Alain Jobart
796edd7570
Re-organizing code a bit, adding comments.
2013-12-20 11:06:25 -08:00
Alain Jobart
48189f7bb9
Adding mysql types to go/mysql/proto.
...
Using them in client2 and diff_utils.
2013-12-20 10:46:06 -08:00
Liang Guo
83d7138532
Fix handling of NULL in mysql row values
2013-12-11 15:05:49 -08:00
Sugu Sougoumarane
1f294e8d10
tests for mysql protos.
2013-10-22 10:01:21 -07:00
Sugu Sougoumarane
dd01dafbd8
Simplify bson encode API.
2013-10-18 15:43:26 -07:00
Sugu Sougoumarane
3809d76bc2
Move error constants into mysql package.
2013-09-30 09:35:29 -07:00
Alain Jobart
a8bc39e721
Fix DbName case.
2013-09-02 22:55:12 -07:00
Ryszard Szopa
88809ec538
Manually redact password information from logging.
2013-08-06 14:58:51 -07:00
Ryszard Szopa
66cf2567c4
Convert commands to use glog.
...
Conflicts:
go/cmd/vtocc/vtocc.go
go/cmd/vttablet/vttablet.go
2013-08-06 14:58:10 -07:00
Ryszard Szopa
cead93c364
Automatic rewrite of relog import paths and calls to use glog.
...
Commands run:
find go -name "*.go" | xargs sed --in-place -r 's,"github.com/youtube/vitess/go/relog",log "github.com/golang/glog",g; s,relog.Info,log.Infof,g; s,relog.Warning,log.Warningf,g; s,relog.Error,log.Errorf,g; s,relog.Fatal,log.Fatalf,g; s,relog.Debug,log.V(6).Infof,g'
find . -name '*.go' -exec gofmt -w {} \;
2013-08-06 14:56:00 -07:00
Ryszard Szopa
0d046a5984
Replace code.google.com with github.com/youtube/vitess.
2013-07-18 18:18:20 -07:00
Alain Jobart
46c1b60448
Adding support for encrypted replication.
...
LGTM Sugu.
2013-06-13 17:28:44 -07:00
Sugu Sougoumarane
edeec1a84f
change mysql API to accept string instead of []byte for queries
2013-04-30 13:00:43 -07:00
Sugu Sougoumarane
0313590965
Fix for multi-result. Ensure we pull all data from server on close result.
2013-04-08 15:32:10 -07:00
Sugu Sougoumarane
110c5576eb
backdoor for allowing multi statements (no support for multi results yet)
2013-04-05 18:54:38 -07:00
Alain Jobart
afaab059e9
Make sure we compile mysql library with 64 bits libraries, otherwise it breaks.
...
LGTM Sugu.
2013-02-13 13:28:42 -08:00
Ric Szopa
ece66e050e
Redact away dbconfig password.
2012-11-14 12:53:32 -08:00
Sugu Sougoumarane
169f86c653
enforce strict mode & other misc fixes
2012-11-09 11:54:43 -08:00
Sugu Sougoumarane
f677ce365a
mysql: tests for QueryResult encoding
2012-11-08 10:26:36 -08:00
Sugu Sougoumarane
fb806cf4dc
tabletserver: introduce a more formal type system
2012-11-05 14:28:37 -08:00
Ric Szopa
fe0272ef1e
Use 1 << 20 as a Big Number instead of 1 << 30.
2012-10-11 11:44:31 -07:00
Alain Jobart
1485664c43
Splitting the data structures used in mysql-related RPC into proto submodules.
...
LGTM Sugu and Mike.
2012-09-24 15:14:48 -07:00
Sugu Sougoumarane
8d927b230b
cleaner & more efficient mysql.go
2012-09-17 13:14:17 -07:00
Sugu Sougoumarane
5fe7099d6f
standardize on a single way to use mysql
2012-09-13 11:12:27 -07:00
Alain Jobart
90e0a63589
Code clean-up: renaming a few 'self' into variable names,
...
to follow newer code conventions.
LGTM: Sugu
2012-08-28 16:05:34 -07:00
Alain Jobart
1138c656aa
Now using rpcplus package everywhere, and adding support for streaming
...
mysql queries using a streaming RPC API. Only the go client side is
in here, the python client code will be next.
LGTM by Mike and Sugu over the last couple weeks.
2012-08-27 16:26:06 -07:00
Sugu Sougoumarane
e448f50dcf
config revamp: convert dbconfig maps to actual structs
2012-08-08 16:11:15 -07:00
Sugu Sougoumarane
ca3b52dec2
Make vttablet serve queries and use info from my.cnf
2012-08-02 16:08:50 -07:00
Sugu Sougoumarane
e0570f33e8
mysql.go: add library init call for thread safety.
2012-07-11 17:57:03 -07:00
Mike Solomon
898507dd0d
fix intermittent segfault under mysql error conditions
2012-07-06 00:33:31 -07:00
Ric Szopa
02115e7048
Change the license notice to be shorter and refer to the license file.
2012-06-07 11:55:06 -07:00
Sugu Sougoumarane
11eb137452
optimzation stage1:
...
- Cache & reuse field info for selects
- Optimization in QueryBson for reading
- Move the defer closure out of Execute into its own function
- Delete unused execCacheResult
2012-04-24 11:22:23 -07:00
Sugu Sougoumarane
e2e3e0ef00
copyright deviolation
2012-04-01 21:58:56 -07:00
Sugu Sougoumarane
69b96741f9
refactor: created new reusable pools package by pulling code out of connection pools.
2012-03-16 17:07:27 -07:00
Sugu Sougoumarane
a082e88409
updated to go's new build system and weekly.2012-03-04
2012-03-11 17:53:40 -07:00
Sugu Sougoumarane
72a862e6b3
initial source code check-in.
2012-02-24 23:30:03 -08:00