mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Added missing root user to mysql.user on windows. (Bug #4242)
Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938) Don't use default arguments for ha_rnd_init() Simple code cleanups since last pull
This commit is contained in:
parent
00dc9a0e91
commit
f6765146c1
19 changed files with 52 additions and 49 deletions
0
scripts/fill_func_tables.sh
Executable file → Normal file
0
scripts/fill_func_tables.sh
Executable file → Normal file
3
scripts/make_win_src_distribution.sh
Executable file → Normal file
3
scripts/make_win_src_distribution.sh
Executable file → Normal file
|
@ -308,7 +308,6 @@ done
|
||||||
./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new
|
./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new
|
||||||
mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
|
mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
|
||||||
|
|
||||||
|
|
||||||
unix_to_dos $BASE/README
|
unix_to_dos $BASE/README
|
||||||
mv $BASE/README $BASE/README.txt
|
mv $BASE/README $BASE/README.txt
|
||||||
|
|
||||||
|
@ -318,7 +317,7 @@ mv $BASE/README $BASE/README.txt
|
||||||
|
|
||||||
if [ -d $BASE/SSL/SCCS ]
|
if [ -d $BASE/SSL/SCCS ]
|
||||||
then
|
then
|
||||||
find $BASE -type d -name SCCS | xargs rm -r -f
|
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -159,7 +159,8 @@ then
|
||||||
INSERT INTO user (host,user) values ('$hostname','');
|
INSERT INTO user (host,user) values ('$hostname','');
|
||||||
INSERT INTO user (host,user) values ('localhost','');"
|
INSERT INTO user (host,user) values ('localhost','');"
|
||||||
else
|
else
|
||||||
i_u="INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);"
|
i_u="$i_u
|
||||||
|
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -213,7 +213,7 @@ then
|
||||||
fi
|
fi
|
||||||
mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
|
mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
|
||||||
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
|
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
|
||||||
--skip-bdb $args"
|
--skip-bdb $args --max_allowed_packet=8M"
|
||||||
if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
|
if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
|
||||||
| eval "$mysqld_install_cmd_line"
|
| eval "$mysqld_install_cmd_line"
|
||||||
then
|
then
|
||||||
|
|
|
@ -373,7 +373,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
|
||||||
if (sort_form->key_read) // QQ Can be removed after the reset
|
if (sort_form->key_read) // QQ Can be removed after the reset
|
||||||
file->extra(HA_EXTRA_KEYREAD); // QQ is removed
|
file->extra(HA_EXTRA_KEYREAD); // QQ is removed
|
||||||
next_pos=(byte*) 0; /* Find records in sequence */
|
next_pos=(byte*) 0; /* Find records in sequence */
|
||||||
file->ha_rnd_init();
|
file->ha_rnd_init(1);
|
||||||
file->extra_opt(HA_EXTRA_CACHE,
|
file->extra_opt(HA_EXTRA_CACHE,
|
||||||
current_thd->variables.read_buff_size);
|
current_thd->variables.read_buff_size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1583,14 +1583,18 @@ int ha_berkeley::index_last(byte * buf)
|
||||||
int ha_berkeley::rnd_init(bool scan)
|
int ha_berkeley::rnd_init(bool scan)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("rnd_init");
|
DBUG_ENTER("rnd_init");
|
||||||
//DBUG_ASSERT(active_index==MAX_KEY);
|
#ifdef NOT_YET
|
||||||
|
DBUG_ASSERT(active_index == MAX_KEY);
|
||||||
|
#endif
|
||||||
current_row.flags=DB_DBT_REALLOC;
|
current_row.flags=DB_DBT_REALLOC;
|
||||||
DBUG_RETURN(index_init(primary_key));
|
DBUG_RETURN(index_init(primary_key));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ha_berkeley::rnd_end()
|
int ha_berkeley::rnd_end()
|
||||||
{
|
{
|
||||||
active_index= MAX_KEY;
|
#ifdef NOT_YET
|
||||||
|
DBUG_ASSERT(active_index == MAX_KEY);
|
||||||
|
#endif
|
||||||
return index_end();
|
return index_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ class ha_berkeley: public handler
|
||||||
int index_prev(byte * buf);
|
int index_prev(byte * buf);
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_end();
|
int rnd_end();
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
|
|
|
@ -72,7 +72,7 @@ class ha_heap: public handler
|
||||||
int index_prev(byte * buf);
|
int index_prev(byte * buf);
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
|
|
|
@ -134,7 +134,7 @@ class ha_innobase: public handler
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
|
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_end();
|
int rnd_end();
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
|
|
|
@ -63,7 +63,7 @@ class ha_isam: public handler
|
||||||
int index_prev(byte * buf);
|
int index_prev(byte * buf);
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ha_isammrg: public handler
|
||||||
int index_prev(byte * buf);
|
int index_prev(byte * buf);
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
|
|
|
@ -1004,8 +1004,10 @@ bool ha_myisam::check_and_repair(THD *thd)
|
||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
int marked_crashed;
|
int marked_crashed;
|
||||||
|
char *old_query;
|
||||||
|
uint old_query_length;
|
||||||
HA_CHECK_OPT check_opt;
|
HA_CHECK_OPT check_opt;
|
||||||
DBUG_ENTER("ha_myisam::auto_check_and_repair");
|
DBUG_ENTER("ha_myisam::check_and_repair");
|
||||||
|
|
||||||
check_opt.init();
|
check_opt.init();
|
||||||
check_opt.flags= T_MEDIUM | T_AUTO_REPAIR;
|
check_opt.flags= T_MEDIUM | T_AUTO_REPAIR;
|
||||||
|
@ -1013,30 +1015,29 @@ bool ha_myisam::check_and_repair(THD *thd)
|
||||||
if (!file->state->del && (myisam_recover_options & HA_RECOVER_QUICK))
|
if (!file->state->del && (myisam_recover_options & HA_RECOVER_QUICK))
|
||||||
check_opt.flags|=T_QUICK;
|
check_opt.flags|=T_QUICK;
|
||||||
sql_print_error("Warning: Checking table: '%s'",table->path);
|
sql_print_error("Warning: Checking table: '%s'",table->path);
|
||||||
if ((marked_crashed=mi_is_crashed(file)))
|
|
||||||
|
old_query= thd->query;
|
||||||
|
old_query_length= thd->query_length;
|
||||||
|
pthread_mutex_lock(&LOCK_thread_count);
|
||||||
|
thd->query= table->real_name;
|
||||||
|
thd->query_length= strlen(table->real_name);
|
||||||
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
|
|
||||||
|
if ((marked_crashed= mi_is_crashed(file)) || check(thd, &check_opt))
|
||||||
{
|
{
|
||||||
char *old_query= thd->query;
|
sql_print_error("Warning: Recovering table: '%s'",table->path);
|
||||||
uint old_query_length= thd->query_length;
|
check_opt.flags=
|
||||||
pthread_mutex_lock(&LOCK_thread_count);
|
((myisam_recover_options & HA_RECOVER_BACKUP ? T_BACKUP_DATA : 0) |
|
||||||
thd->query= table->real_name;
|
(marked_crashed ? 0 : T_QUICK) |
|
||||||
thd->query_length= strlen(table->real_name);
|
(myisam_recover_options & HA_RECOVER_FORCE ? 0 : T_SAFE_REPAIR) |
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
T_AUTO_REPAIR);
|
||||||
if (check(thd, &check_opt))
|
if (repair(thd, &check_opt))
|
||||||
{
|
error=1;
|
||||||
sql_print_error("Warning: Recovering table: '%s'",table->path);
|
|
||||||
check_opt.flags=
|
|
||||||
((myisam_recover_options & HA_RECOVER_BACKUP ? T_BACKUP_DATA : 0) |
|
|
||||||
(marked_crashed ? 0 : T_QUICK) |
|
|
||||||
(myisam_recover_options & HA_RECOVER_FORCE ? 0 : T_SAFE_REPAIR) |
|
|
||||||
T_AUTO_REPAIR);
|
|
||||||
if (repair(thd, &check_opt))
|
|
||||||
error=1;
|
|
||||||
}
|
|
||||||
pthread_mutex_lock(&LOCK_thread_count);
|
|
||||||
thd->query= old_query;
|
|
||||||
thd->query_length= old_query_length;
|
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
|
||||||
}
|
}
|
||||||
|
pthread_mutex_lock(&LOCK_thread_count);
|
||||||
|
thd->query= old_query;
|
||||||
|
thd->query_length= old_query_length;
|
||||||
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ class ha_myisam: public handler
|
||||||
FT_INFO *ft_init_ext(uint flags, uint inx,const byte *key, uint keylen)
|
FT_INFO *ft_init_ext(uint flags, uint inx,const byte *key, uint keylen)
|
||||||
{ return ft_init_search(flags,file,inx,(byte*) key,keylen, table->record[0]); }
|
{ return ft_init_search(flags,file,inx,(byte*) key,keylen, table->record[0]); }
|
||||||
int ft_read(byte *buf);
|
int ft_read(byte *buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
int restart_rnd_next(byte *buf, byte *pos);
|
int restart_rnd_next(byte *buf, byte *pos);
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ha_myisammrg: public handler
|
||||||
int index_first(byte * buf);
|
int index_first(byte * buf);
|
||||||
int index_last(byte * buf);
|
int index_last(byte * buf);
|
||||||
int index_next_same(byte *buf, const byte *key, uint keylen);
|
int index_next_same(byte *buf, const byte *key, uint keylen);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte * buf, byte *pos);
|
int rnd_pos(byte * buf, byte *pos);
|
||||||
void position(const byte *record);
|
void position(const byte *record);
|
||||||
|
|
|
@ -73,7 +73,7 @@ class ha_ndbcluster: public handler
|
||||||
int index_prev(byte *buf);
|
int index_prev(byte *buf);
|
||||||
int index_first(byte *buf);
|
int index_first(byte *buf);
|
||||||
int index_last(byte *buf);
|
int index_last(byte *buf);
|
||||||
int rnd_init(bool scan=1);
|
int rnd_init(bool scan);
|
||||||
int rnd_end();
|
int rnd_end();
|
||||||
int rnd_next(byte *buf);
|
int rnd_next(byte *buf);
|
||||||
int rnd_pos(byte *buf, byte *pos);
|
int rnd_pos(byte *buf, byte *pos);
|
||||||
|
|
|
@ -222,11 +222,9 @@ bool ha_caching_allowed(THD* thd, char* table_key,
|
||||||
{
|
{
|
||||||
#ifdef HAVE_INNOBASE_DB
|
#ifdef HAVE_INNOBASE_DB
|
||||||
if (cache_type == HA_CACHE_TBL_ASKTRANSACT)
|
if (cache_type == HA_CACHE_TBL_ASKTRANSACT)
|
||||||
return innobase_query_caching_of_table_permitted(thd, table_key,
|
return innobase_query_caching_of_table_permitted(thd, table_key, key_length);
|
||||||
key_length);
|
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ha_init()
|
int ha_init()
|
||||||
|
|
|
@ -271,8 +271,8 @@ public:
|
||||||
uint block_size; /* index block size */
|
uint block_size; /* index block size */
|
||||||
uint raid_type,raid_chunks;
|
uint raid_type,raid_chunks;
|
||||||
FT_INFO *ft_handler;
|
FT_INFO *ft_handler;
|
||||||
bool auto_increment_column_changed;
|
|
||||||
enum {NONE=0, INDEX, RND} inited;
|
enum {NONE=0, INDEX, RND} inited;
|
||||||
|
bool auto_increment_column_changed;
|
||||||
bool implicit_emptied; /* Can be !=0 only if HEAP */
|
bool implicit_emptied; /* Can be !=0 only if HEAP */
|
||||||
|
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ public:
|
||||||
inited=NONE;
|
inited=NONE;
|
||||||
return index_end();
|
return index_end();
|
||||||
}
|
}
|
||||||
int ha_rnd_init(bool scan=1)
|
int ha_rnd_init(bool scan)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(inited==NONE || (inited==RND && scan));
|
DBUG_ASSERT(inited==NONE || (inited==RND && scan));
|
||||||
inited=RND;
|
inited=RND;
|
||||||
|
|
|
@ -117,7 +117,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info",("using rr_sequential"));
|
DBUG_PRINT("info",("using rr_sequential"));
|
||||||
info->read_record=rr_sequential;
|
info->read_record=rr_sequential;
|
||||||
table->file->ha_rnd_init();
|
table->file->ha_rnd_init(1);
|
||||||
/* We can use record cache if we don't update dynamic length tables */
|
/* We can use record cache if we don't update dynamic length tables */
|
||||||
if (!table->no_cache &&
|
if (!table->no_cache &&
|
||||||
(use_record_cache > 0 ||
|
(use_record_cache > 0 ||
|
||||||
|
|
|
@ -5552,7 +5552,7 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
|
||||||
if (table->file->indexes_are_disabled())
|
if (table->file->indexes_are_disabled())
|
||||||
new_table.file->disable_indexes(HA_KEY_SWITCH_ALL);
|
new_table.file->disable_indexes(HA_KEY_SWITCH_ALL);
|
||||||
table->file->ha_index_or_rnd_end();
|
table->file->ha_index_or_rnd_end();
|
||||||
table->file->ha_rnd_init();
|
table->file->ha_rnd_init(1);
|
||||||
if (table->no_rows)
|
if (table->no_rows)
|
||||||
{
|
{
|
||||||
new_table.file->extra(HA_EXTRA_NO_ROWS);
|
new_table.file->extra(HA_EXTRA_NO_ROWS);
|
||||||
|
@ -7504,7 +7504,7 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
|
||||||
org_record=(char*) (record=table->record[0])+offset;
|
org_record=(char*) (record=table->record[0])+offset;
|
||||||
new_record=(char*) table->record[1]+offset;
|
new_record=(char*) table->record[1]+offset;
|
||||||
|
|
||||||
file->ha_rnd_init();
|
file->ha_rnd_init(1);
|
||||||
error=file->rnd_next(record);
|
error=file->rnd_next(record);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -7616,7 +7616,7 @@ static int remove_dup_with_hash_index(THD *thd, TABLE *table,
|
||||||
(*field_length++)= (*ptr)->pack_length();
|
(*field_length++)= (*ptr)->pack_length();
|
||||||
}
|
}
|
||||||
|
|
||||||
file->ha_rnd_init();
|
file->ha_rnd_init(1);
|
||||||
key_pos=key_buffer;
|
key_pos=key_buffer;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue