cache: Process response to COM_QUERY

When a query has been sent to a backend, the response is now
processed to the extent that the cache is capable of figuring
out how many rows are being returned, so that the cache setting
`max_resultset_rows` can be processed.

The code is now also written in such a manner that it should be
insensitive to how a package has been split up into a chain of
GWBUFs.
This commit is contained in:
Johan Wikman
2016-09-19 13:30:05 +03:00
parent 7e2a21de9e
commit 4d1eb6fe85
3 changed files with 501 additions and 87 deletions

View File

@ -87,15 +87,26 @@ The setting can be changed to `any`, provided fully qualified names
are always used or if the names of tables in different databases are
different.
#### `max_resultset_rows`
Specifies the maximum number of rows a resultset can have in order to be
stored in the cache. A resultset larger than this, will not be stored.
```
max_resultset_rows=1000
```
Zero or a negative value is interpreted as no limitation.
The default value is `-1`.
#### `max_resultset_size`
Specifies the maximum size a resultset can have, measured in kibibytes,
in order to be stored in the cache. A resultset larger than this, will
not be stored.
```
max_resultset_size=64
max_resultset_size=128
```
The default value is TBD.
The default value is 64.
#### `ttl`