1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

my_dir() cleanup

* replace pointer acrobatics with a struct
* make sorting explicit: MY_DONT_SORT -> MY_WANT_SORT
(if you want something to be done - say it. fixes all places where
my_dir() was used without thinking)
* typo s/number_off_files/number_of_files/
* directory_file_name() doesn't need to be extern
* remove #ifdef __BORLANDC__
* ignore '.' and '..' entries
This commit is contained in:
Sergei Golubchik
2013-04-07 15:19:45 +02:00
parent fdcaa6cb32
commit bbbd7cedf5
14 changed files with 125 additions and 210 deletions

View File

@ -9230,15 +9230,10 @@ my_bool mysql_rm_tmp_tables(void)
/* Remove all SQLxxx tables from directory */
for (idx=0 ; idx < (uint) dirp->number_off_files ; idx++)
for (idx=0 ; idx < (uint) dirp->number_of_files ; idx++)
{
file=dirp->dir_entry+idx;
/* skiping . and .. */
if (file->name[0] == '.' && (!file->name[1] ||
(file->name[1] == '.' && !file->name[2])))
continue;
if (!memcmp(file->name, tmp_file_prefix,
tmp_file_prefix_length))
{