3
我們試圖解析一個文件並將其存儲在MySQL數據庫中。這些命令將導入一個大型跟蹤文件,大小可能爲幾GB,因此用戶可能會感興趣的是跟蹤命令的進度。我們使用下面的命令:實現MySQL命令進度條
String commandText = "SET AUTOCOMMIT = 0; "
+ "START TRANSACTION; "
+ "LOAD DATA LOCAL INFILE \'" + filePath + "\' "
+ "INTO TABLE testdatabase.metadata "
+ @"FIELDS TERMINATED BY '\t' "
+ @"LINES TERMINATED BY '\n' "
+ "(Position,"
+ "Timespace,"
+ "Duration,"
+ "Disk,"
+ "Request,"
+ "Sector,"
+ "Length); "
+ "COMMIT;";
有沒有辦法同時爲了實現一個進度條正在執行的命令,以跟蹤進度?