method

max_allowed_packet_reached?

rails latest stable - Class: ActiveRecord::ConnectionAdapters

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.2.3) is shown here.

max_allowed_packet_reached?(current_packet, previous_packet)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 548
        def max_allowed_packet_reached?(current_packet, previous_packet)
          if current_packet.bytesize > max_allowed_packet
            raise ActiveRecordError, "Fixtures set is too large #{current_packet.bytesize}. Consider increasing the max_allowed_packet variable."
          elsif previous_packet.nil?
            false
          else
            (current_packet.bytesize + previous_packet.bytesize) > max_allowed_packet
          end
        end