#!/usr/bin/perl # Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA # # Output a html table with a compare of all servers # $cmp_server="mysql"; # Get limit names from here $full_html=1; $opt_txt=0; if ($#ARGV < 0) { @ARGV=glob("limits/*.cfg"); $skip_header=0; } else { $skip_header=1; } foreach (@ARGV) { /([^\/\.]*)\.cfg$/; $server=$1; if ($server eq $cmp_server) { unshift(@limits,read_config_data($server,$_)); } else { push(@limits,read_config_data($server,$_)); } } @global_limits= sort keys(%all_limits); find_match('group_functions|functions'); # Don't report these if ($full_html) { if (!$skip_header) { print ""; } print < Database comparison table

Database comparison table generated with crash-me

logo You can get a copy of crash-me from the MySQL 3.23 distribution at http://www.mysql.com.

crash-me is a program that automatically detects limits and capabilities in a SQL server. We at TCX have worked very hard to make crash-me as fair and accurate as possible, but there is always a small possibility that some particular tests fails for some database, even if the database has the capability. We are always willing to correct this as soon as this comes to our attention. Some tests may fail because the database in questions does not follow ANSI SQL 99 or ODBC 3.0 but in this case we regard this as a failure in the database.

Note that crash-me test the ODBC functionality by executing SQL commands through the perl DBD driver. As some SQL servers implements the ODBC functionality in the ODBC driver, crash-me may tell you that the SQL server doesn\'t support some functionality, even if this is supported when you are using the SQL server through ODBC.

Note that even if crash-me reports that some feature is missing, not supported, or doesn\'t work it doesn\'t mean that the SQL server doesn\'t follow the SQL standard or that you can\'t do the operation in some other way. crash-me just tells you how the SQL server works if you send it some specific query. The result is however often useful for applications writers that tries to write portable code and needs to be aware of the differences between different SQL servers.

TCX is trying to add as much tests to the crash-me program as they can but it\'s always possible that some database vendor specific functions / queries aren\'t tested. If you find some entries not tested on a database please let us know and try to patch the crash-me program your self or give us some example queries so we can add those entries. We are always open for suggestions for adding things to the crash-me program. The crash-me program is also our input reference for the MySQL benchmark program.
Note: The crash-me table is generated from databases started with default parameters. If this is not the case, this is noted in the comment row. Some detected limits may also be configurable, OS dependent, depend of the Perl DBI driver or depending on the license of the used database version.

The following markers are used in the comparison table
MarkerDescription
\"yes\" Function is supported
\"no\" Function is not supported
\"error\" Function exists but didn\'t return expected result. This usually means that the database is using some non standard extension for the option in question
ignoredFunction doesn\'t give an error from the server but it doesn\'t do anything. One can probably do the same action with some other command
nonstandardFunction exists but doesn\'t work according to ANSI SQL 92 or ODBC 3.0
 Not relevant or not tested with the database
+numberAt least number operations is supported
\"warning\" Anyone with normal access to the database server can take it down, possible forever!

The crash-me comparisons

EOF } print "\n"; # # printer server names # $columns=$#limits+2; print "\n"; foreach $server (@limits) { print ""; $server->[1]->{'server_version'} =~ /^(\S*)/; push(@server_names,$1); } find_match("server_version"); # Mark used print "\n"; print_match("Crash-me information",'crash_me|operating_system|user_comment',undef(),1); print_match("ANSI SQL 92 types","type_sql"); print_match("ODBC 3.0 types","type_odbc"); print_match("Other types","type_extra"); print_match("Constraints and type modifiers","constraint|foreign|primary|unique|default","alter|max_unique"); print_match("ANSI SQL 92 functions","func_sql","group"); print_match("ODBC 3.0 functions","func_odbc","group"); print_match("Other functions","func_extra","group"); print_match("Functions in WHERE","func_where","group"); print_match("ANSI SQL 92 group functions","group_func_sql"); print_match("Other group functions","group_func"); print_match("Function use","NEG|minus_neg|like|null.*expr"); print_match("Order by and group by","order|having|group"); print_match("Join methods",'join|subqueries|multi_table|select_table_update'); print_match("String handling","string|select_constant|quote_with|double_quotes|end_space"); print_match("Quoting","quote"); print_match("Name limits","name","alter"); print_match("Index limits",'index|primary|unique'); print_match("Type limits",'char|float|text_size|date|end_space','atomic'); print_match("Expressions",'expression|conditions|select_limit|binary|hex|cast|logical|true_false'); print_match("Comments",'comment'); print_match("ALTER TABLE",'alter'); print_match("CREATE and DROP",'create|drop|rowid|temporary|domains|truncate'); print_match("SELECT",'alias|compute|select|table_wildcard'); print_match("Sets",'intersect|minus|union|except'); print_match("INSERT",'insert'); print_options("Other features"); print_match("Other limits",'\S'); print "
Function$server->[1]->{'server_version'}
\n"; if ($full_html) { print < This information is provided by TCX so one can get the real limitations from the database server (not the information from sales managers!). Hopefully the above information will make it easier for you to find a database server that has the functionality you need and that you can rely on!

