-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to support insert data without specify the ts
column when using ?
placeholder
#4244
Labels
C-bug
Category Bugs
Comments
Let me figure out. |
Java is good: Class.forName("com.mysql.cj.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:4002/public", "root", "password");
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO test_table(n, row_id) VALUES (?, ?);");
long start = System.currentTimeMillis();
for (int i = 0; i < 100000; i++) {
pstmt.setInt(1, i);
pstmt.setInt(2, i);
pstmt.addBatch();
if (i % 100 == 0 ){
pstmt.executeBatch();
}
}
pstmt.executeBatch(); Looks like it's related to #4125 |
Confirmed: mysql> prepare stmt1 from 'INSERT INTO test_table(n, row_id) VALUES (?, ?)';
Query OK, 0 rows affected (0.01 sec)
mysql> EXECUTE stmt1 using 1, 1;
ERROR 1815 (HY000): Invalid request to region 4398046511104(1024, 0), reason: column ts is not null but input has null Let me fix it. |
killme2008
added a commit
to killme2008/greptimedb
that referenced
this issue
Jul 3, 2024
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jul 5, 2024
* fix: prepare inserting with column defaults not work, #4244 * fix: build column_defaults every time when creating adapters * feat: cache the column_defaults in table * test: assert ts column * fix: unit * chore: style Co-authored-by: Yingwen <realevenyag@gmail.com> * fix: typo * chore: style Co-authored-by: Ruihang Xia <waynestxia@gmail.com> --------- Co-authored-by: Yingwen <realevenyag@gmail.com> Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What type of bug is this?
Unexpected error
What subsystems are affected?
Query Engine
Minimal reproduce step
Test code
I'm using the Go and
github.com/go-sql-driver/mysql
to connect greptimedb:Test steps
After multiple tests, the above test failed when the db release version > v0.7.2. It works well in v0.7.2.
ts
column can work?
placeholder, it worksWhat did you expect to see?
The test code should work.
What did you see instead?
The test code failed.
What operating system did you use?
macOS
What version of GreptimeDB did you use?
v0.8.2
Relevant log output and stack trace
No response
The text was updated successfully, but these errors were encountered: