# File test.rb, line 178 def setup() @host, @user, @pass, db, port, sock, flag = ARGV @db = db || "test" @port = port.to_i @sock = sock.nil? || sock.empty? ? nil : sock @flag = flag.to_i @m = Mysql.new(@host, @user, @pass, @db, @port, @sock, @flag) @m.query("create temporary table t (id int, str char(10), primary key (id))") @m.query("insert into t values (1, 'abc'), (2, 'defg'), (3, 'hi'), (4, null)") @res = @m.query("select * from t") end