summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/connect.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/connect.inc')
-rw-r--r--ext/mysqli/tests/connect.inc22
1 files changed, 19 insertions, 3 deletions
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index aa1d30a17e..decdd87d51 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -3,8 +3,24 @@
/* default values are localhost, root and empty password
Change the values if you use another configuration */
- $host = "localhost";
- $user = "root";
- $passwd = "";
+ $driver = new mysqli_driver;
+
+ if (!$driver->embedded) {
+ $host = "localhost";
+ $user = "root";
+ $passwd = "";
+
+ $driver->embedded_server_start(FALSE, NULL, NULL);
+ } else {
+ $path = realpath('./ext/mysqli/tests');
+ $host = $user = $passwd = NULL;
+ $args = array(
+ "--datadir=$path",
+ "--innodb_data_home_dir=$path",
+ "--innodb_data_file_path=ibdata1:10M:autoextend",
+ "--log-error=$path/testrun.log"
+ );
+ $driver->embedded_server_start(TRUE, $args, NULL);
+ }
?>