# File lib/sqlite3/database.rb, line 197
    def execute_batch( sql, bind_vars = [], *args )
      # FIXME: remove this stuff later
      unless [Array, Hash].include?(bind_vars.class)
        bind_vars = [bind_vars]
        warn("\#{caller[0]} is calling SQLite3::Database#execute_batch with bind parameters\nthat are not a list of a hash.  Please switch to passing bind parameters as an\narray or hash. Support for this behavior will be removed in version 2.0.0.\n") if $VERBOSE
      end

      # FIXME: remove this stuff later
      if bind_vars.nil? || !args.empty?
        if args.empty?
          bind_vars = []
        else
          bind_vars = [nil] + args
        end

        warn("\#{caller[0]} is calling SQLite3::Database#execute_batch with nil or multiple bind params\nwithout using an array.  Please switch to passing bind parameters as an array.\nSupport for this behavior will be removed in version 2.0.0.\n") if $VERBOSE
      end

      sql = sql.strip
      until sql.empty? do
        prepare( sql ) do |stmt|
          # FIXME: this should probably use sqlite3's api for batch execution
          # This implementation requires stepping over the results.
          if bind_vars.length == stmt.bind_parameter_count
            stmt.bind_params(bind_vars)
          end
          stmt.step
          sql = stmt.remainder.strip
        end
      end
      nil
    end