Commit 3a37745c authored by Arun Kuruvila's avatar Arun Kuruvila

No commit message

No commit message
parent 07fb5cff
/*
Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -372,7 +372,7 @@ void Proc_table_intact::report_error(uint code, const char *fmt, ...)
my_vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
if (code)
if (code == ER_COL_COUNT_DOESNT_MATCH_CORRUPTED)
my_message(code, buf, MYF(0));
else
my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "proc");
......
This diff is collapsed.
#ifndef SQL_ACL_INCLUDED
#define SQL_ACL_INCLUDED
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -143,6 +143,53 @@
(((A) & ALTER_PROC_ACL) >> 23) | \
(((A) & GRANT_ACL) >> 8))
enum mysql_user_table_field
{
MYSQL_USER_FIELD_HOST = 0,
MYSQL_USER_FIELD_USER,
MYSQL_USER_FIELD_PASSWORD,
MYSQL_USER_FIELD_SELECT_PRIV,
MYSQL_USER_FIELD_INSERT_PRIV,
MYSQL_USER_FIELD_UPDATE_PRIV,
MYSQL_USER_FIELD_DELETE_PRIV,
MYSQL_USER_FIELD_CREATE_PRIV,
MYSQL_USER_FIELD_DROP_PRIV,
MYSQL_USER_FIELD_RELOAD_PRIV,
MYSQL_USER_FIELD_SHUTDOWN_PRIV,
MYSQL_USER_FIELD_PROCESS_PRIV,
MYSQL_USER_FIELD_FILE_PRIV,
MYSQL_USER_FIELD_GRANT_PRIV,
MYSQL_USER_FIELD_REFERENCES_PRIV,
MYSQL_USER_FIELD_INDEX_PRIV,
MYSQL_USER_FIELD_ALTER_PRIV,
MYSQL_USER_FIELD_SHOW_DB_PRIV,
MYSQL_USER_FIELD_SUPER_PRIV,
MYSQL_USER_FIELD_CREATE_TMP_TABLE_PRIV,
MYSQL_USER_FIELD_LOCK_TABLES_PRIV,
MYSQL_USER_FIELD_EXECUTE_PRIV,
MYSQL_USER_FIELD_REPL_SLAVE_PRIV,
MYSQL_USER_FIELD_REPL_CLIENT_PRIV,
MYSQL_USER_FIELD_CREATE_VIEW_PRIV,
MYSQL_USER_FIELD_SHOW_VIEW_PRIV,
MYSQL_USER_FIELD_CREATE_ROUTINE_PRIV,
MYSQL_USER_FIELD_ALTER_ROUTINE_PRIV,
MYSQL_USER_FIELD_CREATE_USER_PRIV,
MYSQL_USER_FIELD_EVENT_PRIV,
MYSQL_USER_FIELD_TRIGGER_PRIV,
MYSQL_USER_FIELD_CREATE_TABLESPACE_PRIV,
MYSQL_USER_FIELD_SSL_TYPE,
MYSQL_USER_FIELD_SSL_CIPHER,
MYSQL_USER_FIELD_X509_ISSUER,
MYSQL_USER_FIELD_X509_SUBJECT,
MYSQL_USER_FIELD_MAX_QUESTIONS,
MYSQL_USER_FIELD_MAX_UPDATES,
MYSQL_USER_FIELD_MAX_CONNECTIONS,
MYSQL_USER_FIELD_MAX_USER_CONNECTIONS,
MYSQL_USER_FIELD_PLUGIN,
MYSQL_USER_FIELD_AUTHENTICATION_STRING,
MYSQL_USER_FIELD_COUNT
};
enum mysql_db_table_field
{
MYSQL_DB_FIELD_HOST = 0,
......@@ -170,6 +217,56 @@ enum mysql_db_table_field
MYSQL_DB_FIELD_COUNT
};
enum mysql_proxies_priv_table_feild
{
MYSQL_PROXIES_PRIV_FIELD_HOST = 0,
MYSQL_PROXIES_PRIV_FIELD_USER,
MYSQL_PROXIES_PRIV_FIELD_PROXIED_HOST,
MYSQL_PROXIES_PRIV_FIELD_PROXIED_USER,
MYSQL_PROXIES_PRIV_FIELD_WITH_GRANT,
MYSQL_PROXIES_PRIV_FIELD_GRANTOR,
MYSQL_PROXIES_PRIV_FIELD_TIMESTAMP,
MYSQL_PROXIES_PRIV_FIELD_COUNT
};
enum mysql_procs_priv_table_field
{
MYSQL_PROCS_PRIV_FIELD_HOST = 0,
MYSQL_PROCS_PRIV_FIELD_DB,
MYSQL_PROCS_PRIV_FIELD_USER,
MYSQL_PROCS_PRIV_FIELD_ROUTINE_NAME,
MYSQL_PROCS_PRIV_FIELD_ROUTINE_TYPE,
MYSQL_PROCS_PRIV_FIELD_GRANTOR,
MYSQL_PROCS_PRIV_FIELD_PROC_PRIV,
MYSQL_PROCS_PRIV_FIELD_TIMESTAMP,
MYSQL_PROCS_PRIV_FIELD_COUNT
};
enum mysql_columns_priv_table_field
{
MYSQL_COLUMNS_PRIV_FIELD_HOST = 0,
MYSQL_COLUMNS_PRIV_FIELD_DB,
MYSQL_COLUMNS_PRIV_FIELD_USER,
MYSQL_COLUMNS_PRIV_FIELD_TABLE_NAME,
MYSQL_COLUMNS_PRIV_FIELD_COLUMN_NAME,
MYSQL_COLUMNS_PRIV_FIELD_TIMESTAMP,
MYSQL_COLUMNS_PRIV_FIELD_COLUMN_PRIV,
MYSQL_COLUMNS_PRIV_FIELD_COUNT
};
enum mysql_tables_priv_table_field
{
MYSQL_TABLES_PRIV_FIELD_HOST = 0,
MYSQL_TABLES_PRIV_FIELD_DB,
MYSQL_TABLES_PRIV_FIELD_USER,
MYSQL_TABLES_PRIV_FIELD_TABLE_NAME,
MYSQL_TABLES_PRIV_FIELD_GRANTOR,
MYSQL_TABLES_PRIV_FIELD_TIMESTAMP,
MYSQL_TABLES_PRIV_FIELD_TABLE_PRIV,
MYSQL_TABLES_PRIV_FIELD_COLUMN_PRIV,
MYSQL_TABLES_PRIV_FIELD_COUNT
};
extern const TABLE_FIELD_DEF mysql_db_table_def;
extern bool mysql_user_table_is_in_short_password_format;
......
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -2998,11 +2998,7 @@ bool check_column_name(const char *name)
and type)
@retval FALSE OK
@retval TRUE There was an error. An error message is output
to the error log. We do not push an error
message into the error stack because this
function is currently only called at start up,
and such errors never reach the user.
@retval TRUE There was an error.
*/
bool
......@@ -3091,28 +3087,28 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
if (strncmp(sql_type.c_ptr_safe(), field_def->type.str,
field_def->type.length - 1))
{
report_error(0, "Incorrect definition of table %s.%s: "
"expected column '%s' at position %d to have type "
"%s, found type %s.", table->s->db.str, table->alias,
field_def->name.str, i, field_def->type.str,
report_error(ER_CANNOT_LOAD_FROM_TABLE, "Incorrect definition of "
"table %s.%s: expected column '%s' at position %d to "
"have type %s, found type %s.", table->s->db.str,
table->alias, field_def->name.str, i, field_def->type.str,
sql_type.c_ptr_safe());
error= TRUE;
}
else if (field_def->cset.str && !field->has_charset())
{
report_error(0, "Incorrect definition of table %s.%s: "
"expected the type of column '%s' at position %d "
"to have character set '%s' but the type has no "
"character set.", table->s->db.str, table->alias,
report_error(ER_CANNOT_LOAD_FROM_TABLE, "Incorrect definition of "
"table %s.%s: expected the type of column '%s' at "
"position %d to have character set '%s' but the type "
"has no character set.", table->s->db.str, table->alias,
field_def->name.str, i, field_def->cset.str);
error= TRUE;
}
else if (field_def->cset.str &&
strcmp(field->charset()->csname, field_def->cset.str))
{
report_error(0, "Incorrect definition of table %s.%s: "
"expected the type of column '%s' at position %d "
"to have character set '%s' but found "
report_error(ER_CANNOT_LOAD_FROM_TABLE, "Incorrect definition of "
"table %s.%s: expected the type of column '%s' at "
"position %d to have character set '%s' but found "
"character set '%s'.", table->s->db.str, table->alias,
field_def->name.str, i, field_def->cset.str,
field->charset()->csname);
......@@ -3121,11 +3117,11 @@ Table_check_intact::check(TABLE *table, const TABLE_FIELD_DEF *table_def)
}
else
{
report_error(0, "Incorrect definition of table %s.%s: "
"expected column '%s' at position %d to have type %s "
" but the column is not found.",
table->s->db.str, table->alias,
field_def->name.str, i, field_def->type.str);
report_error(ER_CANNOT_LOAD_FROM_TABLE, "Incorrect definition of "
"table %s.%s: expected column '%s' at position %d to "
"have type %s but the column is not found.",
table->s->db.str, table->alias, field_def->name.str, i,
field_def->type.str);
error= TRUE;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment