Fixed the input for setting the default value for fields.
---- Changes since 1.470 ----
Added code to detect a password in /root/.my.cnf which overrides the MYSQL_PWD variable, and thus causes login failures.
+---- Changes since 1.480 ----
+MySQL stored procedures are now included in backups, where supported.
}
}
+# supports_routines()
+# Returns 1 if mysqldump supports routines
+sub supports_routines
+{
+local $out = &backquote_command("$config{'mysqldump'} --help 2>&1 </dev/null");
+return $out =~ /--routines/ ? 1 : 0;
+}
+
# supports_views()
# Returns 1 if this MySQL install supports views
sub supports_views
local $compatiblesql = @$compatible ?
"--compatible=".join(",", @$compatible) : "";
local $quotingsql = &supports_quoting() ? "--quote-names" : "";
+local $routinessql = &supports_routines() ? "--routines" : "";
local $tablessql = join(" ", map { quotemeta($_) } @$tables);
-local $cmd = "$config{'mysqldump'} $authstr $dropsql $wheresql $charsetsql $compatiblesql $quotingsql ".quotemeta($db)." $tablessql 2>&1 $writer";
+local $cmd = "$config{'mysqldump'} $authstr $dropsql $wheresql $charsetsql $compatiblesql $quotingsql $routinessql ".quotemeta($db)." $tablessql 2>&1 $writer";
if ($user && $user ne "root") {
$cmd = &command_as_user($user, undef, $cmd);
}