jd-opensource / jd-opensource/vtdriver

Null Pointer Exception when updating user with subquery in UPDATE statement

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
92
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I am encountering a null pointer exception when running the following SQL query to update the name of a user based on a subquery:

```
UPDATE t_user a, (SELECT ? AS id, ? AS name) b SET a.name = b.name WHERE a.id = b.id
```
when I run this query, I get a null pointer exception. Upon further investigation, I found that the subquery is returning null and causing the issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.