summaryrefslogtreecommitdiff
path: root/sql-bench/crash-me.sh
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-08-29 18:16:18 +0300
committerMichael Widenius <monty@askmonty.org>2011-08-29 18:16:18 +0300
commit26bd06feef0d3f2e6f0a20457db1f8397117d2d5 (patch)
tree766645a0ced3ddb236edb669dea7d2254431d8e7 /sql-bench/crash-me.sh
parent282c303746d0653a927b0fcd16ecdc9b690bbb00 (diff)
downloadmariadb-git-26bd06feef0d3f2e6f0a20457db1f8397117d2d5.tar.gz
Updated crash-me for 5.3
sql-bench/crash-me.sh: Test types with microseconds Fixed some warnings from perl Code cleanups Don't write comments to .cfg file if run with --noverbose
Diffstat (limited to 'sql-bench/crash-me.sh')
-rw-r--r--sql-bench/crash-me.sh45
1 files changed, 28 insertions, 17 deletions
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh
index cc8659513c2..b6aabfbed87 100644
--- a/sql-bench/crash-me.sh
+++ b/sql-bench/crash-me.sh
@@ -39,7 +39,7 @@
# as such, and clarify ones such as "mediumint" with comments such as
# "3-byte int" or "same as xxx".
-$version="1.61";
+$version="1.62";
use Cwd;
use DBI;
@@ -619,6 +619,8 @@ check_reserved_words($dbh);
"numeric(9,2)","decimal(6,2)","dec(6,2)",
"bit", "bit(2)","bit varying(2)","float","float(8)","real",
"double precision", "date","time","timestamp",
+ "time(6)", "timestamp(6)",
+ "datetime", "datetime(6)",
"interval year", "interval year to month",
"interval month",
"interval day", "interval day to hour", "interval day to minute",
@@ -632,8 +634,7 @@ check_reserved_words($dbh);
"national char varying(20)","nchar varying(20)",
"national character varying(20)",
"timestamp with time zone");
-@odbc_types=("binary(1)","varbinary(1)","tinyint","bigint",
- "datetime");
+@odbc_types=("binary(1)","varbinary(1)","tinyint","bigint");
@extra_types=("blob","byte","long varbinary","image","text","text(10)",
"mediumtext",
"long varchar(1)", "varchar2(257)",
@@ -663,7 +664,7 @@ check_reserved_words($dbh);
foreach $types (@types)
{
print "\nSupported $types->[0] types\n";
- $tmp=@$types->[1];
+ $tmp= $types->[1];
foreach $use_type (@$tmp)
{
$type=$use_type;
@@ -746,10 +747,14 @@ if (($limits{'type_extra_float(2_arg)'} eq "yes" ||
$result="exact";
}
$prompt="Storage of float values";
- print "$prompt: $result\n";
save_config_data("storage_of_float", $result, $prompt);
}
+if (defined($limits{'storage_of_float'}))
+{
+ print "Storage of float values: $limits{'storage_of_float'}\n";
+}
+
try_and_report("Type for row id", "rowid",
["rowid",
"create table crash_q (a rowid)",
@@ -1061,7 +1066,7 @@ try_and_report("Automatic row id", "automatic_rowid",
foreach $types (@types)
{
print "\nSupported $types->[0] functions\n";
- $tmp=@$types->[1];
+ $tmp= $types->[1];
foreach $type (@$tmp)
{
if (defined($limits{"func_$types->[0]_$type->[1]"}))
@@ -1136,7 +1141,7 @@ if ($limits{'functions'} eq 'yes')
foreach $types (@group_types)
{
print "\nSupported $types->[0] group functions\n";
- $tmp=@$types->[1];
+ $tmp= $types->[1];
foreach $type (@$tmp)
{
check_and_report("Group function $type->[0]",
@@ -3132,8 +3137,11 @@ $0 takes the following options:
Wait this long before restarting server.
--verbose
---noverbose
Log into the result file queries performed for determination parameter value
+ This causes rows starting with ' ###' to be logged into the .cnf file
+
+--noverbose
+ Don't log '###' quries to the .cnf file.
EOF
exit(0);
@@ -4349,7 +4357,7 @@ sub save_config_data
my $last_line_was_empty=0;
foreach $line (split /\n/, $log{$key})
{
- print CONFIG_FILE " ###$line\n"
+ print CONFIG_FILE "$log_prefix$line\n"
unless ( ($last_line_was_empty eq 1)
&& ($line =~ /^\s+$/) );
$last_line_was_empty= ($line =~ /^\s+$/)?1:0;
@@ -4369,7 +4377,7 @@ sub add_log
{
my $key = shift;
my $line = shift;
- $log{$key} .= $line . "\n" if ($opt_verbose);;
+ $log{$key} .= $line . "\n" if ($opt_verbose);
}
sub save_all_config_data
@@ -4391,14 +4399,17 @@ sub save_all_config_data
$tmp="$key=$limits{$key}";
print CONFIG_FILE $tmp . ("\t" x (int((32-min(length($tmp),32)+7)/8)+1)) .
"# $prompts{$key}\n";
- my $line;
- my $last_line_was_empty=0;
- foreach $line (split /\n/, $log{$key})
- {
- print CONFIG_FILE " ###$line\n" unless
- ( ($last_line_was_empty eq 1) && ($line =~ /^\s*$/));
+ if ($opt_verbose)
+ {
+ my $line;
+ my $last_line_was_empty=0;
+ foreach $line (split /\n/, $log{$key})
+ {
+ print CONFIG_FILE "$log_prefix$line\n" unless
+ ( ($last_line_was_empty eq 1) && ($line =~ /^\s*$/));
$last_line_was_empty= ($line =~ /^\s*$/)?1:0;
- };
+ }
+ }
}
close CONFIG_FILE;
}