![]() ![]() ![]() Now Let's try to delete record from Transaction 2 using column Name as well as Primary key. Mysql> delete from test1 where name = 'shit1' Mysql> insert into test1(name) values ('shit1') Mysql> SET TRANSACTION ISOLATION LEVEL READ COMMITTED Here, the MySQL is not trying to lock uncommitted rows, but it locks all rows from table upto auto-incremented value if index on specific column is not defined ( using which we are deleting row). Give it a Try, and let me know how it goes. MYI to different folders from the OS, create hard links, run FLUSH TABLES and INSERT your data. Notwithstanding, you create the empty table, move the. I doubt if Oracle will implement the DATA DIRECTORY and INDEX DIRECTORY options since the default storage engine is now InnoDB. I learned something about MySQL for Windows. Just use mklink to create hard links instead of symlinks. Mysql> show create table data_table_sharded\G Mysql> INSERT INTO data_table_sharded SELECT * FROM data_table ![]() I went back to MySQL and loaded the data from data_table: Hardlink created for data_table_sharded.MYI > C:\ndx\data_table_sharded.MYI Hardlink created for data_table_sharded.MYD C:\dat\data_table_sharded.MYDĬ:\MySQL\data\test>mklink /H data_table_sharded.MYI C:\ndx\data_table_sharded.MYI I created those folders and created hard links for data_table_shardedĬ:\MySQL\data\test>mklink /H data_table_sharded.MYD C:\dat\data_table_sharded.MYD You still cannot use the DATA DIRECTORY AND INDEX DIRECTORY option in CREATE TABLE or ALTER TABLE. Query OK, 0 rows affected, 2 warnings (0.02 sec) Mysql> ALTER TABLE data_table_sharded DATA DIRECTORY='C:\DAT' INDEX DIRECTORY='C:\NDX' Mysql> CREATE TABLE data_table_sharded LIKE data_table Mysql> CREATE TABLE data_table (a int,primary key(a)) ENGINE=MyISAM Mysql> drop table if exists data_table_sharded DATA DIRECTORY='.' INDEX DIRECTORY='.' in Windows.ĬREATE TABLE data_table (a int,primary key(a)) ENGINE=MyISAM ĬREATE TABLE data_table_sharded LIKE data_table ĪLTER TABLE data_table_sharded DATA DIRECTORY='C:\DAT' INDEX DIRECTORY='C:\NDX' I AM SHOCKED !!! That means you can experiment with CREATE TABLE. ![]() Target specifies the path (relative or absolute) that the new link Link specifies the new symbolic link name. H Creates a hard link instead of a symbolic link. On my Windows 7 machines at home, the command line utility mklink exists: I also discovered that symlinking is possible in Windows: Interestinging, MySQL 5.5.15 on my Windows 7 machines says symlink support exists: However, in Windows, you can manually move the. Migrating s single MyISAM table to another disk is only possible in Linux versions, not Windows, of MySQL with the DATA DIRECTORY and INDEX DIRECTORY clauses of ALTER TABLE on a MyISAM table. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |