Open zyy17 opened 3 days ago
@waynexia @evenyag
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 https://github.com/GreptimeTeam/greptimedb/pull/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.
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