TCX will continue to extend crash-me and add more database servers to the above chart. We are also very interested in new tests so if you have any suggestions, please mail us (or even better, send us code).
We are also working on the MySQL benchmark to help users see how fast a database is when doing different typical things.
==============================================
You can direct questions about crash-me and the benchmark to the MySQL mailing list.
EOF } exit 0; sub read_config_data { my ($server,$file)=@_; my (%limits,%prompts); open(CONFIG_FILE,"<$file") || die "Can't open configure file $file\n"; while () { chomp; if (/^(\S+)=([^\#]*[^\#\s])\s*(\# .*)*$/) { $all_limits{$1}=1; $limits{$1}=$2; $prompts{$1}=length($3) ? substr($3,2) : ""; } elsif (!/^\s*$/ && !/^\#/) { die "Wrong config row: $_\n"; } } close CONFIG_FILE; return ([$server,\%limits,\%prompts]); } sub find_match { my ($find,$find_not)=@_; my ($key,@res); foreach $key (@global_limits) { if ($key =~ /$find/ && (!defined($find_not) || !($key =~ /$find_not/))) { push(@res,$key); $key=""; } } return @res; } sub print_match { my ($header,$match,$not_match,$no_server_names)=@_; my ($key); if ($opt_txt) { print "\n$header\n"; } else { print "$header\n"; } print_server_names() if (!$no_server_names); foreach $key (find_match($match,$not_match)) { print_key($key,$key eq "crash_me_safe" ? 1: 0); } } sub print_options { my ($header)=@_; if ($opt_txt) { print "\n$header\n"; } else { print "$header\n"; } print_server_names(); foreach $key (@global_limits) { if ($key && !($limits[0]->[1]{$key} =~ /^\d+$/)) { print_key($key,0); $key=""; } } } sub print_key { my ($key,$fatal)=@_; my ($i,$server,$option,$tmp); $option=$key; for ($i=0 ; $i < $columns ; $i++) { if ($limits[$i]->[2]{$key}) { $option=$limits[$i]->[2]{$key}; last; } } $option =~ s/>/>\;/g; $option =~ s/[1]->{$key}; $tmp="yes" if ($tmp eq "yes"); $tmp="no" if ($tmp eq "no" && !$fatal); $tmp="warning" if ($tmp eq "no" && $fatal); $tmp="error" if ($tmp eq "error"); $tmp="" if (!defined($tmp) || $tmp eq ""); print "\t$tmp"; } } else { $option =~ s/ / /g; print "$option"; foreach $server (@limits) { $tmp=$server->[1]->{$key}; $tmp="\"yes\"" if ($tmp eq "yes" && !$fatal); $tmp="\"yes\"" if ($tmp eq "yes" && $fatal); $tmp="\"no\"" if ($tmp eq "no" && !$fatal); $tmp="\"warning\"" if ($tmp eq "no" && $fatal); $tmp="\"error\"" if ($tmp eq "error"); $tmp=" " if (!defined($tmp) || $tmp eq ""); print "$tmp"; } print"\n"; } } sub print_server_names { my ($server); if ($opt_txt) { my $tab; $tab=""; foreach $server (@server_names) { print "$tab$server"; $tab="\t"; } print "\n"; } else { print ""; foreach $server (@server_names) { print "$server"; } print "\n"; } }