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
|
||||
mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
|
||||
|
||||
|
||||
unix_to_dos $BASE/README
|
||||
mv $BASE/README $BASE/README.txt
|
||||
|
||||
|
@ -318,7 +317,7 @@ mv $BASE/README $BASE/README.txt
|
|||
|
||||
if [ -d $BASE/SSL/SCCS ]
|
||||
then
|
||||
find $BASE -type d -name SCCS | xargs rm -r -f
|
||||
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
|
@ -154,12 +154,13 @@ then
|
|||
i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);"
|
||||
if test "$windows" = "0"
|
||||
then
|
||||
i_u="$i_u
|
||||
i_u="$i_u
|
||||
INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
|
||||
INSERT INTO user (host,user) values ('$hostname','');
|
||||
INSERT INTO user (host,user) values ('localhost','');"
|
||||
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
|
||||
|
|
|
@ -213,7 +213,7 @@ then
|
|||
fi
|
||||
mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
|
||||
--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 \
|
||||
| eval "$mysqld_install_cmd_line"
|
||||
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
|
||||
file->extra(HA_EXTRA_KEYREAD); // QQ is removed
|
||||
next_pos=(byte*) 0; /* Find records in sequence */
|
||||
file->ha_rnd_init();
|
||||
file->ha_rnd_init(1);
|
||||
file->extra_opt(HA_EXTRA_CACHE,
|
||||
current_thd->variables.read_buff_size);
|
||||
}
|
||||
|
|
|
@ -1583,14 +1583,18 @@ int ha_berkeley::index_last(byte * buf)
|
|||
int ha_berkeley::rnd_init(bool scan)
|
||||
{
|
||||
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;
|
||||
DBUG_RETURN(index_init(primary_key));
|
||||
}
|
||||
|
||||
int ha_berkeley::rnd_end()
|
||||
{
|
||||
active_index= MAX_KEY;
|
||||
#ifdef NOT_YET
|
||||
DBUG_ASSERT(active_index == MAX_KEY);
|
||||
#endif
|
||||
return index_end();
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ class ha_berkeley: public handler
|
|||
int index_prev(byte * buf);
|
||||
int index_first(byte * buf);
|
||||
int index_last(byte * buf);
|
||||
int rnd_init(bool scan=1);
|
||||
int rnd_init(bool scan);
|
||||
int rnd_end();
|
||||
int rnd_next(byte *buf);
|
||||
int rnd_pos(byte * buf, byte *pos);
|
||||
|
|
|
@ -72,7 +72,7 @@ class ha_heap: public handler
|
|||
int index_prev(byte * buf);
|
||||
int index_first(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_pos(byte * buf, byte *pos);
|
||||
void position(const byte *record);
|
||||
|
|
|
@ -134,7 +134,7 @@ class ha_innobase: public handler
|
|||
int index_first(byte * buf);
|
||||
int index_last(byte * buf);
|
||||
|
||||
int rnd_init(bool scan=1);
|
||||
int rnd_init(bool scan);
|
||||
int rnd_end();
|
||||
int rnd_next(byte *buf);
|
||||
int rnd_pos(byte * buf, byte *pos);
|
||||
|
|
|
@ -63,7 +63,7 @@ class ha_isam: public handler
|
|||
int index_prev(byte * buf);
|
||||
int index_first(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_pos(byte * buf, byte *pos);
|
||||
void position(const byte *record);
|
||||
|
|
|
@ -53,7 +53,7 @@ class ha_isammrg: public handler
|
|||
int index_prev(byte * buf);
|
||||
int index_first(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_pos(byte * buf, byte *pos);
|
||||
void position(const byte *record);
|
||||
|
|
|
@ -1004,8 +1004,10 @@ bool ha_myisam::check_and_repair(THD *thd)
|
|||
{
|
||||
int error=0;
|
||||
int marked_crashed;
|
||||
char *old_query;
|
||||
uint old_query_length;
|
||||
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.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))
|
||||
check_opt.flags|=T_QUICK;
|
||||
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;
|
||||
uint 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 (check(thd, &check_opt))
|
||||
{
|
||||
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);
|
||||
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);
|
||||
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)
|
||||
{ return ft_init_search(flags,file,inx,(byte*) key,keylen, table->record[0]); }
|
||||
int ft_read(byte *buf);
|
||||
int rnd_init(bool scan=1);
|
||||
int rnd_init(bool scan);
|
||||
int rnd_next(byte *buf);
|
||||
int rnd_pos(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_last(byte * buf);
|
||||
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_pos(byte * buf, byte *pos);
|
||||
void position(const byte *record);
|
||||
|
|
|
@ -73,7 +73,7 @@ class ha_ndbcluster: public handler
|
|||
int index_prev(byte *buf);
|
||||
int index_first(byte *buf);
|
||||
int index_last(byte *buf);
|
||||
int rnd_init(bool scan=1);
|
||||
int rnd_init(bool scan);
|
||||
int rnd_end();
|
||||
int rnd_next(byte *buf);
|
||||
int rnd_pos(byte *buf, byte *pos);
|
||||
|
|
|
@ -222,11 +222,9 @@ bool ha_caching_allowed(THD* thd, char* table_key,
|
|||
{
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
if (cache_type == HA_CACHE_TBL_ASKTRANSACT)
|
||||
return innobase_query_caching_of_table_permitted(thd, table_key,
|
||||
key_length);
|
||||
else
|
||||
return innobase_query_caching_of_table_permitted(thd, table_key, key_length);
|
||||
#endif
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ha_init()
|
||||
|
|
|
@ -271,8 +271,8 @@ public:
|
|||
uint block_size; /* index block size */
|
||||
uint raid_type,raid_chunks;
|
||||
FT_INFO *ft_handler;
|
||||
bool auto_increment_column_changed;
|
||||
enum {NONE=0, INDEX, RND} inited;
|
||||
bool auto_increment_column_changed;
|
||||
bool implicit_emptied; /* Can be !=0 only if HEAP */
|
||||
|
||||
|
||||
|
@ -316,7 +316,7 @@ public:
|
|||
inited=NONE;
|
||||
return index_end();
|
||||
}
|
||||
int ha_rnd_init(bool scan=1)
|
||||
int ha_rnd_init(bool scan)
|
||||
{
|
||||
DBUG_ASSERT(inited==NONE || (inited==RND && scan));
|
||||
inited=RND;
|
||||
|
|
|
@ -117,7 +117,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
|
|||
{
|
||||
DBUG_PRINT("info",("using 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 */
|
||||
if (!table->no_cache &&
|
||||
(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())
|
||||
new_table.file->disable_indexes(HA_KEY_SWITCH_ALL);
|
||||
table->file->ha_index_or_rnd_end();
|
||||
table->file->ha_rnd_init();
|
||||
table->file->ha_rnd_init(1);
|
||||
if (table->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;
|
||||
new_record=(char*) table->record[1]+offset;
|
||||
|
||||
file->ha_rnd_init();
|
||||
file->ha_rnd_init(1);
|
||||
error=file->rnd_next(record);
|
||||
for (;;)
|
||||
{
|
||||
|
@ -7616,7 +7616,7 @@ static int remove_dup_with_hash_index(THD *thd, TABLE *table,
|
|||
(*field_length++)= (*ptr)->pack_length();
|
||||
}
|
||||
|
||||
file->ha_rnd_init();
|
||||
file->ha_rnd_init(1);
|
||||
key_pos=key_buffer;
|
||||
for (;;)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue