tailieunhanh - MySQL Administrator's Bible- P7

MySQL Administrator's Bible- P7: Với tập trung đặc biệt vào việc phát hành lớn tiếp theo của MySQL, nguồn tài nguyên này cung cấp một khuôn khổ vững chắc cho bất cứ ai mới vào MySQL hoặc chuyển từ một nền tảng cơ sở dữ liệu, cũng như các quản trị MySQL kinh nghiệm. Các bộ đôi tác giả cao hồ sơ cung cấp bảo hiểm thiết yếu của các nguyên tắc cơ bản của phạm vi bảo hiểm cơ sở dữ liệu quản lý, bao gồm cả cách tiếp cận độc đáo MySQL của các tính năng cơ sở. | Stored Routines Triggers and Events 7 ontinued Whether or not a stored routine is deterministic is important due to binary logging. A deterministic stored routine will replicate without a problem however a stored routine that is not deterministic may have problems replicating. If binary logging is set as statement-based see Chapter 16 the binary log contains the statements that change data so they can be replayed during an incremental restore or during replication. A stored routine that is not deterministic may have a different output given the same input which means that an incremental restore or slave will not have data that matches the original data. Be very careful when using a stored routine that is not deterministic because statement-based binary logging may not be adequate to store the data changes. If data integrity is a concern use row-based binary logging or a deterministic stored routine instead. Unfortunately at the time of this writing the DETERMINISTIC and NOT DETERMINISTIC options serve only as comments and are not verified by mysqld. There are no warnings or errors if a non-deterministic routine is set as DETERMINISTIC. MySQL will throw an error and refuse to create a stored function if binary logging of that function may be unsafe ERROR 1418 HY000 This function has none of DETERMINISTIC NO SQL or READS SQL DATA in its declaration and binary logging is enabled you might want to use the less safe log_bin_trust_function_ creators variable The best way to fix this problem is to declare the function to be DETERMINISTIC NO SQL or READS DATA. The next best way is to have a user with the SUPER privilege define the function. Turning binary logging off is another way to fix this issue though it may not be possible. Setting log_bin_trust_function_creators to 1 will also fix this issue though it is less safe because you may end up attempting to replicate a function that is not safe for replication. SQL usage The remaining option is what SQL statements the .

TỪ KHÓA LIÊN QUAN