~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

  • Committer: Mats Kindahl
  • Date: 2008-08-07 06:24:22 UTC
  • mfrom: (265 drizzle)
  • mto: (264.1.19 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: mats@mysql.com-20080807062422-20kyv6ssp4grfm0s
Manual merge of lp:drizzle into ~mkindahl/remove-mem-casts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "mysql_priv.h"
27
27
#include "rpl_filter.h"
28
28
#include <errno.h>
 
29
#include <drizzled/drizzled_error_messages.h>
29
30
 
30
31
/*
31
32
  While we have legacy_db_type, we have this array to
866
867
      }
867
868
      else
868
869
      {
869
 
        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
870
        push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
870
871
                            ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
871
872
                            ha_resolve_storage_engine_name(ht));
872
873
      }
1156
1157
  */
1157
1158
  if (is_real_trans && thd->transaction.all.modified_non_trans_table &&
1158
1159
      !thd->slave_thread && thd->killed != THD::KILL_CONNECTION)
1159
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
1160
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
1160
1161
                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
1161
1162
                 ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
1162
1163
  return(error);
1597
1598
    exist:
1598
1599
  */
1599
1600
  if (warn)
1600
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 
1601
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
1601
1602
                 "This MySQL server does not support any "
1602
1603
                 "consistent-read capable storage engine");
1603
1604
  return 0;
1663
1664
public:
1664
1665
  virtual bool handle_error(uint sql_errno,
1665
1666
                            const char *message,
1666
 
                            MYSQL_ERROR::enum_warning_level level,
 
1667
                            DRIZZLE_ERROR::enum_warning_level level,
1667
1668
                            THD *thd);
1668
 
  char buff[MYSQL_ERRMSG_SIZE];
 
1669
  char buff[DRIZZLE_ERRMSG_SIZE];
1669
1670
};
1670
1671
 
1671
1672
 
1673
1674
Ha_delete_table_error_handler::
1674
1675
handle_error(uint sql_errno  __attribute__((unused)),
1675
1676
             const char *message,
1676
 
             MYSQL_ERROR::enum_warning_level level __attribute__((unused)),
 
1677
             DRIZZLE_ERROR::enum_warning_level level __attribute__((unused)),
1677
1678
             THD *thd __attribute__((unused)))
1678
1679
{
1679
1680
  /* Grab the error message */
1735
1736
      XXX: should we convert *all* errors to warnings here?
1736
1737
      What if the error is fatal?
1737
1738
    */
1738
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error,
 
1739
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error,
1739
1740
                ha_delete_table_error_handler.buff);
1740
1741
  }
1741
1742
  delete file;
2295
2296
  {
2296
2297
    /* Table is opened and defined at this point */
2297
2298
    key_unpack(&str,table,(uint) key_nr);
2298
 
    uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(msg);
 
2299
    uint max_length=DRIZZLE_ERRMSG_SIZE-(uint) strlen(msg);
2299
2300
    if (str.length() >= max_length)
2300
2301
    {
2301
2302
      str.length(max_length-4);
2359
2360
      String str(key,sizeof(key),system_charset_info);
2360
2361
      /* Table is opened and defined at this point */
2361
2362
      key_unpack(&str,table,(uint) key_nr);
2362
 
      max_length= (MYSQL_ERRMSG_SIZE-
 
2363
      max_length= (DRIZZLE_ERRMSG_SIZE-
2363
2364
                   (uint) strlen(ER(ER_FOREIGN_DUPLICATE_KEY)));
2364
2365
      if (str.length() >= max_length)
2365
2366
      {
3630
3631
int handler::multi_range_read_next(char **range_info)
3631
3632
{
3632
3633
  int result= 0;
3633
 
  int range_res;
 
3634
  int range_res= 0;
3634
3635
 
3635
3636
  if (!mrr_have_range)
3636
3637
  {
3824
3825
int DsMrr_impl::dsmrr_fill_buffer(handler *unused __attribute__((unused)))
3825
3826
{
3826
3827
  char *range_info;
3827
 
  int res;
 
3828
  int res = 0;
3828
3829
 
3829
3830
  rowids_buf_cur= rowids_buf;
3830
3831
  while ((rowids_buf_cur < rowids_buf_end) &&