| 1 |
-- source include/have_myisam.inc |
| 2 |
-- source include/force_myisam_default.inc |
| 3 |
-- source include/have_binlog_format_statement.inc |
| 4 |
RESET MASTER; |
| 5 |
# |
| 6 |
# BUG#49562: SBR out of sync when using numeric data types + user variable |
| 7 |
# |
| 8 |
|
| 9 |
-- let $max_unsigned_long= 18446744073709551615 |
| 10 |
-- let $min_signed_long= -9223372036854775808 |
| 11 |
-- eval SET @positive= $max_unsigned_long |
| 12 |
-- eval SET @negative= $min_signed_long |
| 13 |
|
| 14 |
CREATE TABLE t1 (`tinyint` TINYINT, |
| 15 |
`smallint` SMALLINT, |
| 16 |
`mediumint` MEDIUMINT, |
| 17 |
`integer` INTEGER, |
| 18 |
`bigint` BIGINT, |
| 19 |
`utinyint` TINYINT UNSIGNED, |
| 20 |
`usmallint` SMALLINT UNSIGNED, |
| 21 |
`umediumint` MEDIUMINT UNSIGNED, |
| 22 |
`uinteger` INTEGER UNSIGNED, |
| 23 |
`ubigint` BIGINT UNSIGNED, |
| 24 |
`double` DOUBLE, |
| 25 |
`float` FLOAT, |
| 26 |
`real` REAL(30,2), |
| 27 |
`decimal` DECIMAL(30,2)) ENGINE = MyISAM; |
| 28 |
|
| 29 |
-- echo ### insert max unsigned |
| 30 |
-- echo ### a) declarative |
| 31 |
-- disable_warnings |
| 32 |
-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); |
| 33 |
-- enable_warnings |
| 34 |
TRUNCATE t1; |
| 35 |
|
| 36 |
-- echo ### b) user var |
| 37 |
-- disable_warnings |
| 38 |
INSERT IGNORE INTO t1 VALUES (@positive, |
| 39 |
@positive, |
| 40 |
@positive, |
| 41 |
@positive, |
| 42 |
@positive, |
| 43 |
@positive, |
| 44 |
@positive, |
| 45 |
@positive, |
| 46 |
@positive, |
| 47 |
@positive, |
| 48 |
@positive, |
| 49 |
@positive, |
| 50 |
@positive, |
| 51 |
@positive); |
| 52 |
-- enable_warnings |
| 53 |
|
| 54 |
-- echo ## assertion: checks that User_var_log_event::pack_info |
| 55 |
-- echo ## correctly displays the binlog content by taking into |
| 56 |
-- echo ## account the unsigned_flag |
| 57 |
-- source include/show_binlog_events.inc |
| 58 |
|
| 59 |
-- echo ### insert min signed |
| 60 |
-- echo ### a) declarative |
| 61 |
-- disable_warnings |
| 62 |
-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); |
| 63 |
-- enable_warnings |
| 64 |
TRUNCATE t1; |
| 65 |
|
| 66 |
-- echo ### b) user var |
| 67 |
-- disable_warnings |
| 68 |
INSERT IGNORE INTO t1 VALUES (@negative, |
| 69 |
@negative, |
| 70 |
@negative, |
| 71 |
@negative, |
| 72 |
@negative, |
| 73 |
@negative, |
| 74 |
@negative, |
| 75 |
@negative, |
| 76 |
@negative, |
| 77 |
@negative, |
| 78 |
@negative, |
| 79 |
@negative, |
| 80 |
@negative, |
| 81 |
@negative); |
| 82 |
-- enable_warnings |
| 83 |
|
| 84 |
-- echo ## assertion: checks that User_var_log_event::pack_info |
| 85 |
-- echo ## correctly displays the binlog content by taking into |
| 86 |
-- echo ## account the unsigned_flag |
| 87 |
-- source include/show_binlog_events.inc |
| 88 |
|
| 89 |
DROP TABLE t1; |