~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-06-10 23:43:32 UTC
  • mfrom: (1054.2.25 mordred)
  • Revision ID: brian@gaz-20090610234332-o8zyo1lm2p6a2e7l
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
913
913
void
914
914
innobase_convert_from_table_id(
915
915
/*===========================*/
916
 
        struct charset_info_st* cs,     /* in: the 'from' character set */
 
916
        struct charset_info_st* ,       /* in: the 'from' character set */
917
917
        char*                   to,     /* out: converted identifier */
918
918
        const char*             from,   /* in: identifier to convert */
919
919
        ulint                   len)    /* in: length of 'to', in bytes */
920
920
{
921
 
        uint    errors;
922
 
 
923
 
        strconvert(cs, from, &my_charset_filename, to, (uint) len, &errors);
 
921
        strncpy(to, from, len);
924
922
}
925
923
 
926
924
/**********************************************************************
929
927
void
930
928
innobase_convert_from_id(
931
929
/*=====================*/
932
 
        struct charset_info_st* cs,     /* in: the 'from' character set */
 
930
        struct charset_info_st* ,       /* in: the 'from' character set */
933
931
        char*                   to,     /* out: converted identifier */
934
932
        const char*             from,   /* in: identifier to convert */
935
933
        ulint                   len)    /* in: length of 'to', in bytes */
936
934
{
937
 
        uint    errors;
938
 
 
939
 
        strconvert(cs, from, system_charset_info, to, (uint) len, &errors);
 
935
        strncpy(to, from, len);
940
936
}
941
937
 
942
938
/**********************************************************************
1096
1092
}
1097
1093
#endif /* defined (__WIN__) && defined (MYSQL_DYNAMIC_PLUGIN) */
1098
1094
 
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
1095
 
1119
1096
/***********************************************************************
1120
1097
Formats the raw data in "data" (in InnoDB on-disk format) that is of
1133
1110
        const char*     data,           /* in: raw data */
1134
1111
        ulint           data_len,       /* in: raw data length
1135
1112
                                        in bytes */
1136
 
        ulint           charset_coll,   /* in: charset collation */
 
1113
        ulint           ,               /* in: charset collation */
1137
1114
        char*           buf,            /* out: output buffer */
1138
1115
        ulint           buf_size)       /* in: output buffer size
1139
1116
                                        in bytes */
1140
1117
{
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));
 
1118
        return(ut_str_sql_format(data, data_len, buf, buf_size));
1156
1119
}
1157
1120
 
1158
1121
/*************************************************************************