Commit 97bde935 authored by Michael Widenius's avatar Michael Widenius

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
parent 86e416a0
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
# as such, and clarify ones such as "mediumint" with comments such as # as such, and clarify ones such as "mediumint" with comments such as
# "3-byte int" or "same as xxx". # "3-byte int" or "same as xxx".
$version="1.61"; $version="1.62";
use Cwd; use Cwd;
use DBI; use DBI;
...@@ -619,6 +619,8 @@ check_reserved_words($dbh); ...@@ -619,6 +619,8 @@ check_reserved_words($dbh);
"numeric(9,2)","decimal(6,2)","dec(6,2)", "numeric(9,2)","decimal(6,2)","dec(6,2)",
"bit", "bit(2)","bit varying(2)","float","float(8)","real", "bit", "bit(2)","bit varying(2)","float","float(8)","real",
"double precision", "date","time","timestamp", "double precision", "date","time","timestamp",
"time(6)", "timestamp(6)",
"datetime", "datetime(6)",
"interval year", "interval year to month", "interval year", "interval year to month",
"interval month", "interval month",
"interval day", "interval day to hour", "interval day to minute", "interval day", "interval day to hour", "interval day to minute",
...@@ -632,8 +634,7 @@ check_reserved_words($dbh); ...@@ -632,8 +634,7 @@ check_reserved_words($dbh);
"national char varying(20)","nchar varying(20)", "national char varying(20)","nchar varying(20)",
"national character varying(20)", "national character varying(20)",
"timestamp with time zone"); "timestamp with time zone");
@odbc_types=("binary(1)","varbinary(1)","tinyint","bigint", @odbc_types=("binary(1)","varbinary(1)","tinyint","bigint");
"datetime");
@extra_types=("blob","byte","long varbinary","image","text","text(10)", @extra_types=("blob","byte","long varbinary","image","text","text(10)",
"mediumtext", "mediumtext",
"long varchar(1)", "varchar2(257)", "long varchar(1)", "varchar2(257)",
...@@ -663,7 +664,7 @@ check_reserved_words($dbh); ...@@ -663,7 +664,7 @@ check_reserved_words($dbh);
foreach $types (@types) foreach $types (@types)
{ {
print "\nSupported $types->[0] types\n"; print "\nSupported $types->[0] types\n";
$tmp=@$types->[1]; $tmp= $types->[1];
foreach $use_type (@$tmp) foreach $use_type (@$tmp)
{ {
$type=$use_type; $type=$use_type;
...@@ -746,10 +747,14 @@ if (($limits{'type_extra_float(2_arg)'} eq "yes" || ...@@ -746,10 +747,14 @@ if (($limits{'type_extra_float(2_arg)'} eq "yes" ||
$result="exact"; $result="exact";
} }
$prompt="Storage of float values"; $prompt="Storage of float values";
print "$prompt: $result\n";
save_config_data("storage_of_float", $result, $prompt); 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", try_and_report("Type for row id", "rowid",
["rowid", ["rowid",
"create table crash_q (a rowid)", "create table crash_q (a rowid)",
...@@ -1061,7 +1066,7 @@ try_and_report("Automatic row id", "automatic_rowid", ...@@ -1061,7 +1066,7 @@ try_and_report("Automatic row id", "automatic_rowid",
foreach $types (@types) foreach $types (@types)
{ {
print "\nSupported $types->[0] functions\n"; print "\nSupported $types->[0] functions\n";
$tmp=@$types->[1]; $tmp= $types->[1];
foreach $type (@$tmp) foreach $type (@$tmp)
{ {
if (defined($limits{"func_$types->[0]_$type->[1]"})) if (defined($limits{"func_$types->[0]_$type->[1]"}))
...@@ -1136,7 +1141,7 @@ if ($limits{'functions'} eq 'yes') ...@@ -1136,7 +1141,7 @@ if ($limits{'functions'} eq 'yes')
foreach $types (@group_types) foreach $types (@group_types)
{ {
print "\nSupported $types->[0] group functions\n"; print "\nSupported $types->[0] group functions\n";
$tmp=@$types->[1]; $tmp= $types->[1];
foreach $type (@$tmp) foreach $type (@$tmp)
{ {
check_and_report("Group function $type->[0]", check_and_report("Group function $type->[0]",
...@@ -3132,8 +3137,11 @@ $0 takes the following options: ...@@ -3132,8 +3137,11 @@ $0 takes the following options:
Wait this long before restarting server. Wait this long before restarting server.
--verbose --verbose
--noverbose
Log into the result file queries performed for determination parameter value 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 EOF
exit(0); exit(0);
...@@ -4349,7 +4357,7 @@ sub save_config_data ...@@ -4349,7 +4357,7 @@ sub save_config_data
my $last_line_was_empty=0; my $last_line_was_empty=0;
foreach $line (split /\n/, $log{$key}) 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) unless ( ($last_line_was_empty eq 1)
&& ($line =~ /^\s+$/) ); && ($line =~ /^\s+$/) );
$last_line_was_empty= ($line =~ /^\s+$/)?1:0; $last_line_was_empty= ($line =~ /^\s+$/)?1:0;
...@@ -4369,7 +4377,7 @@ sub add_log ...@@ -4369,7 +4377,7 @@ sub add_log
{ {
my $key = shift; my $key = shift;
my $line = shift; my $line = shift;
$log{$key} .= $line . "\n" if ($opt_verbose);; $log{$key} .= $line . "\n" if ($opt_verbose);
} }
sub save_all_config_data sub save_all_config_data
...@@ -4391,14 +4399,17 @@ sub save_all_config_data ...@@ -4391,14 +4399,17 @@ sub save_all_config_data
$tmp="$key=$limits{$key}"; $tmp="$key=$limits{$key}";
print CONFIG_FILE $tmp . ("\t" x (int((32-min(length($tmp),32)+7)/8)+1)) . print CONFIG_FILE $tmp . ("\t" x (int((32-min(length($tmp),32)+7)/8)+1)) .
"# $prompts{$key}\n"; "# $prompts{$key}\n";
if ($opt_verbose)
{
my $line; my $line;
my $last_line_was_empty=0; my $last_line_was_empty=0;
foreach $line (split /\n/, $log{$key}) foreach $line (split /\n/, $log{$key})
{ {
print CONFIG_FILE " ###$line\n" unless print CONFIG_FILE "$log_prefix$line\n" unless
( ($last_line_was_empty eq 1) && ($line =~ /^\s*$/)); ( ($last_line_was_empty eq 1) && ($line =~ /^\s*$/));
$last_line_was_empty= ($line =~ /^\s*$/)?1:0; $last_line_was_empty= ($line =~ /^\s*$/)?1:0;
}; }
}
} }
close CONFIG_FILE; close CONFIG_FILE;
} }
......
#This file is automaticly generated by crash-me 1.61 #This file is automaticly generated by crash-me 1.62
NEG=yes # update of column= -column NEG=yes # update of column= -column
Need_cast_for_null=no # Need to cast NULL for arithmetic Need_cast_for_null=no # Need to cast NULL for arithmetic
...@@ -31,7 +31,7 @@ comment_--=yes # -- as comment (ANSI) ...@@ -31,7 +31,7 @@ comment_--=yes # -- as comment (ANSI)
comment_/**/=yes # /* */ as comment comment_/**/=yes # /* */ as comment
comment_//=no # // as comment comment_//=no # // as comment
compute=no # Compute compute=no # Compute
connections=101 # Simultaneous connections (installation default) connections=152 # Simultaneous connections (installation default)
constraint_check=syntax only # Column constraints constraint_check=syntax only # Column constraints
constraint_check_named=syntax only # Named constraints constraint_check_named=syntax only # Named constraints
constraint_check_table=syntax only # Table constraints constraint_check_table=syntax only # Table constraints
...@@ -387,17 +387,17 @@ max_char_size=255 # max char() size ...@@ -387,17 +387,17 @@ max_char_size=255 # max char() size
max_column_name=64 # column name length max_column_name=64 # column name length
max_columns=2599 # Columns in table max_columns=2599 # Columns in table
max_conditions=85660 # OR and AND in WHERE max_conditions=85660 # OR and AND in WHERE
max_expressions=580 # simple expressions max_expressions=571 # simple expressions
max_index=+64 # max index max_index=+64 # max index
max_index_length=1000 # index length max_index_length=1000 # index length
max_index_name=64 # index name length max_index_name=64 # index name length
max_index_part_length=255 # max index part length max_index_part_length=255 # max index part length
max_index_parts=16 # index parts max_index_parts=32 # index parts
max_index_varchar_part_length=1000 # index varchar part length max_index_varchar_part_length=1000 # index varchar part length
max_row_length=65534 # max table row length (without blobs) max_row_length=65534 # max table row length (without blobs)
max_row_length_with_null=65502 # table row length with nulls (without blobs) max_row_length_with_null=65502 # table row length with nulls (without blobs)
max_select_alias_name=+512 # select alias name length max_select_alias_name=+512 # select alias name length
max_stack_expression=580 # stacked expressions max_stack_expression=571 # stacked expressions
max_table_alias_name=+512 # table alias name length max_table_alias_name=+512 # table alias name length
max_table_name=64 # table name length max_table_name=64 # table name length
max_text_size=1048543 # max text or blob size max_text_size=1048543 # max text or blob size
...@@ -422,7 +422,7 @@ null_in_unique=yes # null in unique index ...@@ -422,7 +422,7 @@ null_in_unique=yes # null in unique index
null_num_expr=yes # Is 1+NULL = NULL null_num_expr=yes # Is 1+NULL = NULL
nulls_in_unique=yes # null combination in unique index nulls_in_unique=yes # null combination in unique index
odbc_left_outer_join=yes # left outer join odbc style odbc_left_outer_join=yes # left outer join odbc style
operating_system=Linux 2.6.8-my i686 # crash-me tested on operating_system=Linux 2.6.37.6-0.7-desktop x86_64 # crash-me tested on
order_by=yes # Order by order_by=yes # Order by
order_by_alias=yes # Order by alias order_by_alias=yes # Order by alias
order_by_function=yes # Order by function order_by_function=yes # Order by function
...@@ -433,7 +433,7 @@ position_of_null_desc=last # Where is null values in sorted recordset (DESC) ...@@ -433,7 +433,7 @@ position_of_null_desc=last # Where is null values in sorted recordset (DESC)
primary_key_in_create=yes # primary key in create table primary_key_in_create=yes # primary key in create table
psm_functions=no # PSM functions (ANSI SQL) psm_functions=no # PSM functions (ANSI SQL)
psm_modules=no # PSM modules (ANSI SQL) psm_modules=no # PSM modules (ANSI SQL)
psm_procedures=no # PSM procedures (ANSI SQL) psm_procedures=yes # PSM procedures (ANSI SQL)
psm_trigger=no # Triggers (ANSI SQL) psm_trigger=no # Triggers (ANSI SQL)
query_size=1048574 # query size query_size=1048574 # query size
quote_ident_with_"=error # " as identifier quote (ANSI SQL) quote_ident_with_"=error # " as identifier quote (ANSI SQL)
...@@ -485,7 +485,7 @@ reserved_word_ansi-92/99_column=yes # Keyword COLUMN ...@@ -485,7 +485,7 @@ reserved_word_ansi-92/99_column=yes # Keyword COLUMN
reserved_word_ansi-92/99_commit=no # Keyword COMMIT reserved_word_ansi-92/99_commit=no # Keyword COMMIT
reserved_word_ansi-92/99_completion=no # Keyword COMPLETION reserved_word_ansi-92/99_completion=no # Keyword COMPLETION
reserved_word_ansi-92/99_connect=no # Keyword CONNECT reserved_word_ansi-92/99_connect=no # Keyword CONNECT
reserved_word_ansi-92/99_connection=yes # Keyword CONNECTION reserved_word_ansi-92/99_connection=no # Keyword CONNECTION
reserved_word_ansi-92/99_constraint=yes # Keyword CONSTRAINT reserved_word_ansi-92/99_constraint=yes # Keyword CONSTRAINT
reserved_word_ansi-92/99_constraints=no # Keyword CONSTRAINTS reserved_word_ansi-92/99_constraints=no # Keyword CONSTRAINTS
reserved_word_ansi-92/99_continue=yes # Keyword CONTINUE reserved_word_ansi-92/99_continue=yes # Keyword CONTINUE
...@@ -546,7 +546,7 @@ reserved_word_ansi-92/99_general=no # Keyword GENERAL ...@@ -546,7 +546,7 @@ reserved_word_ansi-92/99_general=no # Keyword GENERAL
reserved_word_ansi-92/99_get=no # Keyword GET reserved_word_ansi-92/99_get=no # Keyword GET
reserved_word_ansi-92/99_global=no # Keyword GLOBAL reserved_word_ansi-92/99_global=no # Keyword GLOBAL
reserved_word_ansi-92/99_go=no # Keyword GO reserved_word_ansi-92/99_go=no # Keyword GO
reserved_word_ansi-92/99_goto=yes # Keyword GOTO reserved_word_ansi-92/99_goto=no # Keyword GOTO
reserved_word_ansi-92/99_grant=yes # Keyword GRANT reserved_word_ansi-92/99_grant=yes # Keyword GRANT
reserved_word_ansi-92/99_group=yes # Keyword GROUP reserved_word_ansi-92/99_group=yes # Keyword GROUP
reserved_word_ansi-92/99_having=yes # Keyword HAVING reserved_word_ansi-92/99_having=yes # Keyword HAVING
...@@ -933,7 +933,7 @@ reserved_word_extra_setuser=no # Keyword SETUSER ...@@ -933,7 +933,7 @@ reserved_word_extra_setuser=no # Keyword SETUSER
reserved_word_extra_share=no # Keyword SHARE reserved_word_extra_share=no # Keyword SHARE
reserved_word_extra_show=yes # Keyword SHOW reserved_word_extra_show=yes # Keyword SHOW
reserved_word_extra_shutdown=no # Keyword SHUTDOWN reserved_word_extra_shutdown=no # Keyword SHUTDOWN
reserved_word_extra_soname=yes # Keyword SONAME reserved_word_extra_soname=no # Keyword SONAME
reserved_word_extra_spatial=yes # Keyword SPATIAL reserved_word_extra_spatial=yes # Keyword SPATIAL
reserved_word_extra_sql_big_result=yes # Keyword SQL_BIG_RESULT reserved_word_extra_sql_big_result=yes # Keyword SQL_BIG_RESULT
reserved_word_extra_sql_calc_found_rows=yes # Keyword SQL_CALC_FOUND_ROWS reserved_word_extra_sql_calc_found_rows=yes # Keyword SQL_CALC_FOUND_ROWS
...@@ -983,7 +983,7 @@ select_limit3=yes # SELECT with LIMIT # OFFSET # ...@@ -983,7 +983,7 @@ select_limit3=yes # SELECT with LIMIT # OFFSET #
select_string_size=1048565 # constant string size in SELECT select_string_size=1048565 # constant string size in SELECT
select_table_update=yes # Update with sub select select_table_update=yes # Update with sub select
select_without_from=yes # SELECT without FROM select_without_from=yes # SELECT without FROM
server_version=MySQL 5.0.7 beta valgrind max debug/ # server version server_version=MySQL 5.3.1 MariaDB beta valgrind max debug # server version
simple_joins=yes # ANSI SQL simple joins simple_joins=yes # ANSI SQL simple joins
sorted_group_by=yes # Group by always sorted sorted_group_by=yes # Group by always sorted
storage_of_float=round # Storage of float values storage_of_float=round # Storage of float values
...@@ -1063,7 +1063,6 @@ type_extra_varchar2(1_arg)=no # Type varchar2(1 arg) ...@@ -1063,7 +1063,6 @@ type_extra_varchar2(1_arg)=no # Type varchar2(1 arg)
type_extra_year=yes # Type year type_extra_year=yes # Type year
type_odbc_bigint=yes # Type bigint type_odbc_bigint=yes # Type bigint
type_odbc_binary(1_arg)=yes # Type binary(1 arg) type_odbc_binary(1_arg)=yes # Type binary(1 arg)
type_odbc_datetime=yes # Type datetime
type_odbc_tinyint=yes # Type tinyint type_odbc_tinyint=yes # Type tinyint
type_odbc_varbinary(1_arg)=yes # Type varbinary(1 arg) type_odbc_varbinary(1_arg)=yes # Type varbinary(1 arg)
type_sql_bit=yes # Type bit type_sql_bit=yes # Type bit
...@@ -1075,6 +1074,8 @@ type_sql_char_varying(1_arg)=yes # Type char varying(1 arg) ...@@ -1075,6 +1074,8 @@ type_sql_char_varying(1_arg)=yes # Type char varying(1 arg)
type_sql_character(1_arg)=yes # Type character(1 arg) type_sql_character(1_arg)=yes # Type character(1 arg)
type_sql_character_varying(1_arg)=yes # Type character varying(1 arg) type_sql_character_varying(1_arg)=yes # Type character varying(1 arg)
type_sql_date=yes # Type date type_sql_date=yes # Type date
type_sql_datetime=yes # Type datetime
type_sql_datetime(1_arg)=yes # Type datetime(1 arg)
type_sql_dec(2_arg)=yes # Type dec(2 arg) type_sql_dec(2_arg)=yes # Type dec(2 arg)
type_sql_decimal(2_arg)=yes # Type decimal(2 arg) type_sql_decimal(2_arg)=yes # Type decimal(2 arg)
type_sql_double_precision=yes # Type double precision type_sql_double_precision=yes # Type double precision
...@@ -1104,7 +1105,9 @@ type_sql_numeric(2_arg)=yes # Type numeric(2 arg) ...@@ -1104,7 +1105,9 @@ type_sql_numeric(2_arg)=yes # Type numeric(2 arg)
type_sql_real=yes # Type real type_sql_real=yes # Type real
type_sql_smallint=yes # Type smallint type_sql_smallint=yes # Type smallint
type_sql_time=yes # Type time type_sql_time=yes # Type time
type_sql_time(1_arg)=yes # Type time(1 arg)
type_sql_timestamp=yes # Type timestamp type_sql_timestamp=yes # Type timestamp
type_sql_timestamp(1_arg)=yes # Type timestamp(1 arg)
type_sql_timestamp_with_time_zone=no # Type timestamp with time zone type_sql_timestamp_with_time_zone=no # Type timestamp with time zone
type_sql_varchar(1_arg)=yes # Type varchar(1 arg) type_sql_varchar(1_arg)=yes # Type varchar(1 arg)
union=yes # union union=yes # union
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment