~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.cc

  • Committer: Monty Taylor
  • Date: 2008-08-10 06:11:44 UTC
  • mto: (312.1.3 translations)
  • mto: This revision was merged to the branch mainline in revision 295.
  • Revision ID: monty@inaugust.com-20080810061144-llnyqeju5zckd6pw
Oy. Replaced max and min macros with std::max and std::min so that we get
strong typing. And, then, cast things in the right direction...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1761
1761
   auto_increment_increment(1), auto_increment_offset(1),
1762
1762
   time_zone_len(0), lc_time_names_number(0), charset_database_number(0)
1763
1763
{
1764
 
  ulong data_len;
 
1764
  uint32_t data_len;
1765
1765
  uint32_t tmp;
1766
1766
  uint8_t common_header_len, post_header_len;
1767
1767
  Log_event::Byte *start;
1801
1801
      be even bigger, but this will suffice to catch most corruption
1802
1802
      errors that can lead to a crash.
1803
1803
    */
1804
 
    if (status_vars_len > min(data_len, MAX_SIZE_LOG_EVENT_STATUS))
 
1804
    if (status_vars_len > min(data_len, (uint32_t)MAX_SIZE_LOG_EVENT_STATUS))
1805
1805
    {
1806
1806
      query= 0;
1807
1807
      return;
4400
4400
  char buf[UV_NAME_LEN_SIZE];
4401
4401
  char buf1[UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + 
4402
4402
            UV_CHARSET_NUMBER_SIZE + UV_VAL_LEN_SIZE];
4403
 
  uchar buf2[max(8, DECIMAL_MAX_FIELD_SIZE + 2)], *pos= buf2;
 
4403
  uchar buf2[(8 > DECIMAL_MAX_FIELD_SIZE + 2) ? 8 : DECIMAL_MAX_FIELD_SIZE +2], *pos= buf2;
4404
4404
  uint buf1_length;
4405
4405
  ulong event_length;
4406
4406