mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
This commit is contained in:
@ -1815,9 +1815,9 @@ static bool update_user_table(THD *thd, TABLE *table,
|
||||
key_copy((uchar *) user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
if (table->file->index_read_idx(table->record[0], 0,
|
||||
(uchar *) user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_idx_map(table->record[0], 0,
|
||||
(uchar *) user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
my_message(ER_PASSWORD_NO_MATCH, ER(ER_PASSWORD_NO_MATCH),
|
||||
MYF(0)); /* purecov: deadcode */
|
||||
@ -1908,8 +1908,9 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
if (table->file->index_read_idx(table->record[0], 0, user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_idx_map(table->record[0], 0, user_key,
|
||||
HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
/* what == 'N' means revoke */
|
||||
if (what == 'N')
|
||||
@ -2131,8 +2132,9 @@ static int replace_db_table(TABLE *table, const char *db,
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
if (table->file->index_read_idx(table->record[0],0, user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_idx_map(table->record[0],0, user_key,
|
||||
HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
if (what == 'N')
|
||||
{ // no row, no revoke
|
||||
@ -2348,8 +2350,8 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs)
|
||||
col_privs->field[4]->store("",0, &my_charset_latin1);
|
||||
|
||||
col_privs->file->ha_index_init(0, 1);
|
||||
if (col_privs->file->index_read(col_privs->record[0], (uchar*) key,
|
||||
(key_part_map)15, HA_READ_KEY_EXACT))
|
||||
if (col_privs->file->index_read_map(col_privs->record[0], (uchar*) key,
|
||||
(key_part_map)15, HA_READ_KEY_EXACT))
|
||||
{
|
||||
cols = 0; /* purecov: deadcode */
|
||||
col_privs->file->ha_index_end();
|
||||
@ -2511,8 +2513,8 @@ static int replace_column_table(GRANT_TABLE *g_t,
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
if (table->file->index_read(table->record[0], user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_map(table->record[0], user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
if (revoke_grant)
|
||||
{
|
||||
@ -2589,8 +2591,9 @@ static int replace_column_table(GRANT_TABLE *g_t,
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
key_prefix_length);
|
||||
|
||||
if (table->file->index_read(table->record[0], user_key, (key_part_map)15,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_map(table->record[0], user_key,
|
||||
(key_part_map)15,
|
||||
HA_READ_KEY_EXACT))
|
||||
goto end;
|
||||
|
||||
/* Scan through all rows with the same host,db,user and table */
|
||||
@ -2691,8 +2694,9 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
|
||||
key_copy(user_key, table->record[0], table->key_info,
|
||||
table->key_info->key_length);
|
||||
|
||||
if (table->file->index_read_idx(table->record[0], 0, user_key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_idx_map(table->record[0], 0, user_key,
|
||||
HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
/*
|
||||
The following should never happen as we first check the in memory
|
||||
@ -2816,9 +2820,10 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name,
|
||||
TRUE);
|
||||
store_record(table,record[1]); // store at pos 1
|
||||
|
||||
if (table->file->index_read_idx(table->record[0], 0,
|
||||
(uchar*) table->field[0]->ptr, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
if (table->file->index_read_idx_map(table->record[0], 0,
|
||||
(uchar*) table->field[0]->ptr,
|
||||
HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
/*
|
||||
The following should never happen as we first check the in memory
|
||||
@ -5015,9 +5020,9 @@ static int handle_grant_table(TABLE_LIST *tables, uint table_no, bool drop,
|
||||
table->key_info->key_part[1].store_length);
|
||||
key_copy(user_key, table->record[0], table->key_info, key_prefix_length);
|
||||
|
||||
if ((error= table->file->index_read_idx(table->record[0], 0,
|
||||
user_key, (key_part_map)3,
|
||||
HA_READ_KEY_EXACT)))
|
||||
if ((error= table->file->index_read_idx_map(table->record[0], 0,
|
||||
user_key, (key_part_map)3,
|
||||
HA_READ_KEY_EXACT)))
|
||||
{
|
||||
if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user