diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-08-08 14:21:22 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-08-08 14:21:22 -0400 |
commit | 91acc8b16fdd8409765f32b5453851366552a709 (patch) | |
tree | 18c04064e9fc127c5e477ec08613aae7baaab2ae /sql/item_func.cc | |
parent | 4c69dc8116950d6bf0b09bfbc31a86d89831a364 (diff) | |
parent | 0403790722e3941779ccea26e85fcd818e2320b5 (diff) | |
download | mariadb-git-91acc8b16fdd8409765f32b5453851366552a709.tar.gz |
Merge tag 'mariadb-10.0.21' into 10.0-galera
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index f637c14d1c4..e38e1e4919a 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4283,6 +4283,21 @@ longlong Item_func_get_lock::val_int() DBUG_RETURN(1); } + if (args[1]->null_value || + (!args[1]->unsigned_flag && ((longlong) timeout < 0))) + { + char buf[22]; + if (args[1]->null_value) + strmov(buf, "NULL"); + else + llstr(((longlong) timeout), buf); + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE), + "timeout", buf, "get_lock"); + null_value= 1; + DBUG_RETURN(0); + } + if (!ull_name_ok(res)) DBUG_RETURN(0); DBUG_PRINT("enter", ("lock: %.*s", res->length(), res->ptr())); |