~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
867
867
      }
868
868
      else
869
869
      {
870
 
        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
870
        push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
871
871
                            ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
872
872
                            ha_resolve_storage_engine_name(ht));
873
873
      }
1157
1157
  */
1158
1158
  if (is_real_trans && thd->transaction.all.modified_non_trans_table &&
1159
1159
      !thd->slave_thread && thd->killed != THD::KILL_CONNECTION)
1160
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
1160
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
1161
1161
                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
1162
1162
                 ER(ER_WARNING_NOT_COMPLETE_ROLLBACK));
1163
1163
  return(error);
1598
1598
    exist:
1599
1599
  */
1600
1600
  if (warn)
1601
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 
1601
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
1602
1602
                 "This MySQL server does not support any "
1603
1603
                 "consistent-read capable storage engine");
1604
1604
  return 0;
1664
1664
public:
1665
1665
  virtual bool handle_error(uint sql_errno,
1666
1666
                            const char *message,
1667
 
                            MYSQL_ERROR::enum_warning_level level,
 
1667
                            DRIZZLE_ERROR::enum_warning_level level,
1668
1668
                            THD *thd);
1669
 
  char buff[MYSQL_ERRMSG_SIZE];
 
1669
  char buff[DRIZZLE_ERRMSG_SIZE];
1670
1670
};
1671
1671
 
1672
1672
 
1674
1674
Ha_delete_table_error_handler::
1675
1675
handle_error(uint sql_errno  __attribute__((unused)),
1676
1676
             const char *message,
1677
 
             MYSQL_ERROR::enum_warning_level level __attribute__((unused)),
 
1677
             DRIZZLE_ERROR::enum_warning_level level __attribute__((unused)),
1678
1678
             THD *thd __attribute__((unused)))
1679
1679
{
1680
1680
  /* Grab the error message */
1696
1696
  TABLE dummy_table;
1697
1697
  TABLE_SHARE dummy_share;
1698
1698
 
1699
 
  memset((char*) &dummy_table, 0, sizeof(dummy_table));
1700
 
  memset((char*) &dummy_share, 0, sizeof(dummy_share));
 
1699
  memset(&dummy_table, 0, sizeof(dummy_table));
 
1700
  memset(&dummy_share, 0, sizeof(dummy_share));
1701
1701
  dummy_table.s= &dummy_share;
1702
1702
 
1703
1703
  /* DB_TYPE_UNKNOWN is used in ALTER TABLE when renaming only .frm files */
1736
1736
      XXX: should we convert *all* errors to warnings here?
1737
1737
      What if the error is fatal?
1738
1738
    */
1739
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error,
 
1739
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR, error,
1740
1740
                ha_delete_table_error_handler.buff);
1741
1741
  }
1742
1742
  delete file;
2296
2296
  {
2297
2297
    /* Table is opened and defined at this point */
2298
2298
    key_unpack(&str,table,(uint) key_nr);
2299
 
    uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(msg);
 
2299
    uint max_length=DRIZZLE_ERRMSG_SIZE-(uint) strlen(msg);
2300
2300
    if (str.length() >= max_length)
2301
2301
    {
2302
2302
      str.length(max_length-4);
2360
2360
      String str(key,sizeof(key),system_charset_info);
2361
2361
      /* Table is opened and defined at this point */
2362
2362
      key_unpack(&str,table,(uint) key_nr);
2363
 
      max_length= (MYSQL_ERRMSG_SIZE-
 
2363
      max_length= (DRIZZLE_ERRMSG_SIZE-
2364
2364
                   (uint) strlen(ER(ER_FOREIGN_DUPLICATE_KEY)));
2365
2365
      if (str.length() >= max_length)
2366
2366
      {
3139
3139
  TABLE table;
3140
3140
  TABLE_SHARE share;
3141
3141
 
3142
 
  memset((uchar*) &create_info, 0, sizeof(create_info));
 
3142
  memset(&create_info, 0, sizeof(create_info));
3143
3143
  if ((error= ha_discover(thd, db, name, &frmblob, &frmlen)))
3144
3144
  {
3145
3145
    /* Table could not be discovered and thus not created */