dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.49k stars 663 forks source link

Is it a bug when I use mycli to update a tinyint column with a out-of-range value? #1000

Open Aris4009 opened 3 years ago

Aris4009 commented 3 years ago

When I update a tinyint column by using the following statement, it looks like weird. The execution result is different from mysql cli.So I'm not sure whether it is a bug or special design and I look for the document but don't find any useful information about this case.

mysqld version: image

my table structure image

using mycli to update the col_tinyint column image

using mysql cli to update the col_tinying column image

Because the default range of tinyint type column is -128~127, I think this update statement should execute failed rather than give a max value and execute succeed.

I'm trying use SET sql_mode = 'TRADITIONAL'; in mycli, then the result is same as mysql cli. Dose mycli set some default values in sql_mode?