Skip to content

log function doesn't handle strings the same as MySql #9735

@angelamayxie

Description

@angelamayxie

dolt

tmp/main*> select log("10","100");
+-----------------+
| log("10","100") |
+-----------------+
| 2               |
+-----------------+
1 row in set (0.00 sec) 


tmp/main*> select log("10","100f");
invalid type: string
tmp/main*> select log("10asdf","100f");
invalid type: string
tmp/main*> select log("a10asdf","b100f");
invalid type: string

mysql

mysql> select log("10","100");
+-----------------+
| log("10","100") |
+-----------------+
|               2 |
+-----------------+
1 row in set (0.00 sec)

mysql> select log("10","100f");
+------------------+
| log("10","100f") |
+------------------+
|                2 |
+------------------+
1 row in set, 1 warning (0.00 sec)

mysql> select log("10asdf","100f");
+----------------------+
| log("10asdf","100f") |
+----------------------+
|                    2 |
+----------------------+
1 row in set, 2 warnings (0.00 sec)

mysql> select log("a10asdf","b100f");
+------------------------+
| log("a10asdf","b100f") |
+------------------------+
|                   NULL |
+------------------------+
1 row in set, 2 warnings (0.00 sec)

some of this is related to #9733

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcorrectnessWe don't return the same result as MySQLsqlIssue with SQL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions