From c4383199ece29a2370aa740a86b4eb8d709b1cd5 Mon Sep 17 00:00:00 2001 From: Miguel Molina Date: Wed, 16 Oct 2019 15:55:23 +0200 Subject: [PATCH 1/2] vendor: upgrade go-mysql-server Signed-off-by: Miguel Molina --- CHANGELOG.md | 20 +++++++++++++++----- docs/using-gitbase/functions.md | 2 +- docs/using-gitbase/supported-syntax.md | 6 +++--- go.mod | 2 +- go.sum | 18 +++++++----------- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09071bb0e..bee5495ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## Added -- Added BLAME function. -## Fixed +### Fixed + +- Only optimizer sorted DISTINCT if the first column on the order by is on the distinct schema. ([#976](https://github.com/src-d/gitbase/issues/976)) - Removed redundant commit information from BLAME results. - Don't abort, just warn, on git.Blame errors. +### Added + +- Added BLAME function. +- Better error messages for index failures. +- Implemented subquery expressions. + +### Changed + +- Use the minimum integer size as necessary when parsing literals. + ## [0.24.0-rc2] - 2019-10-02 -## Fixed +### Fixed - plan: return types in lowercase in SHOW CREATE TABLE ([#827](https://github.com/src-d/go-mysql-server/pull/827)) - analyzer: do not erase sort node when pushing it down ([#818](https://github.com/src-d/go-mysql-server/pull/818)) @@ -23,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add CHAR and DATETIME types support ([#823](https://github.com/src-d/go-mysql-server/pull/823)) - Also check sockets bind to tcp6 and fail on all closed sockets ([#824](https://github.com/src-d/go-mysql-server/pull/824)) -## Changed +### Changed - Added LIKE test with newlines ([#820](https://github.com/src-d/go-mysql-server/pull/820)) - Convert LIKE patterns to specific Go regexes ([#817](https://github.com/src-d/go-mysql-server/pull/817)) diff --git a/docs/using-gitbase/functions.md b/docs/using-gitbase/functions.md index 4ca6030db..875a2efce 100644 --- a/docs/using-gitbase/functions.md +++ b/docs/using-gitbase/functions.md @@ -39,10 +39,10 @@ These are all functions that are available because they are implemented in `go-m |`CONCAT_WS(sep, ...)`| concatenates any group of fields into a single string. The first argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated. The separator can be a string, as can the rest of the arguments. If the separator is NULL, the result is NULL.| |`CONNECTION_ID()`| returns the current connection ID.| |`COUNT(expr)`| returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.| -|`DATE(date)`| returns the date part of the given `date`.| |`DATE_ADD(date, interval)`| adds the interval to the given `date`.| |`DATE_SUB(date, interval)`| subtracts the interval from the given `date`.| |`DAY(date)`| is a synonym for DAYOFMONTH().| +|`DATE(date)`| returns the date part of the given `date`.| |`DAYOFMONTH(date)`| returns the day of the month (0-31).| |`DAYOFWEEK(date)`| returns the day of the week of the given `date`.| |`DAYOFYEAR(date)`| returns the day of the year of the given `date`.| diff --git a/docs/using-gitbase/supported-syntax.md b/docs/using-gitbase/supported-syntax.md index a316dffe1..6b89188c0 100644 --- a/docs/using-gitbase/supported-syntax.md +++ b/docs/using-gitbase/supported-syntax.md @@ -80,9 +80,6 @@ - div - % -## Subqueries -- supported only as tables, not as expressions. - ## Functions - ARRAY_LENGTH - CEIL @@ -133,3 +130,6 @@ - WEEKDAY - YEAR - YEARWEEK + +## Subqueries +Supported both as a table and as expressions but they can't access the parent query scope. diff --git a/go.mod b/go.mod index 879af84eb..68ab98a9b 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/src-d/go-borges v0.1.3 github.com/src-d/go-git v4.7.0+incompatible github.com/src-d/go-git-fixtures v3.5.1-0.20190605154830-57f3972b0248+incompatible - github.com/src-d/go-mysql-server v0.4.1-0.20191001122120-b09e8c1c8ab9 + github.com/src-d/go-mysql-server v0.6.1-0.20191016135058-b8d91559c9a9 github.com/stretchr/testify v1.3.0 github.com/uber-go/atomic v1.4.0 // indirect github.com/uber/jaeger-client-go v2.16.0+incompatible diff --git a/go.sum b/go.sum index 3d4964cf6..e896e390a 100644 --- a/go.sum +++ b/go.sum @@ -244,15 +244,14 @@ github.com/src-d/enry/v2 v2.0.0/go.mod h1:qQeCMRwzMF3ckeGr+h0tJLdxXnq+NVZsIDMELj github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= -github.com/src-d/go-borges v0.1.1 h1:URkX6ycDzodt5n6mAF54cdjmmAMSWIyuL12ga/E5/sM= -github.com/src-d/go-borges v0.1.1/go.mod h1:q/ufK0FXUS0ngH1Crd1TyirdtUM4dl/5ky2Oxiaw4YA= +github.com/src-d/go-borges v0.1.3 h1:EgNqVy6Mw6wT3mx5AIUWjOAJJJQ6yuiDimi8JV/R2hE= github.com/src-d/go-borges v0.1.3/go.mod h1:2lbHENELjpD+6bTOOnrnGEpVPMmO+wBGtYwzvQdr/Zc= github.com/src-d/go-git v4.7.0+incompatible h1:IYSSnbAHeKmsfbQFi9ozbid+KNh0bKjlorMfQehQbcE= github.com/src-d/go-git v4.7.0+incompatible/go.mod h1:1bQciz+hn0jzPQNsYj0hDFZHLJBdV7gXE2mWhC7EkFk= github.com/src-d/go-git-fixtures v3.5.1-0.20190605154830-57f3972b0248+incompatible h1:A5bKevhs9C//Nh8QV0J+1KphEaIa25cDe1DTs/yPxDI= github.com/src-d/go-git-fixtures v3.5.1-0.20190605154830-57f3972b0248+incompatible/go.mod h1:XcIQp7L+k0pgfTqfbaTKj3kxlBv8kYOKZ/tKNXbZFLg= -github.com/src-d/go-mysql-server v0.4.1-0.20191001122120-b09e8c1c8ab9 h1:q/CX2DbMybt2m9OlJFrzOtTVe8visM/q752UnA0mVPo= -github.com/src-d/go-mysql-server v0.4.1-0.20191001122120-b09e8c1c8ab9/go.mod h1:DdWE0ku/mNfuLsRJIrHeHpDtB7am+6oopxEsQKmVkx8= +github.com/src-d/go-mysql-server v0.6.1-0.20191016135058-b8d91559c9a9 h1:g2gm/Yk+p5yljdqQLAn/thqBtuV5t47GGuVvdKnmmkk= +github.com/src-d/go-mysql-server v0.6.1-0.20191016135058-b8d91559c9a9/go.mod h1:DdWE0ku/mNfuLsRJIrHeHpDtB7am+6oopxEsQKmVkx8= github.com/src-d/go-oniguruma v1.0.0/go.mod h1:chVbff8kcVtmrhxtZ3yBVLLquXbzCS6DrxQaAK/CeqM= github.com/src-d/go-oniguruma v1.1.0 h1:EG+Nm5n2JqWUaCjtM0NtutPxU7ZN5Tp50GWrrV8bTww= github.com/src-d/go-oniguruma v1.1.0/go.mod h1:chVbff8kcVtmrhxtZ3yBVLLquXbzCS6DrxQaAK/CeqM= @@ -331,9 +330,7 @@ golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190520201301-c432e742b0af/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190609082536-301114b31cce/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190618155005-516e3c20635f h1:dHNZYIYdq2QuU6w73vZ/DzesPbVlZVYZTtTZmrnsbQ8= -golang.org/x/sys v0.0.0-20190618155005-516e3c20635f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e h1:D5TXcfTk7xF7hvieo4QErS3qqCB4teTffacDWr7CI+0= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -366,12 +363,12 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/src-d/go-billy-siva.v4 v4.5.1 h1:+UdpGGmJjANhXwg6TCcTVbACUqsbtX19QvJ9AdeX4ts= -gopkg.in/src-d/go-billy-siva.v4 v4.5.1/go.mod h1:4wKeCzOCSsdyFeM5+58M6ObU6FM+lZT12p7zm7A+9n0= +gopkg.in/src-d/go-billy-siva.v4 v4.6.0 h1:HO5m7lqYewIZ3Otay3IkQg3gFznW8Gy9HIbHWm1mYX0= gopkg.in/src-d/go-billy-siva.v4 v4.6.0/go.mod h1:EcgzPxovlWGD+lZFFriUleL3EVZ/SPs6CH2FOE/eooI= gopkg.in/src-d/go-billy.v4 v4.2.1/go.mod h1:tm33zBoOwxjYHZIE+OV8bxTWFMJLrconzFMd38aARFk= gopkg.in/src-d/go-billy.v4 v4.3.0 h1:KtlZ4c1OWbIs4jCv5ZXrTqG8EQocr0g/d4DjNg70aek= gopkg.in/src-d/go-billy.v4 v4.3.0/go.mod h1:tm33zBoOwxjYHZIE+OV8bxTWFMJLrconzFMd38aARFk= +gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-errors.v1 v1.0.0 h1:cooGdZnCjYbeS1zb1s6pVAAimTdKceRrpn7aKOnNIfc= gopkg.in/src-d/go-errors.v1 v1.0.0/go.mod h1:q1cBlomlw2FnDBDNGlnh6X0jPihy+QxZfMMNxPCbdYg= @@ -382,8 +379,7 @@ gopkg.in/src-d/go-git.v4 v4.11.0/go.mod h1:Vtut8izDyrM8BUVQnzJ+YvmNcem2J89EmfZYC gopkg.in/src-d/go-git.v4 v4.12.0 h1:CKgvBCJCcdfNnyXPYI4Cp8PaDDAmAPEN0CtfEdEAbd8= gopkg.in/src-d/go-git.v4 v4.12.0/go.mod h1:zjlNnzc1Wjn43v3Mtii7RVxiReNP0fIu9npcXKzuNp4= gopkg.in/src-d/go-log.v1 v1.0.2/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= -gopkg.in/src-d/go-siva.v1 v1.5.0 h1:WowvbZTlz0SPoV7WNCGktPSi2yRK78HPyXl7wYqDeHE= -gopkg.in/src-d/go-siva.v1 v1.5.0/go.mod h1:tk1jnIXawd/PTlRNWdr5V5lC0PttNJmu1fv7wt7IZlw= +gopkg.in/src-d/go-siva.v1 v1.7.0 h1:igjgSEFweZ2kEfRlGEJH767o8GJRiPWp8JmHDCe0Vdk= gopkg.in/src-d/go-siva.v1 v1.7.0/go.mod h1:ChxMHSRkICHZ9IbTlG3ihkuG7gc2RZPsIYh7OaXYvic= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/toqueteos/substring.v1 v1.0.2 h1:urLqCeMm6x/eTuQa1oZerNw8N1KNOIp5hD5kGL7lFsE= From 912b898f6483f17d3c9fedbdef16419da99116ed Mon Sep 17 00:00:00 2001 From: Miguel Molina Date: Wed, 16 Oct 2019 16:59:06 +0200 Subject: [PATCH 2/2] fix typo in changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Molina Co-Authored-By: Alejandro GarcĂ­a Montoro --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bee5495ef..35d37b09d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Only optimizer sorted DISTINCT if the first column on the order by is on the distinct schema. ([#976](https://github.com/src-d/gitbase/issues/976)) +- Only optimize sorted DISTINCT if the first column on the order by is on the distinct schema. ([#976](https://github.com/src-d/gitbase/issues/976)) - Removed redundant commit information from BLAME results. - Don't abort, just warn, on git.Blame errors.