It is possible to run test cases against a production server.
在生產(chǎn)服務(wù)器上運(yùn)行測(cè)試用例是可能的葛虐。
This is very unlikely to happen by accident, as mysql-test-run.pl will start its own server unless you use the --extern Even so, try to write test cases in a way that reduces the risk that running tests will alter or destroy important tables, views, or other objects. (DROP DATABASE statements are particularly dangerous if written using names that could exist on a customer's machine.) To avoid such problems, we recommend the following naming conventions:
這是不太可能偶然發(fā)生的啼肩,因?yàn)閙ysql-test-run.pl將啟動(dòng)它自己的服務(wù)器,除非您使用——extern。即便如此爆价,嘗試以一種降低運(yùn)行測(cè)試將改變或破壞重要表担汤、視圖或其他對(duì)象的風(fēng)險(xiǎn)的方式編寫測(cè)試用例。(如果使用客戶機(jī)器上可能存在的名稱來編寫DROP DATABASE語句明也,則特別危險(xiǎn)宣虾。)為避免此類問題,我們建議采用以下命名約定:
User names: User names should begin with “mysql” (for example, mysqluser1, mysqluser2)
用戶名:以“mysql”開頭(例如mysqluser1, mysqluser2)Database names: Unless you have a special reason not to, use the default database named test that is already created for you. For tests that need to operate outside the test database, database names should contain “test” or begin with “mysql” (for example, mysqltest1, mysqltest2)
數(shù)據(jù)庫名稱:除非有特殊原因温数,否則請(qǐng)使用已經(jīng)為您創(chuàng)建的默認(rèn)數(shù)據(jù)庫test绣硝。對(duì)于需要在測(cè)試數(shù)據(jù)庫外部操作的測(cè)試,數(shù)據(jù)庫名稱應(yīng)該包含“test”或以“mysql”開頭(例如帆吻,mysqltest1, mysqltest2)Table names: t1, t2, t3, ...
View names: v1, v2, v3, ...
For examples of how to name objects, examine the existing test cases. Of course, you can name columns and other objects inside tables as you wish.
對(duì)于如何命名對(duì)象的例子域那,請(qǐng)檢查現(xiàn)有的測(cè)試用例。當(dāng)然猜煮,您可以根據(jù)自己的意愿命名表中的列和其他對(duì)象次员。