Now TableName in expression only used by sequence function like nextval(seq). The function arg should be evaluated as a table name rather than normal column name like mysql does.
(v *ast.TableName)
| 2499 | // Now TableName in expression only used by sequence function like nextval(seq). |
| 2500 | // The function arg should be evaluated as a table name rather than normal column name like mysql does. |
| 2501 | func (er *expressionRewriter) toTable(v *ast.TableName) { |
| 2502 | fullName := v.Name.L |
| 2503 | if len(v.Schema.L) != 0 { |
| 2504 | fullName = v.Schema.L + "." + fullName |
| 2505 | } |
| 2506 | val := &expression.Constant{ |
| 2507 | Value: types.NewDatum(fullName), |
| 2508 | RetType: types.NewFieldType(mysql.TypeString), |
| 2509 | } |
| 2510 | er.ctxStackAppend(val, types.EmptyName) |
| 2511 | } |
| 2512 | |
| 2513 | func (er *expressionRewriter) toParamMarker(v *driver.ParamMarkerExpr) { |
| 2514 | var value *expression.Constant |
no test coverage detected