#!/usr/bin/perl $test=shift || die "Usage $0 testname [option]"; $option=shift; open(D, ") { chomp; s/'/\\'/g; ++$N; print "INSERT $test VALUES ($N, '$_');\n"; } print <<__PREP__; ALTER TABLE $test ENABLE KEYS; SELECT $N; __PREP__ $N=0; while () { chomp; s/'/\\'/g; ++$N; $_="MATCH text AGAINST ('$_' $option)"; print "SELECT $N, id, $_ FROM $test WHERE $_;\n"; } print <<__FOOTER__; DROP TABLE $test; __FOOTER__