sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

doesn't support sql parameter in set clause

Open 18025341316 opened this issue 7 years ago • 2 comments

When use parser to parse the sql like this: update tbl_customer t set t.description=:yp where t.id=1; the parser failed.it seems the parser cann't handle sql parameter in the SET sub-clause.

18025341316 avatar Aug 15 '18 11:08 18025341316

Here is the error message:

 [0] => Array
                                (
                                    [file] => C:\...\sqlparser\src\Components\SetOperation.php
                                    [line] => 117
                                    [function] => error
                                    [class] => PhpMyAdmin\SqlParser\Parser
                                    [type] => ->
                                    [args] => Array
                                        (
                                            [0] => Missing expression.
                                            [1] => PhpMyAdmin\SqlParser\Token Object
                                                (
                                                    [token] => :yp
                                                    [value] => yp
                                                    [keyword] => 
                                                    [type] => 8
                                                    [flags] => 16
                                                    [position] => 42
                                                )

                                        )

                                )

18025341316 avatar Aug 15 '18 11:08 18025341316

I have the same problem. Last working version is 4.2.1

jochendaum avatar Sep 25 '18 02:09 jochendaum