我在 shell 脚本中有以下两个语句:
32 /usr/local/mysql/bin/mysql -u root files -e "TRUNCATE path"
33 /usr/local/mysql/bin/mysql -u root files -e "
34 LOAD DATA INFILE '/tmp/files.txt'
35 INTO TABLE path
36 FIELDS TERMINATED BY ','
37 (size, @d2, @d3, @d4, @d5, path)
38 SET last_modified=str_to_date(CONCAT(@d2, ',', @d3, ',', @d4, ',', @d5), '%b,%d,%T,%Y');"
39 }
我将如何使从第 32 行和第 32 行开始的命令要么都工作要么都失败(事务)?