MCPcopy Create free account
hub / github.com/MariaDB/server / func_abs

Function func_abs

client/mysqltest.cc:6296–6305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6294*/
6295
6296void func_abs(Expression_value args[], int count, Expression_value *result)
6297{
6298 if (count != 1)
6299 die("abs() expects 1 argument, got %d", count);
6300
6301 if (!args[0].is_numeric)
6302 die("abs() requires numeric argument");
6303
6304 result->set_int(llabs(args[0].to_int()));
6305}
6306
6307
6308/**

Callers 1

Calls 3

to_intMethod · 0.80
dieFunction · 0.70
set_intMethod · 0.45

Tested by

no test coverage detected