We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CREATE TABLE timestamp_insert ( id INT NOT NULL PRIMARY KEY, tstamp TIMESTAMP NOT NULL )
then prepare and exec a insert 0000-00-00 00:00:00.000000 into tstamp
tstamp
stmt= const_cast<char *>("INSERT INTO timestamp_insert ( id, tstamp ) VALUES ( ?, ? )"); if(mysql_stmt_prepare(mysql_stmt, stmt, strlen(stmt))) { my_chk_stmt(&mysql, mysql_stmt, __LINE__); } memset(mysql_bind_param, 0, sizeof(mysql_bind_param)); mysql_bind_param[0].buffer_type= MYSQL_TYPE_LONG; mysql_bind_param[0].buffer= (char*)&id; mysql_bind_param[0].is_null= 0; mysql_bind_param[0].length= 0; mysql_bind_param[1].buffer_type= MYSQL_TYPE_TIMESTAMP; mysql_bind_param[1].buffer= &tstamp; mysql_bind_param[1].is_null= 0; mysql_bind_param[1].length= 0; if(mysql_stmt_bind_param(mysql_stmt, mysql_bind_param)) { my_chk_stmt(&mysql, mysql_stmt, __LINE__); } id= 2; tstamp.year= 0; tstamp.month= 0; tstamp.day= 0; tstamp.hour= 0; tstamp.minute= 0; tstamp.second= 0; tstamp.second_part= 0; if(mysql_stmt_execute(mysql_stmt)) { my_chk_stmt(&mysql, mysql_stmt, __LINE__); }
success
1292 : invalid time format: '0'
tidb-server -V
select tidb_version();
2.1.0.rc1
The text was updated successfully, but these errors were encountered:
lysu
Successfully merging a pull request may close this issue.
then prepare and exec a insert 0000-00-00 00:00:00.000000 into
tstamp
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: