mycli icon indicating copy to clipboard operation
mycli copied to clipboard

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

Open Aris4009 opened this issue 4 years ago • 0 comments

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?

Aris4009 avatar Aug 11 '21 03:08 Aris4009