~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Monty Taylor
  • Date: 2009-06-08 18:19:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1060.
  • Revision ID: mordred@inaugust.com-20090608181953-9n1u3im0kezu2aoy
Removed copy_and_convert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1096
1096
}
1097
1097
#endif /* defined (__WIN__) && defined (MYSQL_DYNAMIC_PLUGIN) */
1098
1098
 
1099
 
/*************************************************************************
1100
 
Wrapper around MySQL's copy_and_convert function, see it for
1101
 
documentation. */
1102
 
extern "C" UNIV_INTERN
1103
 
ulint
1104
 
innobase_convert_string(
1105
 
/*====================*/
1106
 
        void*           to,
1107
 
        ulint           to_length,
1108
 
        const CHARSET_INFO*     to_cs,
1109
 
        const void*     from,
1110
 
        ulint           from_length,
1111
 
        const CHARSET_INFO*     from_cs,
1112
 
        uint*           errors)
1113
 
{
1114
 
  return(copy_and_convert((char*)to, (uint32) to_length, to_cs,
1115
 
                          (const char*)from, (uint32) from_length, from_cs,
1116
 
                          errors));
1117
 
}
1118
1099
 
1119
1100
/***********************************************************************
1120
1101
Formats the raw data in "data" (in InnoDB on-disk format) that is of
1133
1114
        const char*     data,           /* in: raw data */
1134
1115
        ulint           data_len,       /* in: raw data length
1135
1116
                                        in bytes */
1136
 
        ulint           charset_coll,   /* in: charset collation */
 
1117
        ulint           ,               /* in: charset collation */
1137
1118
        char*           buf,            /* out: output buffer */
1138
1119
        ulint           buf_size)       /* in: output buffer size
1139
1120
                                        in bytes */
1140
1121
{
1141
 
        /* XXX we use a hard limit instead of allocating
1142
 
        but_size bytes from the heap */
1143
 
        const CHARSET_INFO*     data_cs;
1144
 
        char            buf_tmp[8192];
1145
 
        ulint           buf_tmp_used;
1146
 
        uint            num_errors;
1147
 
 
1148
 
        data_cs = all_charsets[charset_coll];
1149
 
 
1150
 
        buf_tmp_used = innobase_convert_string(buf_tmp, sizeof(buf_tmp),
1151
 
                                               system_charset_info,
1152
 
                                               data, data_len, data_cs,
1153
 
                                               &num_errors);
1154
 
 
1155
 
        return(ut_str_sql_format(buf_tmp, buf_tmp_used, buf, buf_size));
 
1122
        return(ut_str_sql_format(data, data_len, buf, buf_size));
1156
1123
}
1157
1124
 
1158
1125
/*************************************************************************