ctype_cp932_binlog.test
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. -- source include/not_embedded.inc
  2. -- source include/have_cp932.inc
  3. --character_set cp932
  4. --disable_warnings
  5. drop table if exists t1;
  6. --enable_warnings
  7. set names cp932;
  8. set character_set_database = cp932;
  9. # Test prepared statement with 0x8300 sequence in parameter while
  10. # running with cp932 client character set.
  11. RESET MASTER;
  12. CREATE TABLE t1(f1 blob);
  13. PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
  14. SET @var1= x'8300';
  15. # TODO: Note that this doesn't actually test the code which was added for
  16. # bug#11338 because this syntax for prepared statements causes the PS to
  17. # be replicated differently than if we executed the PS from C or Java.
  18. # Using this syntax, variable names are inserted into the binlog instead
  19. # of values. The real goal of this test is to check the code that was
  20. # added to Item_param::query_val_str() in order to do hex encoding of
  21. # PS parameters when the client character set is cp932;
  22. # Bug#11338 has an example java program which can be used to verify this 
  23. # code (and I have used it to test the fix) until there is some way to
  24. # exercise this code from mysql-test-run.
  25. EXECUTE stmt1 USING @var1;
  26. --replace_column 2 # 5 #
  27. SHOW BINLOG EVENTS FROM 79;
  28. SELECT HEX(f1) FROM t1;
  29. DROP table t1;
  30. # end test for bug#11338
  31. # End of 4.1 tests