Skip to content

Commit

Permalink
correct server side error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Apr 12, 2015
1 parent 9b067a3 commit 4409e04
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
2 changes: 0 additions & 2 deletions sql/handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

// the following is for checking tables

#define HA_ADMIN_VIEW_REPAIR_IS_DONE 2
#define HA_ADMIN_ALREADY_DONE 1
#define HA_ADMIN_OK 0
#define HA_ADMIN_NOT_IMPLEMENTED -1
Expand All @@ -57,7 +56,6 @@
#define HA_ADMIN_NEEDS_UPGRADE -10
#define HA_ADMIN_NEEDS_ALTER -11
#define HA_ADMIN_NEEDS_CHECK -12
#define HA_ADMIN_NEEDS_REPAIR -13

/* Bits in table_flags() to show what database can do */

Expand Down
6 changes: 0 additions & 6 deletions sql/share/errmsg-utf8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6565,9 +6565,3 @@ ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT
ER_NO_SUCH_TABLE_IN_ENGINE 42S02
eng "Table '%-.192s.%-.192s' doesn't exist in engine"
swe "Det finns ingen tabell som heter '%-.192s.%-.192s' i handlern"
ER_NO_MARIADB_SERVER_FIELD
eng "view '%-.192s.%-.192s' has no field mariadb server in its .frm file"
ER_VIEW_REPAIR_IS_DONE
eng "view is repaired"
ER_NEEDS_REPAIR
eng "needs repair"
16 changes: 0 additions & 16 deletions sql/sql_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -879,22 +879,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
fatal_error=1;
break;
}
case HA_ADMIN_VIEW_REPAIR_IS_DONE:
{
protocol->store(STRING_WITH_LEN("status"), system_charset_info);
protocol->store(ER(ER_VIEW_REPAIR_IS_DONE),
strlen(ER(ER_VIEW_REPAIR_IS_DONE)),
system_charset_info);
break;
}
case HA_ADMIN_NEEDS_REPAIR:
{
protocol->store(STRING_WITH_LEN("status"), system_charset_info);
protocol->store(ER(ER_NEEDS_REPAIR),
strlen(ER(ER_NEEDS_REPAIR)),
system_charset_info);
break;
}

default: // Probably HA_ADMIN_INTERNAL_ERROR
{
Expand Down
1 change: 0 additions & 1 deletion sql/sql_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3023,7 +3023,6 @@ bool open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
else if (table_list->open_strategy == TABLE_LIST::OPEN_STUB)
DBUG_RETURN(FALSE);


retry_share:

mysql_mutex_lock(&LOCK_open);
Expand Down
8 changes: 4 additions & 4 deletions sql/sql_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
"MERGE":"TEMPTABLE");


DBUG_RETURN(HA_ADMIN_VIEW_REPAIR_IS_DONE);
DBUG_RETURN(HA_ADMIN_OK);
}


Expand Down Expand Up @@ -2049,11 +2049,11 @@ int view_check(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt)
!view->mariadb_version))
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_NO_MARIADB_SERVER_FIELD,
ER(ER_NO_MARIADB_SERVER_FIELD),
ER_TABLE_NEEDS_UPGRADE,
ER(ER_TABLE_NEEDS_UPGRADE),
view->db,
view->table_name);
DBUG_RETURN(HA_ADMIN_NEEDS_REPAIR);
DBUG_RETURN(HA_ADMIN_NEEDS_UPGRADE);
}
DBUG_RETURN(HA_ADMIN_OK);
}
Expand Down

0 comments on commit 4409e04

Please sign in to comment.