trigger will be created, whenever the deletion of the original table and add and change operations, will trigger the corresponding operation of the new table. So there can be no other trigger on the original table, that is, if there is a trigger on the original table, the OSC will strike2. Foreign keyForeign keys make the table operation more complex, if the original table has foreign keys, automatic rename of the original table and the operation of the new table will not be smooth, you have to
explicit threshold, such as, you can use either "threads_connected:110" or "threads_connected=110".The purpose of this option was to prevent the tool from adding too much load to the server. If the Data-copy queries isIntrusive, or if they cause lock waits, then other queries on the server would tend to block and queue. This would typicallyCause threads_running to increase, and the tool can detect this by running SHOW GLOBAL STATUS immediately after each query Finishes.If you specify a threshol
Note: This article from the real production case, thank the Netizen small dolphin to provide, I have to reproduce the fault check.SceneIn order to tidy up the line of independent table space fragmentation, so the use of Pt-online-schema-change in the slave from the Library, the purpose is to avoid affecting the main Library CPU, maintain a master-slave switchover, and then shrink the table space fragmentat
./pt-online-schema-change--user=root--password=root456--recursion-method= "Processlist"--chunk-size=50000-- alter= "Modify column emp_no bigint not NULL auto_increment" H=192.168.31.64,p=3306,d=employees,t=tmp_employees-- ExecuteCreate an intermediate table that is the same as the original table structure, with the name generally beginning with _ and new endingCREATE TABLE ' employees '. ' _tmp_employees_ne
When pt-online-schema-change is used for the relationship between pt-online-schema-change and default value, the following error occurs, causing table modification failure:
Copying rows caused a MySQL error 1364, Message: Field 'XXX' doesn' t have a default value
Example 1:
# Modified SQL: ALTER TABLE 'live _ comment'
When Using Pt-Online-schema-change, the following error occurs, causing table modification to fail:
Copying rows caused a MySQL error 1364, message: Field 'xxx' doesn' t have a default value
Example 1:
# Modified SQL: ALTER TABLE 'Live _ comment' add 'sourcefrom' varchar (15) Character Set utf8 collate utf8_general_ci not null comment 'source flag 'after 'IP ', add 'type' int unsigned not null default '0'
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.