Skip to content

Commit 821e6b9

Browse files
authored
Merge pull request #951 from ajnavarro/update-go-mysql-server-210819
Upgrade go-mysql-server version
2 parents d1ba8c0 + e209cf8 commit 821e6b9

File tree

5 files changed

+79
-79
lines changed

5 files changed

+79
-79
lines changed

Diff for: docs/using-gitbase/configuration.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
|:-----|:-----|:------------|
2727
|`INMEMORY_JOINS`|environment|If set it will perform all joins in memory. Default is off.|
2828
|`inmemory_joins`|session|If set it will perform all joins in memory. Default is off. This has precedence over `INMEMORY_JOINS`.|
29-
|`MAX_MEMORY_JOIN`|environment|The maximum number of memory, in megabytes, that can be consumed by go-mysql-server before switching to multipass mode in joins. Default is the 20% of all available physical memory.|
30-
|`max_memory_joins`|session|The maximum number of memory, in megabytes, that can be consumed by go-mysql-server before switching to multipass mode in joins. Default is the 20% of all available physical memory. This has precedence over `MAX_MEMORY_JOIN`.|
29+
|`MAX_MEMORY`|environment|The maximum number of memory, in megabytes, that can be consumed by go-mysql-server. Any in-memory caches or computations will no longer try to use memory when the limit is reached. Note that this may cause certain queries to fail if there is not enough memory available, such as queries using DISTINCT, ORDER BY or GROUP BY with groupings.|
3130
|`DEBUG_ANALYZER`|environment|If set, the analyzer will print debug messages. Default is off.|
3231
|`PILOSA_INDEX_THREADS`|environment|Number of threads used in index creation. Default is the number of cores available in the machine.|
3332
|`pilosa_index_threads`|environment|Number of threads used in index creation. Default is the number of cores available in the machine. This has precedence over `PILOSA_INDEX_THREADS`.|

Diff for: docs/using-gitbase/functions.md

