Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_cmp_varchar_charset.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 create table t1
7 (id varchar(50) NOT NULL,
8 str varchar(50) NOT NULL,
9 primary key (`id`,`str`))
10 engine = ndb default charset=latin1;
11 insert into t1(id, str) values ("1","one ");
12 select "'one' IS EQUAL 'one ...'" from dual where "one" = "one ";
13 'one' IS EQUAL 'one ...'
14 select concat("<<<",str,">>>") from t1 where str = "one" and id="1";
15 concat("<<<",str,">>>")
16 <<<one >>>
17 select concat("<<<",str,">>>") from t1 where str = "one";
18 concat("<<<",str,">>>")
19 <<<one >>>
20 Check content on replica
21 select concat("<<<",str,">>>") from t1 where str = "one" and id="1";
22 concat("<<<",str,">>>")
23 <<<one >>>
24 select concat("<<<",str,">>>") from t1 where str = "one";
25 concat("<<<",str,">>>")
26 <<<one >>>
27 Update content on primary, remove trailing spaces
28 update t1 set str="one" where id="1";
29 select concat("<<<",str,">>>") from t1;
30 concat("<<<",str,">>>")
31 <<<one>>>
32 Verify the replica update, no trailing spaces anymore!
33 select concat("<<<",str,">>>") from t1;
34 concat("<<<",str,">>>")
35 <<<one>>>
36 Double check: Primary update it back to original value
37 update t1 set str="one " where id="1";
38 select concat("<<<",str,">>>") from t1;
39 concat("<<<",str,">>>")
40 <<<one >>>
41 Verify the replica update, see trailing space again
42 select concat("<<<",str,">>>") from t1;
43 concat("<<<",str,">>>")
44 <<<one >>>
45 drop table t1;
46 ##########################################
47 # bug#34388068 NDB:Update to char data type columns in
48 # primay keys are lost on replica.
49 set global ndb_log_updated_only=0;
50 set global ndb_log_update_as_write=0;
51 set global ndb_log_update_minimal=0;
52
53
54 #####################################
55 show variables like 'ndb_log_update_%';
56 Variable_name Value
57 ndb_log_update_as_write OFF
58 ndb_log_update_minimal OFF
59 ndb_log_updated_only OFF
60 #####################################
61 ############## Varchar ##############
62 create table t1(str varchar(32) primary key) engine = ndb;
63 Insert space padded row, then update it to non-padded
64 insert into t1(str) values ("one ");
65 update t1 set str="one";
66 Verify the replica update, no trailing spaces anymore!
67 select concat("<<<",str,">>>") from t1;
68 concat("<<<",str,">>>")
69 <<<one>>>
70 drop table t1;
71 #########################################
72 ############## Longvarchar ##############
73 create table t1(str varchar(512) primary key) engine = ndb;
74 Insert space padded row, then update it to non-padded
75 insert into t1(str) values ("one ");
76 update t1 set str="one";
77 Verify the replica update, no trailing spaces anymore!
78 select concat("<<<",str,">>>") from t1;
79 concat("<<<",str,">>>")
80 <<<one>>>
81 drop table t1;
82 #####################################
83 ############ Varbinary ##############
84 create table t1(str varbinary(32) primary key) engine = ndb;
85 Insert space padded row, then update it to non-padded
86 insert into t1(str) values ("one ");
87 update t1 set str="one";
88 Verify the replica update, no trailing spaces anymore!
89 select concat("<<<",str,">>>") from t1;
90 concat("<<<",str,">>>")
91 <<<one>>>
92 drop table t1;
93 ##########################################################
94 # Lower and upper case are compared as equal.
95 # Binary representation are unequal though, and update
96 # Need to be propogated to replica even when the 'after' images
97 # are 'compared-equal'.
98 # Tests inserts 'xyz', then update it to 'XYZ'.
99 # Check that rows are updated on replica as well.
100
101 #####################################
102 ############## Varchar ##############
103 create table t1(str varchar(32) primary key) engine = ndb;
104 Insert 'xyz', then update varchar(32) to 'XYZ'
105 insert into t1(str) values ("xyz");
106 update t1 set str="XYZ";
107 Verify the replica updated varchar(32) to 'XYZ' as well
108 select str from t1;
109 str
110 XYZ
111 drop table t1;
112 ##################################
113 ############## Char ##############
114 create table t1(str char(32) primary key) engine = ndb;
115 Insert 'xyz', then update char(32) to 'XYZ'
116 insert into t1(str) values ("xyz");
117 update t1 set str="XYZ";
118 Verify the replica updated char(32) to 'XYZ' as well
119 select str from t1;
120 str
121 XYZ
122 drop table t1;
123 ##################################
124 ############ Varbinary ###########
125 create table t1(str varbinary(32) primary key) engine = ndb;
126 Insert 'xyz', then update varbinary(32) to 'XYZ'
127 insert into t1(str) values ("xyz");
128 update t1 set str="XYZ";
129 Verify the replica updated varbinary(32) to 'XYZ' as well
130 select str from t1;
131 str
132 XYZ
133 drop table t1;
134 set global ndb_log_updated_only=1;
135 set global ndb_log_update_as_write=0;
136 set global ndb_log_update_minimal=0;
137
138
139 #####################################
140 show variables like 'ndb_log_update_%';
141 Variable_name Value
142 ndb_log_update_as_write OFF
143 ndb_log_update_minimal OFF
144 ndb_log_updated_only ON
145 #####################################
146 ############## Varchar ##############
147 create table t1(str varchar(32) primary key) engine = ndb;
148 Insert space padded row, then update it to non-padded
149 insert into t1(str) values ("one ");
150 update t1 set str="one";
151 Verify the replica update, no trailing spaces anymore!
152 select concat("<<<",str,">>>") from t1;
153 concat("<<<",str,">>>")
154 <<<one>>>
155 drop table t1;
156 #########################################
157 ############## Longvarchar ##############
158 create table t1(str varchar(512) primary key) engine = ndb;
159 Insert space padded row, then update it to non-padded
160 insert into t1(str) values ("one ");
161 update t1 set str="one";
162 Verify the replica update, no trailing spaces anymore!
163 select concat("<<<",str,">>>") from t1;
164 concat("<<<",str,">>>")
165 <<<one>>>
166 drop table t1;
167 #####################################
168 ############ Varbinary ##############
169 create table t1(str varbinary(32) primary key) engine = ndb;
170 Insert space padded row, then update it to non-padded
171 insert into t1(str) values ("one ");
172 update t1 set str="one";
173 Verify the replica update, no trailing spaces anymore!
174 select concat("<<<",str,">>>") from t1;
175 concat("<<<",str,">>>")
176 <<<one>>>
177 drop table t1;
178 ##########################################################
179 # Lower and upper case are compared as equal.
180 # Binary representation are unequal though, and update
181 # Need to be propogated to replica even when the 'after' images
182 # are 'compared-equal'.
183 # Tests inserts 'xyz', then update it to 'XYZ'.
184 # Check that rows are updated on replica as well.
185
186 #####################################
187 ############## Varchar ##############
188 create table t1(str varchar(32) primary key) engine = ndb;
189 Insert 'xyz', then update varchar(32) to 'XYZ'
190 insert into t1(str) values ("xyz");
191 update t1 set str="XYZ";
192 Verify the replica updated varchar(32) to 'XYZ' as well
193 select str from t1;
194 str
195 XYZ
196 drop table t1;
197 ##################################
198 ############## Char ##############
199 create table t1(str char(32) primary key) engine = ndb;
200 Insert 'xyz', then update char(32) to 'XYZ'
201 insert into t1(str) values ("xyz");
202 update t1 set str="XYZ";
203 Verify the replica updated char(32) to 'XYZ' as well
204 select str from t1;
205 str
206 XYZ
207 drop table t1;
208 ##################################
209 ############ Varbinary ###########
210 create table t1(str varbinary(32) primary key) engine = ndb;
211 Insert 'xyz', then update varbinary(32) to 'XYZ'
212 insert into t1(str) values ("xyz");
213 update t1 set str="XYZ";
214 Verify the replica updated varbinary(32) to 'XYZ' as well
215 select str from t1;
216 str
217 XYZ
218 drop table t1;
219 set global ndb_log_updated_only=0;
220 set global ndb_log_update_as_write=1;
221 set global ndb_log_update_minimal=0;
222
223
224 #####################################
225 show variables like 'ndb_log_update_%';
226 Variable_name Value
227 ndb_log_update_as_write ON
228 ndb_log_update_minimal OFF
229 ndb_log_updated_only OFF
230 #####################################
231 ############## Varchar ##############
232 create table t1(str varchar(32) primary key) engine = ndb;
233 Insert space padded row, then update it to non-padded
234 insert into t1(str) values ("one ");
235 update t1 set str="one";
236 Verify the replica update, no trailing spaces anymore!
237 select concat("<<<",str,">>>") from t1;
238 concat("<<<",str,">>>")
239 <<<one>>>
240 drop table t1;
241 #########################################
242 ############## Longvarchar ##############
243 create table t1(str varchar(512) primary key) engine = ndb;
244 Insert space padded row, then update it to non-padded
245 insert into t1(str) values ("one ");
246 update t1 set str="one";
247 Verify the replica update, no trailing spaces anymore!
248 select concat("<<<",str,">>>") from t1;
249 concat("<<<",str,">>>")
250 <<<one>>>
251 drop table t1;
252 #####################################
253 ############ Varbinary ##############
254 create table t1(str varbinary(32) primary key) engine = ndb;
255 Insert space padded row, then update it to non-padded
256 insert into t1(str) values ("one ");
257 update t1 set str="one";
258 Verify the replica update, no trailing spaces anymore!
259 select concat("<<<",str,">>>") from t1;
260 concat("<<<",str,">>>")
261 <<<one>>>
262 drop table t1;
263 ##########################################################
264 # Lower and upper case are compared as equal.
265 # Binary representation are unequal though, and update
266 # Need to be propogated to replica even when the 'after' images
267 # are 'compared-equal'.
268 # Tests inserts 'xyz', then update it to 'XYZ'.
269 # Check that rows are updated on replica as well.
270
271 #####################################
272 ############## Varchar ##############
273 create table t1(str varchar(32) primary key) engine = ndb;
274 Insert 'xyz', then update varchar(32) to 'XYZ'
275 insert into t1(str) values ("xyz");
276 update t1 set str="XYZ";
277 Verify the replica updated varchar(32) to 'XYZ' as well
278 select str from t1;
279 str
280 XYZ
281 drop table t1;
282 ##################################
283 ############## Char ##############
284 create table t1(str char(32) primary key) engine = ndb;
285 Insert 'xyz', then update char(32) to 'XYZ'
286 insert into t1(str) values ("xyz");
287 update t1 set str="XYZ";
288 Verify the replica updated char(32) to 'XYZ' as well
289 select str from t1;
290 str
291 XYZ
292 drop table t1;
293 ##################################
294 ############ Varbinary ###########
295 create table t1(str varbinary(32) primary key) engine = ndb;
296 Insert 'xyz', then update varbinary(32) to 'XYZ'
297 insert into t1(str) values ("xyz");
298 update t1 set str="XYZ";
299 Verify the replica updated varbinary(32) to 'XYZ' as well
300 select str from t1;
301 str
302 XYZ
303 drop table t1;
304 set global ndb_log_updated_only=1;
305 set global ndb_log_update_as_write=1;
306 set global ndb_log_update_minimal=0;
307
308
309 #####################################
310 show variables like 'ndb_log_update_%';
311 Variable_name Value
312 ndb_log_update_as_write ON
313 ndb_log_update_minimal OFF
314 ndb_log_updated_only ON
315 #####################################
316 ############## Varchar ##############
317 create table t1(str varchar(32) primary key) engine = ndb;
318 Insert space padded row, then update it to non-padded
319 insert into t1(str) values ("one ");
320 update t1 set str="one";
321 Verify the replica update, no trailing spaces anymore!
322 select concat("<<<",str,">>>") from t1;
323 concat("<<<",str,">>>")
324 <<<one>>>
325 drop table t1;
326 #########################################
327 ############## Longvarchar ##############
328 create table t1(str varchar(512) primary key) engine = ndb;
329 Insert space padded row, then update it to non-padded
330 insert into t1(str) values ("one ");
331 update t1 set str="one";
332 Verify the replica update, no trailing spaces anymore!
333 select concat("<<<",str,">>>") from t1;
334 concat("<<<",str,">>>")
335 <<<one>>>
336 drop table t1;
337 #####################################
338 ############ Varbinary ##############
339 create table t1(str varbinary(32) primary key) engine = ndb;
340 Insert space padded row, then update it to non-padded
341 insert into t1(str) values ("one ");
342 update t1 set str="one";
343 Verify the replica update, no trailing spaces anymore!
344 select concat("<<<",str,">>>") from t1;
345 concat("<<<",str,">>>")
346 <<<one>>>
347 drop table t1;
348 ##########################################################
349 # Lower and upper case are compared as equal.
350 # Binary representation are unequal though, and update
351 # Need to be propogated to replica even when the 'after' images
352 # are 'compared-equal'.
353 # Tests inserts 'xyz', then update it to 'XYZ'.
354 # Check that rows are updated on replica as well.
355
356 #####################################
357 ############## Varchar ##############
358 create table t1(str varchar(32) primary key) engine = ndb;
359 Insert 'xyz', then update varchar(32) to 'XYZ'
360 insert into t1(str) values ("xyz");
361 update t1 set str="XYZ";
362 Verify the replica updated varchar(32) to 'XYZ' as well
363 select str from t1;
364 str
365 XYZ
366 drop table t1;
367 ##################################
368 ############## Char ##############
369 create table t1(str char(32) primary key) engine = ndb;
370 Insert 'xyz', then update char(32) to 'XYZ'
371 insert into t1(str) values ("xyz");
372 update t1 set str="XYZ";
373 Verify the replica updated char(32) to 'XYZ' as well
374 select str from t1;
375 str
376 XYZ
377 drop table t1;
378 ##################################
379 ############ Varbinary ###########
380 create table t1(str varbinary(32) primary key) engine = ndb;
381 Insert 'xyz', then update varbinary(32) to 'XYZ'
382 insert into t1(str) values ("xyz");
383 update t1 set str="XYZ";
384 Verify the replica updated varbinary(32) to 'XYZ' as well
385 select str from t1;
386 str
387 XYZ
388 drop table t1;
389 set global ndb_log_updated_only=0;
390 set global ndb_log_update_as_write=1;
391 set global ndb_log_update_minimal=1;
392
393
394 #####################################
395 show variables like 'ndb_log_update_%';
396 Variable_name Value
397 ndb_log_update_as_write ON
398 ndb_log_update_minimal ON
399 ndb_log_updated_only OFF
400 #####################################
401 ############## Varchar ##############
402 create table t1(str varchar(32) primary key) engine = ndb;
403 Insert space padded row, then update it to non-padded
404 insert into t1(str) values ("one ");
405 update t1 set str="one";
406 Verify the replica update, no trailing spaces anymore!
407 select concat("<<<",str,">>>") from t1;
408 concat("<<<",str,">>>")
409 <<<one>>>
410 drop table t1;
411 #########################################
412 ############## Longvarchar ##############
413 create table t1(str varchar(512) primary key) engine = ndb;
414 Insert space padded row, then update it to non-padded
415 insert into t1(str) values ("one ");
416 update t1 set str="one";
417 Verify the replica update, no trailing spaces anymore!
418 select concat("<<<",str,">>>") from t1;
419 concat("<<<",str,">>>")
420 <<<one>>>
421 drop table t1;
422 #####################################
423 ############ Varbinary ##############
424 create table t1(str varbinary(32) primary key) engine = ndb;
425 Insert space padded row, then update it to non-padded
426 insert into t1(str) values ("one ");
427 update t1 set str="one";
428 Verify the replica update, no trailing spaces anymore!
429 select concat("<<<",str,">>>") from t1;
430 concat("<<<",str,">>>")
431 <<<one>>>
432 drop table t1;
433 ##########################################################
434 # Lower and upper case are compared as equal.
435 # Binary representation are unequal though, and update
436 # Need to be propogated to replica even when the 'after' images
437 # are 'compared-equal'.
438 # Tests inserts 'xyz', then update it to 'XYZ'.
439 # Check that rows are updated on replica as well.
440
441 #####################################
442 ############## Varchar ##############
443 create table t1(str varchar(32) primary key) engine = ndb;
444 Insert 'xyz', then update varchar(32) to 'XYZ'
445 insert into t1(str) values ("xyz");
446 update t1 set str="XYZ";
447 Verify the replica updated varchar(32) to 'XYZ' as well
448 select str from t1;
449 str
450 XYZ
451 drop table t1;
452 ##################################
453 ############## Char ##############
454 create table t1(str char(32) primary key) engine = ndb;
455 Insert 'xyz', then update char(32) to 'XYZ'
456 insert into t1(str) values ("xyz");
457 update t1 set str="XYZ";
458 Verify the replica updated char(32) to 'XYZ' as well
459 select str from t1;
460 str
461 XYZ
462 drop table t1;
463 ##################################
464 ############ Varbinary ###########
465 create table t1(str varbinary(32) primary key) engine = ndb;
466 Insert 'xyz', then update varbinary(32) to 'XYZ'
467 insert into t1(str) values ("xyz");
468 update t1 set str="XYZ";
469 Verify the replica updated varbinary(32) to 'XYZ' as well
470 select str from t1;
471 str
472 XYZ
473 drop table t1;
474 set global ndb_log_updated_only=1;
475 set global ndb_log_update_as_write=1;
476 set global ndb_log_update_minimal=1;
477
478
479 #####################################
480 show variables like 'ndb_log_update_%';
481 Variable_name Value
482 ndb_log_update_as_write ON
483 ndb_log_update_minimal ON
484 ndb_log_updated_only ON
485 #####################################
486 ############## Varchar ##############
487 create table t1(str varchar(32) primary key) engine = ndb;
488 Insert space padded row, then update it to non-padded
489 insert into t1(str) values ("one ");
490 update t1 set str="one";
491 Verify the replica update, no trailing spaces anymore!
492 select concat("<<<",str,">>>") from t1;
493 concat("<<<",str,">>>")
494 <<<one>>>
495 drop table t1;
496 #########################################
497 ############## Longvarchar ##############
498 create table t1(str varchar(512) primary key) engine = ndb;
499 Insert space padded row, then update it to non-padded
500 insert into t1(str) values ("one ");
501 update t1 set str="one";
502 Verify the replica update, no trailing spaces anymore!
503 select concat("<<<",str,">>>") from t1;
504 concat("<<<",str,">>>")
505 <<<one>>>
506 drop table t1;
507 #####################################
508 ############ Varbinary ##############
509 create table t1(str varbinary(32) primary key) engine = ndb;
510 Insert space padded row, then update it to non-padded
511 insert into t1(str) values ("one ");
512 update t1 set str="one";
513 Verify the replica update, no trailing spaces anymore!
514 select concat("<<<",str,">>>") from t1;
515 concat("<<<",str,">>>")
516 <<<one>>>
517 drop table t1;
518 ##########################################################
519 # Lower and upper case are compared as equal.
520 # Binary representation are unequal though, and update
521 # Need to be propogated to replica even when the 'after' images
522 # are 'compared-equal'.
523 # Tests inserts 'xyz', then update it to 'XYZ'.
524 # Check that rows are updated on replica as well.
525
526 #####################################
527 ############## Varchar ##############
528 create table t1(str varchar(32) primary key) engine = ndb;
529 Insert 'xyz', then update varchar(32) to 'XYZ'
530 insert into t1(str) values ("xyz");
531 update t1 set str="XYZ";
532 Verify the replica updated varchar(32) to 'XYZ' as well
533 select str from t1;
534 str
535 XYZ
536 drop table t1;
537 ##################################
538 ############## Char ##############
539 create table t1(str char(32) primary key) engine = ndb;
540 Insert 'xyz', then update char(32) to 'XYZ'
541 insert into t1(str) values ("xyz");
542 update t1 set str="XYZ";
543 Verify the replica updated char(32) to 'XYZ' as well
544 select str from t1;
545 str
546 XYZ
547 drop table t1;
548 ##################################
549 ############ Varbinary ###########
550 create table t1(str varbinary(32) primary key) engine = ndb;
551 Insert 'xyz', then update varbinary(32) to 'XYZ'
552 insert into t1(str) values ("xyz");
553 update t1 set str="XYZ";
554 Verify the replica updated varbinary(32) to 'XYZ' as well
555 select str from t1;
556 str
557 XYZ
558 drop table t1;
559 set global ndb_log_updated_only=0;
560 set global ndb_log_update_as_write=0;
561 set global ndb_log_update_minimal=1;
562
563
564 #####################################
565 show variables like 'ndb_log_update_%';
566 Variable_name Value
567 ndb_log_update_as_write OFF
568 ndb_log_update_minimal ON
569 ndb_log_updated_only OFF
570 #####################################
571 ############## Varchar ##############
572 create table t1(str varchar(32) primary key) engine = ndb;
573 Insert space padded row, then update it to non-padded
574 insert into t1(str) values ("one ");
575 update t1 set str="one";
576 Verify the replica update, no trailing spaces anymore!
577 select concat("<<<",str,">>>") from t1;
578 concat("<<<",str,">>>")
579 <<<one>>>
580 drop table t1;
581 #########################################
582 ############## Longvarchar ##############
583 create table t1(str varchar(512) primary key) engine = ndb;
584 Insert space padded row, then update it to non-padded
585 insert into t1(str) values ("one ");
586 update t1 set str="one";
587 Verify the replica update, no trailing spaces anymore!
588 select concat("<<<",str,">>>") from t1;
589 concat("<<<",str,">>>")
590 <<<one>>>
591 drop table t1;
592 #####################################
593 ############ Varbinary ##############
594 create table t1(str varbinary(32) primary key) engine = ndb;
595 Insert space padded row, then update it to non-padded
596 insert into t1(str) values ("one ");
597 update t1 set str="one";
598 Verify the replica update, no trailing spaces anymore!
599 select concat("<<<",str,">>>") from t1;
600 concat("<<<",str,">>>")
601 <<<one>>>
602 drop table t1;
603 ##########################################################
604 # Lower and upper case are compared as equal.
605 # Binary representation are unequal though, and update
606 # Need to be propogated to replica even when the 'after' images
607 # are 'compared-equal'.
608 # Tests inserts 'xyz', then update it to 'XYZ'.
609 # Check that rows are updated on replica as well.
610
611 #####################################
612 ############## Varchar ##############
613 create table t1(str varchar(32) primary key) engine = ndb;
614 Insert 'xyz', then update varchar(32) to 'XYZ'
615 insert into t1(str) values ("xyz");
616 update t1 set str="XYZ";
617 Verify the replica updated varchar(32) to 'XYZ' as well
618 select str from t1;
619 str
620 XYZ
621 drop table t1;
622 ##################################
623 ############## Char ##############
624 create table t1(str char(32) primary key) engine = ndb;
625 Insert 'xyz', then update char(32) to 'XYZ'
626 insert into t1(str) values ("xyz");
627 update t1 set str="XYZ";
628 Verify the replica updated char(32) to 'XYZ' as well
629 select str from t1;
630 str
631 XYZ
632 drop table t1;
633 ##################################
634 ############ Varbinary ###########
635 create table t1(str varbinary(32) primary key) engine = ndb;
636 Insert 'xyz', then update varbinary(32) to 'XYZ'
637 insert into t1(str) values ("xyz");
638 update t1 set str="XYZ";
639 Verify the replica updated varbinary(32) to 'XYZ' as well
640 select str from t1;
641 str
642 XYZ
643 drop table t1;
644 set global ndb_log_updated_only=1;
645 set global ndb_log_update_as_write=0;
646 set global ndb_log_update_minimal=1;
647
648
649 #####################################
650 show variables like 'ndb_log_update_%';
651 Variable_name Value
652 ndb_log_update_as_write OFF
653 ndb_log_update_minimal ON
654 ndb_log_updated_only ON
655 #####################################
656 ############## Varchar ##############
657 create table t1(str varchar(32) primary key) engine = ndb;
658 Insert space padded row, then update it to non-padded
659 insert into t1(str) values ("one ");
660 update t1 set str="one";
661 Verify the replica update, no trailing spaces anymore!
662 select concat("<<<",str,">>>") from t1;
663 concat("<<<",str,">>>")
664 <<<one>>>
665 drop table t1;
666 #########################################
667 ############## Longvarchar ##############
668 create table t1(str varchar(512) primary key) engine = ndb;
669 Insert space padded row, then update it to non-padded
670 insert into t1(str) values ("one ");
671 update t1 set str="one";
672 Verify the replica update, no trailing spaces anymore!
673 select concat("<<<",str,">>>") from t1;
674 concat("<<<",str,">>>")
675 <<<one>>>
676 drop table t1;
677 #####################################
678 ############ Varbinary ##############
679 create table t1(str varbinary(32) primary key) engine = ndb;
680 Insert space padded row, then update it to non-padded
681 insert into t1(str) values ("one ");
682 update t1 set str="one";
683 Verify the replica update, no trailing spaces anymore!
684 select concat("<<<",str,">>>") from t1;
685 concat("<<<",str,">>>")
686 <<<one>>>
687 drop table t1;
688 ##########################################################
689 # Lower and upper case are compared as equal.
690 # Binary representation are unequal though, and update
691 # Need to be propogated to replica even when the 'after' images
692 # are 'compared-equal'.
693 # Tests inserts 'xyz', then update it to 'XYZ'.
694 # Check that rows are updated on replica as well.
695
696 #####################################
697 ############## Varchar ##############
698 create table t1(str varchar(32) primary key) engine = ndb;
699 Insert 'xyz', then update varchar(32) to 'XYZ'
700 insert into t1(str) values ("xyz");
701 update t1 set str="XYZ";
702 Verify the replica updated varchar(32) to 'XYZ' as well
703 select str from t1;
704 str
705 XYZ
706 drop table t1;
707 ##################################
708 ############## Char ##############
709 create table t1(str char(32) primary key) engine = ndb;
710 Insert 'xyz', then update char(32) to 'XYZ'
711 insert into t1(str) values ("xyz");
712 update t1 set str="XYZ";
713 Verify the replica updated char(32) to 'XYZ' as well
714 select str from t1;
715 str
716 XYZ
717 drop table t1;
718 ##################################
719 ############ Varbinary ###########
720 create table t1(str varbinary(32) primary key) engine = ndb;
721 Insert 'xyz', then update varbinary(32) to 'XYZ'
722 insert into t1(str) values ("xyz");
723 update t1 set str="XYZ";
724 Verify the replica updated varbinary(32) to 'XYZ' as well
725 select str from t1;
726 str
727 XYZ
728 drop table t1;
729 set global ndb_log_updated_only=default;
730 set global ndb_log_update_as_write=default;
731 set global ndb_log_update_minimal=default;
732 include/rpl_end.inc