Commit 00e65b5
Mats Kindahl
Bug #52131: SET and ENUM stored endian-dependent in binary log
Replication SET and ENUM fields from a big-endian to a little-
endian machine (or the opposite) that are represented using
more than 1 byte (SET fields with more than 8 members or ENUM
fields with more than 256 constants) will fail to replicate
correctly when using row-based replication.
The reason is that there are no pack() or unpack() functions
for Field_set or Field_enum, which make them rely on Field::pack
and Field::unpack. These functions pack data as strings, but
since Field_set and Field_enum use integral types for
representation, the fields are stored incorrectly on big-endian
machines.
This patch adds Field_enum::pack and Field_enum::unpack
functions that store the integral value correctly in the binary
log even on big-endian machines. Since Field_set inherits from
Field_enum, it will use the same functions for packing and
unpacking the field.
--BZR--
revision-id: [email protected]
property-branch-nick: b52131-5.5
property-file-info: ld7:file_id61:sp1f-field.cc-19700101030959-f4imaofclsea3n4fj4ow5m7havmyxa2r7:message100:Removing some obsolete debug printouts and adding Field_enum::pack
property-file-info: and Field_enum::unpack functions.4:path12:sql/field.cced7:file_id60:sp1f-field.h-19700101030959-3n6smzxcwkjl7bikm3wg4hfkjn66uvvp7:message149:Adding helper functions for packing and unpacking 16- and
property-file-info: 24-bit integral types.
property-file-info:
property-file-info: Field_short::pack and Field_short::unpack now use these functions.
property-file-info: 4:path11:sql/field.hed7:file_id66:sp1f-rpl_record.cc-20070413125523-wuthuk5jk7uxikuioz6esll6xakdngs47:message72:Removing some obsolete debug printouts and adding some
property-file-info: more useful ones.4:path17:sql/rpl_record.ccee
testament3-sha1: 10ef1f6aef027a8b18b90e24379a3c0d4e97540a1 parent 241a67e commit 00e65b5
3 files changed
Lines changed: 127 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7725 | 7725 | | |
7726 | 7726 | | |
7727 | 7727 | | |
7728 | | - | |
7729 | | - | |
7730 | | - | |
7731 | | - | |
7732 | | - | |
7733 | | - | |
7734 | 7728 | | |
7735 | 7729 | | |
7736 | 7730 | | |
| |||
7751 | 7745 | | |
7752 | 7746 | | |
7753 | 7747 | | |
7754 | | - | |
7755 | | - | |
| 7748 | + | |
7756 | 7749 | | |
7757 | 7750 | | |
7758 | 7751 | | |
| |||
8396 | 8389 | | |
8397 | 8390 | | |
8398 | 8391 | | |
| 8392 | + | |
| 8393 | + | |
| 8394 | + | |
| 8395 | + | |
| 8396 | + | |
| 8397 | + | |
| 8398 | + | |
| 8399 | + | |
| 8400 | + | |
| 8401 | + | |
| 8402 | + | |
| 8403 | + | |
| 8404 | + | |
| 8405 | + | |
| 8406 | + | |
| 8407 | + | |
| 8408 | + | |
| 8409 | + | |
| 8410 | + | |
| 8411 | + | |
| 8412 | + | |
| 8413 | + | |
| 8414 | + | |
| 8415 | + | |
| 8416 | + | |
| 8417 | + | |
| 8418 | + | |
| 8419 | + | |
| 8420 | + | |
| 8421 | + | |
| 8422 | + | |
| 8423 | + | |
| 8424 | + | |
| 8425 | + | |
| 8426 | + | |
| 8427 | + | |
| 8428 | + | |
| 8429 | + | |
| 8430 | + | |
| 8431 | + | |
| 8432 | + | |
| 8433 | + | |
| 8434 | + | |
| 8435 | + | |
8399 | 8436 | | |
8400 | 8437 | | |
8401 | 8438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
557 | 599 | | |
558 | 600 | | |
559 | 601 | | |
| |||
598 | 640 | | |
599 | 641 | | |
600 | 642 | | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
601 | 669 | | |
602 | 670 | | |
603 | 671 | | |
| |||
918 | 986 | | |
919 | 987 | | |
920 | 988 | | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
| 989 | + | |
936 | 990 | | |
937 | 991 | | |
938 | 992 | | |
939 | 993 | | |
940 | 994 | | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
| 995 | + | |
956 | 996 | | |
957 | 997 | | |
958 | 998 | | |
| |||
1895 | 1935 | | |
1896 | 1936 | | |
1897 | 1937 | | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1898 | 1944 | | |
1899 | 1945 | | |
1900 | 1946 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
| |||
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
383 | | - | |
384 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
385 | 387 | | |
386 | 388 | | |
387 | 389 | | |
| |||
0 commit comments