+65-64
Original file line numberDiff line numberDiff line change
@@ -26,70 +26,71 @@ These are all functions that are available because they are implemented in `go-m
2626
<!-- BEGIN FUNCTIONS -->
2727
| Name | Description |
2828
|:-------------|:-------------------------------------------------------------------------------------------------------------------------------|
29-
|`ARRAY_LENGTH(json)`|If the json representation is an array, this function returns its size.|
30-
|`AVG(expr)`|Returns the average value of expr in all rows.|
31-
|`CEIL(number)`|Return the smallest integer value that is greater than or equal to `number`.|
32-
|`CEILING(number)`|Return the smallest integer value that is greater than or equal to `number`.|
33-
|`CHAR_LENGTH(str)`|Return the length of the string in characters.|
34-
|`COALESCE(...)`|The function returns the first non-null value in a list.|
35-
|`CONCAT(...)`|Concatenate any group of fields into a single string.|
36-
|`CONCAT_WS(sep, ...)`|Concatenate 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.|
37-
|`CONNECTION_ID()`|Return the current connection ID.|
38-
|`COUNT(expr)`| Returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.|
39-
|`DATE_ADD(date, interval)`|Adds the interval to the given date.|
40-
|`DATE_SUB(date, interval)`|Subtracts the interval from the given date.|
41-
|`DAY(date)`|Synonym for DAYOFMONTH().|
42-
|`DATE(date)`|Returns the date part of the given date.|
43-
|`DAYOFMONTH(date)`|Return the day of the month (0-31).|
44-
|`DAYOFWEEK(date)`|Returns the day of the week of the given date.|
45-
|`DAYOFYEAR(date)`|Returns the day of the year of the given date.|
46-
|`FIRST(expr)`|Returns the first value in a sequence of elements of an aggregation.|
47-
|`FLOOR(number)`|Returns the largest integer value that is less than or equal to `number`.|
48-
|`FROM_BASE64(str)`|Decodes the base64-encoded string str.|
49-
|`GREATEST(...)`|Returns the greatest numeric or string value.|
50-
|`HOUR(date)`|Returns the hours of the given date.|
51-
|`IFNULL(expr1, expr2)`|If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2.|
52-
|`IS_BINARY(blob)`|Returns whether a BLOB is a binary file or not.|
53-
|`JSON_EXTRACT(json_doc, path, ...)`|Extracts data from a json document using json paths. Extracting a string will result in that string being quoted. To avoid this, use `JSON_UNQUOTE(JSON_EXTRACT(json_doc, path, ...))`.|
54-
|`JSON_UNQUOTE(json)`|Unquotes JSON value and returns the result as a utf8mb4 string.|
55-
|`LAST(expr)`|Returns the last value in a sequence of elements of an aggregation.|
56-
|`LEAST(...)`|Returns the smaller numeric or string value.|
57-
|`LENGTH(str)`|Return the length of the string in bytes.|
58-
|`LN(X)`|Return the natural logarithm of X.|
59-
|`LOG(X), LOG(B, X)`|If called with one parameter, this function returns the natural logarithm of X. If called with two parameters, this function returns the logarithm of X to the base B. If X is less than or equal to 0, or if B is less than or equal to 1, then NULL is returned.|
60-
|`LOG10(X)`|Returns the base-10 logarithm of X.|
61-
|`LOG2(X)`|Returns the base-2 logarithm of X.|
62-
|`LOWER(str)`|Returns the string str with all characters in lower case.|
63-
|`LPAD(str, len, padstr)`|Return the string argument, left-padded with the specified string.|
64-
|`LTRIM(str)`|Returns the string str with leading space characters removed.|
65-
|`MAX(expr)`|Returns the maximum value of expr in all rows.|
66-
|`MID(str, pos, [len])`|Return a substring from the provided string starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
67-
|`MIN(expr)`|Returns the minimum value of expr in all rows.|
68-
|`MINUTE(date)`|Returns the minutes of the given date.|
69-
|`MONTH(date)`|Returns the month of the given date.|
70-
|`NOW()`|Returns the current timestamp.|
71-
|`NULLIF(expr1, expr2)`|Returns NULL if expr1 = expr2 is true, otherwise returns expr1.|
72-
|`POW(X, Y)`|Returns the value of X raised to the power of Y.|
73-
|`REPEAT(str, count)`|Returns a string consisting of the string str repeated count times.|
74-
|`REPLACE(str,from_str,to_str)`|Returns the string str with all occurrences of the string from_str replaced by the string to_str.|
75-
|`REVERSE(str)`|Returns the string str with the order of the characters reversed.|
76-
|`ROUND(number, decimals)`|Round the `number` to `decimals` decimal places.|
77-
|`RPAD(str, len, padstr)`|Returns the string str, right-padded with the string padstr to a length of len characters.|
78-
|`RTRIM(str)`|Returns the string str with trailing space characters removed.|
79-
|`SECOND(date)`|Returns the seconds of the given date.|
80-
|`SLEEP(seconds)`|Wait for the specified number of seconds (can be fractional).|
81-
|`SOUNDEX(str)`|Returns the soundex of a string.|
82-
|`SPLIT(str,sep)`|Receives a string and a separator and returns the parts of the string split by the separator as a JSON array of strings.|
83-
|`SQRT(X)`|Returns the square root of a nonnegative number X.|
84-
|`SUBSTR(str, pos, [len])`|Return a substring from the provided string starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
85-
|`SUBSTRING(str, pos, [len])`|Return a substring from the provided string starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
86-
|`SUM(expr)`|Returns the sum of expr in all rows.|
87-
|`TO_BASE64(str)`|Encodes the string str in base64 format.|
88-
|`TRIM(str)`|Returns the string str with all spaces removed.|
89-
|`UPPER(str)`|Returns the string str with all characters in upper case.|
90-
|`WEEKDAY(date)`|Returns the weekday of the given date.|
91-
|`YEAR(date)`|Returns the year of the given date.|
92-
|`YEARWEEK(date, mode)`|Returns year and week for a date. The year in the result may be different from the year in the date argument for the first and the last week of the year.|
29+
|`ARRAY_LENGTH(json)`|if the json representation is an array, this function returns its size.|
30+
|`AVG(expr)`| returns the average value of expr in all rows.|
31+
|`CEIL(number)`| returns the smallest integer value that is greater than or equal to `number`.|
32+
|`CEILING(number)`| returns the smallest integer value that is greater than or equal to `number`.|
33+
|`CHAR_LENGTH(str)`| returns the length of the string in characters.|
34+
|`COALESCE(...)`| returns the first non-null value in a list.|
35+
|`CONCAT(...)`| concatenates any group of fields into a single string.|
36+
|`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.|
37+
|`CONNECTION_ID()`| returns the current connection ID.|
38+
|`COUNT(expr)`| returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.|
39+
|`DATE_ADD(date, interval)`| adds the interval to the given `date`.|
40+
|`DATE_SUB(date, interval)`| subtracts the interval from the given `date`.|
41+
|`DAY(date)`| is a synonym for DAYOFMONTH().|
42+
|`DATE(date)`| returns the date part of the given `date`.|
43+
|`DAYOFMONTH(date)`| returns the day of the month (0-31).|
44+
|`DAYOFWEEK(date)`| returns the day of the week of the given `date`.|
45+
|`DAYOFYEAR(date)`| returns the day of the year of the given `date`.|
46+
|`FIRST(expr)`| returns the first value in a sequence of elements of an aggregation.|
47+
|`FLOOR(number)`| returns the largest integer value that is less than or equal to `number`.|
48+
|`FROM_BASE64(str)`| decodes the base64-encoded string `str`.|
49+
|`GREATEST(...)`| returns the greatest numeric or string value.|
50+
|`HOUR(date)`| returns the hours of the given `date`.|
51+
|`IFNULL(expr1, expr2)`| if `expr1` is not NULL, it returns `expr1`; otherwise it returns `expr2`.|
52+
|`IS_BINARY(blob)`| returns whether a `blob` is a binary file or not.|
53+
|`JSON_EXTRACT(json_doc, path, ...)`| extracts data from a json document using json paths. Extracting a string will result in that string being quoted. To avoid this, use `JSON_UNQUOTE(JSON_EXTRACT(json_doc, path, ...))`.|
54+
|`JSON_UNQUOTE(json)`| unquotes JSON value and returns the result as a utf8mb4 string.|
55+
|`LAST(expr)`| returns the last value in a sequence of elements of an aggregation.|
56+
|`LEAST(...)`| returns the smaller numeric or string value.|
57+
|`LENGTH(str)`| returns the length of the string in bytes.|
58+
|`LN(X)`| returns the natural logarithm of `X`.|
59+
|`LOG(X), LOG(B, X)`| if called with one parameter, this function returns the natural logarithm of `X`. If called with two parameters, this function returns the logarithm of `X` to the base `B`. If `X` is less than or equal to 0, or if `B` is less than or equal to 1, then NULL is returned.|
60+
|`LOG10(X)`| returns the base-10 logarithm of `X`.|
61+
|`LOG2(X)`| returns the base-2 logarithm of `X`.|
62+
|`LOWER(str)`| returns the string `str` with all characters in lower case.|
63+
|`LPAD(str, len, padstr)`| returns the string `str`, left-padded with the string `padstr` to a length of `len` characters.|
64+
|`LTRIM(str)`| returns the string `str` with leading space characters removed.|
65+
|`MAX(expr)`| returns the maximum value of `expr` in all rows.|
66+
|`MID(str, pos, [len])`| returns a substring from the provided string starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
67+
|`MIN(expr)`| returns the minimum value of `expr` in all rows.|
68+
|`MINUTE(date)`| returns the minutes of the given `date`.|
69+
|`MONTH(date)`| returns the month of the given `date`.|
70+
|`NOW()`| returns the current timestamp.|
71+
|`NULLIF(expr1, expr2)`| returns NULL if `expr1 = expr2` is true, otherwise returns `expr1`.|
72+
|`POW(X, Y)`| returns the value of `X` raised to the power of `Y`.|
73+
|`REGEXP_MATCHES(text, pattern, [flags])`| returns an array with the matches of the `pattern` in the given `text`. Flags can be given to control certain behaviours of the regular expression. Currently, only the `i` flag is supported, to make the comparison case insensitive.|
74+
|`REPEAT(str, count)`| returns a string consisting of the string `str` repeated `count` times.|
75+
|`REPLACE(str,from_str,to_str)`| returns the string `str` with all occurrences of the string `from_str` replaced by the string `to_str`.|
76+
|`REVERSE(str)`| returns the string `str` with the order of the characters reversed.|
77+
|`ROUND(number, decimals)`| rounds the `number` to `decimals` decimal places.|
78+
|`RPAD(str, len, padstr)`| returns the string `str`, right-padded with the string `padstr` to a length of `len` characters.|
79+
|`RTRIM(str)`| returns the string `str` with trailing space characters removed.|
80+
|`SECOND(date)`| returns the seconds of the given `date`.|
81+
|`SLEEP(seconds)`| waits for the specified number of seconds (can be fractional).|
82+
|`SOUNDEX(str)`| returns the soundex of a string.|
83+
|`SPLIT(str,sep)`| returns the parts of the string `str` split by the separator `sep` as a JSON array of strings.|
84+
|`SQRT(X)`| returns the square root of a nonnegative number `X`.|
85+
|`SUBSTR(str, pos, [len])`| returns a substring from the string `str` starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
86+
|`SUBSTRING(str, pos, [len])`| returns a substring from the string `str` starting at `pos` with a length of `len` characters. If no `len` is provided, all characters from `pos` until the end will be taken.|
87+
|`SUM(expr)`| returns the sum of `expr` in all rows.|
88+
|`TO_BASE64(str)`| encodes the string `str` in base64 format.|
89+
|`TRIM(str)`| returns the string `str` with all spaces removed.|
90+
|`UPPER(str)`| returns the string `str` with all characters in upper case.|
91+
|`WEEKDAY(date)`| returns the weekday of the given `date`.|
92+
|`YEAR(date)`| returns the year of the given `date`.|
93+
|`YEARWEEK(date, mode)`| returns year and week for a date. The year in the result may be different from the year in the date argument for the first and the last week of the year.|
9394
<!-- END FUNCTIONS -->
9495

