You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* test error remaining
* run-test
* remove myrm
* json-extract handling normalized and fixed for mysql and maria both
* prittay
* prittay
* little bits
* moves reaction trigger outside of transaction
* docs, truncate fix, mysql infra
* expanded matrix
* minor Makefile cleanup
* updated default test version of mysql and comment
* updates docs to correctly show default test version of mysql
* update docs
* removed unnecessary newline
* removed unnecessary db-type env var in mysql docker-compose
* splitting the atom
* spark joy
* docs
|`ci`| Called when running continuous integration; runs all test cases in all SQL flavors. |
25
25
|`test-sqlite`| Run all tests with SQLite database. |
26
-
|`test-mariadb`| Run all tests with Mariadb database version 11.7.2. Set the `LRSQL_TEST_DB_VERSION` env var to a valid Postgres docker tag to use another version. |
26
+
|`test-mariadb`| Run all tests with Mariadb database version 11.7.2. Set the `LRSQL_TEST_DB_VERSION` env var to a valid MariaDB docker tag to use another version. |
27
+
|`test-mariadb-10.6`| Run all tests with Mariadb database version 10.6. |
28
+
|`test-mariadb-10.11`| Run all tests with Mariadb database version 10.11. |
29
+
|`test-mariadb-11.4`| Run all tests with Mariadb database version 11.4. |
30
+
|`test-mariadb-11.7.2`| Run all tests with Mariadb database version 11.7.2. |
31
+
|`test-mariadb-11.8`| Run all tests with Mariadb database version 11.8. |
32
+
|`test-mysql`| Run all tests with MySQL database version 8.0.44. Set the `LRSQL_TEST_DB_VERSION` env var to a valid MySQL docker tag to use another version. |
33
+
|`test-mysql-8.0.44`| Run all tests with MySQL database version 8.0.44 |
34
+
|`test-mysql-8.4`| Run all tests with MySQL database version 8.4 |
35
+
|`test-mysql-9.5.0`| Run all tests with MySQL database version 9.5.0 |
27
36
|`test-postgres`| Run all tests with Postgres database version 11. Set the `LRSQL_TEST_DB_VERSION` env var to a valid Postgres docker tag to use another version. |
28
37
|`test-postgres-11`| Run all tests with Postgres database version 11. |
29
38
|`test-postgres-12`| Run all tests with Postgres database version 12. |
@@ -43,10 +52,13 @@ The SQL LRS can be built or run with the following Makefile targets. They can be
43
52
|`sqlite`| Start a SQLite-based SQL LRS. |
44
53
|`postgres`| Start a Postgres SQL LRS. Requires a running Postgres instance. |
45
54
|`mariadb`| Start a Mariadb SQL LRS. Requires a running MariaDB instance. |
55
+
|`mysql`| Start a MySQL SQL LRS. Requires a running MySQL instance. |
46
56
|`run-jar-sqlite`| Similar to `sqlite` but it runs the finished Jar instead of directly from Clojure. Runs with a predefined default set of env variables. |
47
57
|`run-jar-sqlite-ephemeral`| Similar to `ephemeral` but it runs the finished Jar instead of directly from Clojure. Runs with a predefined default set of env variables. |
48
58
|`run-jar-postgres`| Similar to `postgres` but it runs the finished Jar instead of directly from Clojure. Runs with a predefined default set of env variables. |
49
59
|`run-jar-mariadb`| Similar to `mariadb` but it runs the finished Jar instead of directly from Clojure. Runs with a predefined default set of env variables. |
60
+
|`run-jar-mysql`| Similar to `mysql` but it runs the finished Jar instead of directly from Clojure. Runs with a predefined default set of env variables. |
To run SQL-LRS with MySQL, you need a properly configured MySQL instance. "Properly configured" really just means setting up a database, user, and password, and configuring SQL-LRS to connect to/with those.
8
+
9
+
## Environment Variables
10
+
11
+
You can configure MySQLDB by setting the relevant environment variables. Here is the `environment` entry from our [MySQL docker-compose demo](https://github.com/yetanalytics/lrsql/blob/main/dev-resources/mysql/docker-compose.yml)
12
+
13
+
```yml
14
+
environment:
15
+
MYSQL_ROOT_PASSWORD: lrsql_root_password
16
+
MYSQL_DATABASE: lrsql_db
17
+
MYSQL_USER: lrsql_user
18
+
MYSQL_PASSWORD: lrsql_password
19
+
```
20
+
21
+
(`MYSQL_ROOT_PASSWORD` can be anything, as SQL-LRS doesn't use the root account. It is only included here because the MySQL Docker container requires a root password setting. See the [MySQL docs](https://dev.mysql.com/doc/refman/8.4/en/docker-mysql-more-topics.html] for details)
22
+
23
+
The corresponding `lrsql.json` would look like
24
+
25
+
```json
26
+
{
27
+
...
28
+
"database": {
29
+
"dbHost": "0.0.0.0",
30
+
"dbPort": 3306,
31
+
"dbName": "lrsql_db",
32
+
"dbUser": "lrsql_user",
33
+
"dbPassword": "lrsql_password",
34
+
}
35
+
}
36
+
37
+
```
38
+
39
+
## Precision Limitation
40
+
41
+
SQL-LRS stores statements in its implementation databases as JSON. Due to the way MySQL interprets numbers in JSON, we **cannot guarantee more than 15 significant digits of precision** when using SQL-LRS alongside MySQL. If you need that much precision, consider using SQL-LRS alongside [Postgres](postgres.md) or [MariaDB](mariadb.md) instead.
0 commit comments