@@ -5,6 +5,10 @@ MySQL native
5
5
[ ![ GitHub - Builds] ( https://github.com/mysql-d/mysql-native/actions/workflows/dub.yml/badge.svg )] ( https://github.com/mysql-d/mysql-native/actions/workflows/dub.yml )
6
6
[ ![ GitHub - Integration Tests] ( https://github.com/mysql-d/mysql-native/actions/workflows/integration-testing.yml/badge.svg )] ( https://github.com/mysql-d/mysql-native/actions/workflows/integration-testing.yml )
7
7
8
+ * NOTE: we are in the process of migrating to github actions. Documentation will
9
+ eventually be generated using github actions, and stored on github. This README
10
+ is in flux at the moment, and may contain outdated information*
11
+
8
12
A [ Boost-licensed] ( http://www.boost.org/LICENSE_1_0.txt ) native [ D] ( http://dlang.org )
9
13
client driver for MySQL and MariaDB.
10
14
@@ -89,7 +93,7 @@ void main(string[] args)
89
93
"SELECT * FROM `tablename` WHERE `name`=? OR `name`=?",
90
94
"Bob", "Bobby");
91
95
bobs.close(); // Skip them
92
-
96
+
93
97
Row[] rs = conn.query( // Same SQL as above, but only prepared once and is reused!
94
98
"SELECT * FROM `tablename` WHERE `name`=? OR `name`=?",
95
99
"Bob", "Ann").array; // Get ALL the rows at once
@@ -119,26 +123,41 @@ Additional notes
119
123
120
124
This requires MySQL server v4.1.1 or later, or a MariaDB server. Older
121
125
versions of MySQL server are obsolete, use known-insecure authentication,
122
- and are not supported by this package.
126
+ and are not supported by this package. Currently the github actions tests use
127
+ MySQL 5.7 and MariaDB 10. MySQL 8 is supported with ` mysql_native_password `
128
+ authentication, but is not currently tested. Expect this to change in the future.
123
129
124
130
Normally, MySQL clients connect to a server on the same machine via a Unix
125
131
socket on * nix systems, and through a named pipe on Windows. Neither of these
126
132
conventions is currently supported. TCP is used for all connections.
127
133
128
- For historical reference, see the [ old homepage ] ( http://britseyeview.com/software/ mysqln/ )
129
- for the original release of this project. Note, however, that version has
130
- become out-of-date.
134
+ Unfortunately, the original home page of Steve Teale's mysqln is no longer
135
+ available. You can see an archive on the [ Internet Archive wayback
136
+ machine ] ( https://web.archive.org/web/20120323165808/http://britseyeview.com/software/mysqln )
131
137
132
138
Developers - How to run the test suite
133
139
--------------------------------------
134
140
135
- This package contains various unittests and integration tests. To run them,
136
- run ` run-tests ` .
141
+ Unittests that do not require an actual server are located in the library
142
+ codebase. At the moment, there is no mechanism for running just these tests
143
+ (this will likely change in the future).
144
+
145
+ Unittests that require a working server are all located in the
146
+ [ integration-tests] ( integration-tests ) subpackage. Due to a [ dub
147
+ issue] ( https://github.com/dlang/dub/issues/2136 ) , the integration tests are run
148
+ using the [ integration-tests-phobos] ( integration-tests-phobos ) and
149
+ [ integration-tests-vibe] ( integration-tests-vibe ) subpackages. At some point, if this dub issue
150
+ is fixed, they will simply become configurations in the main integration-tests
151
+ repository. You can run these directly from the main repository folder by
152
+ issuing the commands:
153
+
154
+ ``` sh
155
+ dub run :integration-tests-phobos
156
+ dub run :integration-tests-vibe
157
+ ```
137
158
138
- The first time you run ` run-tests ` , it will automatically create a
139
- file ` testConnectionStr.txt ` in project's base diretory and then exit.
140
- This file is deliberately not contained in the source repository
141
- because it's specific to your system.
159
+ The first time you run an integration test, the file ` testConnectionStr.txt `
160
+ will be created in your current directory
142
161
143
162
Open the ` testConnectionStr.txt ` file and verify the connection settings
144
163
inside, modifying them as needed, and if necessary, creating a test user and
@@ -148,6 +167,9 @@ The tests will completely clobber anything inside the db schema provided,
148
167
but they will ONLY modify that one db schema. No other schema will be
149
168
modified in any way.
150
169
151
- After you've configured the connection string, run ` run-tests ` again
152
- and their tests will be compiled and run, first using Phobos sockets,
153
- then using Vibe sockets.
170
+ After you've configured the connection string, run the integration tests again.
171
+
172
+ The integration tests use
173
+ [ unit-threaded] ( https://code.dlang.org/packages/unit-threaded ) which allows for
174
+ running individual named tests. Use this for running specific tests instead of
175
+ the whole suite.
0 commit comments