src = "#{cmd}.cc"
if !File.exist?(cmd) || File.mtime(cmd) < File.mtime(src)
system("c++ -O3 -Wall `mysql_config --cflags --libs` " +
src = "#{cmd}.cc"
if !File.exist?(cmd) || File.mtime(cmd) < File.mtime(src)
system("c++ -O3 -Wall `mysql_config --cflags --libs` " +
tempfiles = %w(ways way_nodes way_tags relations relation_members relation_tags)
.map { |base| prefix + base }
tempfiles = %w(ways way_nodes way_tags relations relation_members relation_tags)
.map { |base| prefix + base }
if have_segs
execute "LOAD DATA INFILE '#{ways}' INTO TABLE ways #{csvopts} (id, user_id, timestamp) SET visible = 1, version = 1"
if have_segs
execute "LOAD DATA INFILE '#{ways}' INTO TABLE ways #{csvopts} (id, user_id, timestamp) SET visible = 1, version = 1"