【发布时间】:2015-05-06 10:42:51
【问题描述】:
在mysql database中,我们对insert、update和delete数据使用的命令默认是Transaction?
I mean to say, If we insert 1 corore rows from one table to another and the connection break from some reason, then the half rows are being insert or nothing would be insert?
我在这里很困惑,它是否在事务中工作。
/usr/bin/mysqldump -h ${SYSTEMIP} -u${SOURCEUSER} -p${SOURCEPASS} \
--skip-add-drop-table -t --skip-lock-tables --single-transaction --skip-add-locks --complete-insert -e -q --skip-disable-keys \
--where="id=${ID}" \ ${SOURCEDB} ${SOURCETABLE} | sed -e "s/${SOURCETABLE}/${TARGETTABLE}/g" >> /tmp/sample.sql;
从上面的脚本代码中 --single-transaction 是什么意思?
【问题讨论】:
-
请大家在这里回答!
-
什么是
1 corore rows? -
@N.B.这意味着超过 1 个 carore 行被移动到另一个表。
-
如何使用 shell script.meance 如何在 shell 脚本中使用提交和回滚
-
请告诉我 /usr/bin/mysqldump -h ${SYSTEMIP} -u${SOURCEUSER} -p${SOURCEPASS} \ --skip-add-drop-table -t --skip -lock-tables --single-transaction --skip-add-locks --complete-insert -e -q --skip-disable-keys \ --where="id=${ID}" \ ${SOURCEDB} ${SOURCETABLE} | sed -e "s/${SOURCETABLE}/${TARGETTABLE}/g" >> /tmp/sample.sql;由此看来,--single-transaction 是什么?
标签: mysql transactions