MySQL中一个双引号的错位引发的血案

MySQL 中一个双引号的错位引发的血案

MySQL 中一个双引号的错位引发的血案

update tablename set source_name = "bj1062-北京市朝阳区常营北辰福第"           where source_name =     "-北京市朝阳区常营北辰福第"

MySQL 中一个双引号的错位引发的血案

MySQL 中一个双引号的错位引发的血案

update tbl_name set str_col="xxx" = "yyy"

update tbl_name set (str_col="xxx" )= "yyy"

update tbl_name set str_col=("xxx" = "yyy")

select "xxx" = "yyy"

update tbl_name set str_col="xxx" = "yyy"

update tbl_name set str_col=0

 = ;
+----+---------+
 str_col    
 aaa        
 aaa     

name where str_col="xxx" = "yyy"\G

           id: 1
  select_type: SIMPLE
        table: tbl_name
         type: index
possible_keys: NULL
          key: idx_str
      key_len: 33
          ref: NULL
         rows: 4
     filtered: 100.00
        Extra: Using where; Using index
1 row in set, 1 warning (0.00 sec)

Note (Code 1003): // select .. AS ,.. AS  from . where ((.. = 'xxx') = 'yyy')

((`test`.`tbl_name`.`str_col` = 'xxx') = 'yyy')

 +;
+
| + |
+
|          |
+

 row  set,  warning ( sec)

mysql [localhost] {msandbox} (test) >  =;
+
| = |
+
|    |
+
 row  set ( sec)

select id,str_col from tbl_name where 1=1;

MySQL 中一个双引号的错位引发的血案

MySQL中一个双引号的错位引发的血案