~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replication/utility.cc

  • Committer: Mark Atwood
  • Date: 2009-01-05 04:37:22 UTC
  • mto: (758.1.1 devel)
  • mto: This revision was merged to the branch mainline in revision 759.
  • Revision ID: me@mark.atwood.name-20090105043722-03l4mzcxi4yjjjih
replace sql_print_error etc with errmsg_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
16
#include <drizzled/server_includes.h>
17
 
#include "rpl_utility.h"
18
 
#include "rpl_rli.h"
19
 
#include <drizzled/drizzled_error_messages.h>
 
17
#include <drizzled/replication/utility.h>
 
18
#include <drizzled/replication/rli.h>
 
19
#include <drizzled/error.h>
 
20
#include <drizzled/gettext.h>
20
21
 
21
22
/*********************************************************************
22
23
 *                   table_def member definitions                    *
32
33
 
33
34
  switch (type(col)) {
34
35
  case DRIZZLE_TYPE_NEWDECIMAL:
35
 
    length= my_decimal_get_binary_size(m_field_metadata[col] >> 8, 
 
36
    length= my_decimal_get_binary_size(m_field_metadata[col] >> 8,
36
37
                                       m_field_metadata[col] & 0xff);
37
38
    break;
38
39
  case DRIZZLE_TYPE_DOUBLE:
48
49
    length= m_field_metadata[col] & 0x00ff;
49
50
    break;
50
51
  }
51
 
  case DRIZZLE_TYPE_TINY:
52
 
    length= 1;
53
 
    break;
54
52
  case DRIZZLE_TYPE_LONG:
55
53
    length= 4;
56
54
    break;
60
58
  case DRIZZLE_TYPE_NULL:
61
59
    length= 0;
62
60
    break;
63
 
  case DRIZZLE_TYPE_NEWDATE:
 
61
  case DRIZZLE_TYPE_DATE:
64
62
    length= 3;
65
63
    break;
66
64
  case DRIZZLE_TYPE_TIME:
126
124
    /*
127
125
      Check the slave's field size against that of the master.
128
126
    */
129
 
    if (!error && 
 
127
    if (!error &&
130
128
        !table->field[col]->compatible_field_size(field_metadata(col)))
131
129
    {
132
130
      error= 1;
137
135
               "column size."), col,
138
136
               table->field[col]->pack_length_from_metadata(
139
137
                                    m_field_metadata[col]),
140
 
               tsh->db.str, tsh->table_name.str, 
 
138
               tsh->db.str, tsh->table_name.str,
141
139
               table->field[col]->row_pack_length());
142
140
      rli->report(ERROR_LEVEL, ER_BINLOG_ROW_WRONG_TABLE_DEF,
143
141
                  ER(ER_BINLOG_ROW_WRONG_TABLE_DEF), buf);