9596
## Note about uast, uast_mode, uast_xpath and uast_children functions

Diff for: docs/using-gitbase/supported-clients.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Supported clients
22

3-
These are the clients we actively test against to check are compatible with go-mysql-server. Other clients may also work, but we don't check on every build if we remain compatible with them.
3+
These are the clients we actively test against to check that they are compatible with go-mysql-server. Other clients may also work, but we don't check on every build if we remain compatible with them.
44

55
- Python
66
- [pymysql](#pymysql)
@@ -16,7 +16,7 @@ These are the clients we actively test against to check are compatible with go-m
1616
- Java/JVM
1717
- [mariadb-java-client](#mariadb-java-client)
1818
- Go
19-
- [go-mysql-driver/mysql](#go-mysql-driver-mysql)
19+
- [go-mysql-driver/mysql](#go-sql-drivermysql)
2020
- C
2121
- [mysql-connector-c](#mysql-connector-c)
2222
- Grafana
@@ -218,7 +218,7 @@ func main() {
218218
}
219219
```
220220

221-
### #mysql-connector-c
221+
### mysql-connector-c
222222

223223
```c
224224
#include <my_global.h>
@@ -271,4 +271,4 @@ int main(int argc, char **argv)
271271

272272
return 0;
273273
}
274-
```
274+
```

Diff for: go.mod

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ require (
88
github.com/gliderlabs/ssh v0.2.0 // indirect
99
github.com/go-kit/kit v0.8.0
1010
github.com/go-sql-driver/mysql v1.4.1
11-
github.com/hashicorp/golang-lru v0.5.1
11+
github.com/gorilla/handlers v1.4.0 // indirect
12+
github.com/hashicorp/golang-lru v0.5.3
1213
github.com/hhatto/gocloc v0.3.0
1314
github.com/jessevdk/go-flags v1.4.0
1415
github.com/miekg/dns v1.1.1 // indirect
@@ -19,7 +20,7 @@ require (
1920
github.com/src-d/go-borges v0.0.0-20190628121335-da12a84d60fd
2021
github.com/src-d/go-git v4.7.0+incompatible
2122
github.com/src-d/go-git-fixtures v3.5.1-0.20190605154830-57f3972b0248+incompatible
22-
github.com/src-d/go-mysql-server v0.4.1-0.20190730105128-550cc54baee2
23+
github.com/src-d/go-mysql-server v0.4.1-0.20190821121850-0e0249cf7bc0
2324
github.com/stretchr/testify v1.3.0
2425
github.com/uber-go/atomic v1.4.0 // indirect
2526
github.com/uber/jaeger-client-go v2.16.0+incompatible

0 commit comments

Comments
 (0)