diff options
author | unknown <monty@hundin.mysql.fi> | 2001-06-05 03:38:10 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-06-05 03:38:10 +0300 |
commit | fe1842d9ee1a7e51f74ca192d3181968f16a0b29 (patch) | |
tree | 0630af7b21e80e56fc1ef68e9c7d0fa7233958a1 /sql/ha_myisam.cc | |
parent | c866beb5132157903765327fef1c71693d2204ae (diff) | |
download | mariadb-git-fe1842d9ee1a7e51f74ca192d3181968f16a0b29.tar.gz |
Symlinking of tables should not work.
Fixed error number handling bug in mysqltest.
Fixed that error number from insert delayed is reported correctly.
merged new vio code with old violite code.
client/mysqltest.c:
Fixed bug that error numbers wasn't tested properly.
myisam/mi_check.c:
Moved initialization of variables to avoid a bug.
myisam/mi_create.c:
Fixed bug in symlink handling.
myisam/mi_test_all.sh:
Fixed script so that it works.
myisam/myisamchk.c:
Removed --no-symlinks option
mysql-test/mysql-test-run.sh:
Cleaned up error message
mysql-test/t/bdb.test:
Fixed wrong error numbers
mysql-test/t/err000001.test:
Fixed wrong error numbers
mysql-test/t/innodb.test:
Fixed wrong error numbers
mysql-test/t/overflow.test:
Fixed wrong error numbers
mysql-test/t/status.test:
Ensure that we are using myisam tables for the lock test.
mysys/my_delete.c:
cleanup
mysys/my_symlink2.c:
Added option to not overwrite files when using symlinks.
sql/Makefile.am:
Moved vio to avoid link error.
sql/ha_myisam.cc:
Fixed symlink handling.
sql/mysqld.cc:
Changed --skip-symlinks to --skip-symlink
sql/sql_insert.cc:
Fixed that error number from insert delayed is reported correctly
sql/sql_parse.cc:
Fixed symlink handling.
sql/sql_table.cc:
Fixed symlink handling.
vio/vio.c:
cleanup
vio/viosocket.c:
c
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index a8e5faa6eda..5ecaa83cce9 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -527,8 +527,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) int error=0; uint extra_testflag=0; bool optimize_done= !optimize, statistics_done=0; - char fixed_name[FN_REFLEN]; const char *old_proc_info=thd->proc_info; + char fixed_name[FN_REFLEN]; MYISAM_SHARE* share = file->s; ha_rows rows= file->state->records; DBUG_ENTER("ha_myisam::repair"); @@ -540,8 +540,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) param.thd=thd; param.tmpdir=mysql_tmpdir; param.out_flag=0; - VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT, - 4+ (param.opt_follow_links ? 16 : 0))); + strmov(fixed_name,file->filename); // Don't lock tables if we have used LOCK TABLE if (!thd->locked_tables && mi_lock_database(file,F_WRLCK)) @@ -847,14 +846,14 @@ void ha_myisam::info(uint flag) /* Set data_file_name and index_file_name to point at the symlink value - if table is symlinked + if table is symlinked (Ie; Real name is not same as generated name) */ data_file_name=index_file_name=0; - fn_format(name_buff, file->filename, "", MI_NAME_IEXT, 4); - if (!strcmp(name_buff, info.data_file_name)) + fn_format(name_buff, file->filename, "", MI_NAME_DEXT, 2); + if (strcmp(name_buff, info.data_file_name)) data_file_name=info.data_file_name; - strmov(fn_ext(name_buff),MI_NAME_DEXT); - if (!strcmp(name_buff, info.index_file_name)) + strmov(fn_ext(name_buff),MI_NAME_IEXT); + if (strcmp(name_buff, info.index_file_name)) index_file_name=info.index_file_name; } if (flag & HA_STATUS_ERRKEY) @@ -1099,7 +1098,7 @@ int ha_myisam::create(const char *name, register TABLE *form, create_info.data_file_name= info->data_file_name; create_info.index_file_name=info->index_file_name; - error=mi_create(fn_format(buff,name,"","",2+4+16), + error=mi_create(fn_format(buff,name,"","",2+4), form->keys,keydef, (uint) (recinfo_pos-recinfo), recinfo, 0, (MI_UNIQUEDEF*) 0, |