varbinary.test
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 0k
Category:

MySQL

Development Platform:

Visual C++

  1. #
  2. # varbinary as string and number
  3. #
  4. select 0x41,0x41+0,0x41 | 0x7fffffffffffffff | 0,0xffffffffffffffff | 0 ;
  5. select 0x31+1,concat(0x31)+1,-0xf;
  6. #
  7. # Test of hex constants in WHERE:
  8. #
  9. create table t1 (ID int(8) unsigned zerofill not null auto_increment,UNIQ bigint(21) unsigned zerofill not null,primary key (ID),unique (UNIQ) );
  10. insert into t1 set UNIQ=0x38afba1d73e6a18a;
  11. insert into t1 set UNIQ=123; 
  12. explain select * from t1 where UNIQ=0x38afba1d73e6a18a;
  13. drop table t1;