Display the number of tables and records created when executing SQL for a restore.
---- Changes since 1.430 ----
Improved the input for setting the default value for new fields, and added support for CURRENT_TIMESTAMP.
+---- Changes since 1.440 ----
+The correct character set is ready from my.cnf when connecting using DBI mode, thanks to jianxia.
+The password is passed to all MySQL commands using the MYSQL_PWD environment variables on systems running MySQL 4.1 and later, version 5.1 in older Webmin releases.
local $host = defined($_[2]) ? $_[2] : $config{'host'};
local $port = defined($_[3]) ? $_[3] : $config{'port'};
local $sock = defined($_[4]) ? $_[4] : $config{'sock'};
-$ENV{'MYSQL_PWD'} = $pass;
+if (&supports_env_pass()) {
+ $ENV{'MYSQL_PWD'} = $pass;
+ }
return ($sock ? " -S $sock" : "").
($host ? " -h $host" : "").
($port ? " -P $port" : "").
($login ? " -u ".quotemeta($login) : "").
- ($mysql_version >= 5.1 ? "" : # Password comes from environment
+ (&supports_env_pass() ? "" : # Password comes from environment
$pass && $mysql_version >= 4.1 ? " --password=".quotemeta($pass) :
$pass ? " -p".quotemeta($pass) : "");
}
}
}
+# supports_env_pass()
+# Returns 1 if passing the password via an environment variable is supported
+sub supports_env_pass
+{
+return $mysql_version >= 4.1;
+}
+
# user_priv_cols()
# Returns the number of columns used for privileges in the user table
sub user_priv_cols