Loading libmysql/libmysql.c +6 −0 Original line number Diff line number Diff line Loading @@ -4628,6 +4628,12 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) /* If statement hasnt been prepared there is nothing to reset */ if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) DBUG_RETURN(0); if (!stmt->mysql) { /* mysql can be reset in mysql_close called from mysql_reconnect */ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); DBUG_RETURN(1); } mysql= stmt->mysql->last_used_con; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ Loading mysql-test/r/ndb_blob.result +7 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,13 @@ delete from t1; select * from t1; a b commit; replace t1 set a=2, b='y'; select * from t1; a b 2 y delete from t1; select * from t1; a b drop table t1; set autocommit=0; create table t1 ( Loading mysql-test/r/ndb_load.result 0 → 100644 +80 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; ERROR 23000: Can't write; duplicate key in table 't1' DROP TABLE t1; CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; SELECT * FROM t1 ORDER BY word; word Aarhus Aarhus Aaron Aaron Ababa Ababa aback aback abaft abaft abandon abandon abandoned abandoned abandoning abandoning abandonment abandonment abandons abandons abase abased abasement abasements abases abash abashed abashes abashing abasing abate abated abatement abatements abater abates abating Abba abbe abbey abbeys abbot abbots Abbott abbreviate abbreviated abbreviates abbreviating abbreviation abbreviations Abby abdomen abdomens abdominal abduct abducted abduction abductions abductor abductors abducts Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant aberration DROP TABLE t1; mysql-test/t/ndb_blob.test +5 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ select * from t1 order by a; drop table t1; drop database test2; # -- bug-5252 tinytext crashes plus no-commit result -- # -- bug-5252 tinytext crashes + no-commit result + replace -- set autocommit=0; create table t1 ( Loading @@ -352,6 +352,10 @@ select * from t1; delete from t1; select * from t1; commit; replace t1 set a=2, b='y'; select * from t1; delete from t1; select * from t1; drop table t1; # -- bug-5013 insert empty string to text -- Loading mysql-test/t/ndb_load.test 0 → 100644 +24 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/not_embedded.inc --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings # # Basic test for different types of loading data # # should give duplicate key CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; --error 1022 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; DROP TABLE t1; # now without a primary key we should be ok CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; SELECT * FROM t1 ORDER BY word; DROP TABLE t1; # End of 4.1 tests Loading
libmysql/libmysql.c +6 −0 Original line number Diff line number Diff line Loading @@ -4628,6 +4628,12 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) /* If statement hasnt been prepared there is nothing to reset */ if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) DBUG_RETURN(0); if (!stmt->mysql) { /* mysql can be reset in mysql_close called from mysql_reconnect */ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); DBUG_RETURN(1); } mysql= stmt->mysql->last_used_con; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ Loading
mysql-test/r/ndb_blob.result +7 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,13 @@ delete from t1; select * from t1; a b commit; replace t1 set a=2, b='y'; select * from t1; a b 2 y delete from t1; select * from t1; a b drop table t1; set autocommit=0; create table t1 ( Loading
mysql-test/r/ndb_load.result 0 → 100644 +80 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; ERROR 23000: Can't write; duplicate key in table 't1' DROP TABLE t1; CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; SELECT * FROM t1 ORDER BY word; word Aarhus Aarhus Aaron Aaron Ababa Ababa aback aback abaft abaft abandon abandon abandoned abandoned abandoning abandoning abandonment abandonment abandons abandons abase abased abasement abasements abases abash abashed abashes abashing abasing abate abated abatement abatements abater abates abating Abba abbe abbey abbeys abbot abbots Abbott abbreviate abbreviated abbreviates abbreviating abbreviation abbreviations Abby abdomen abdomens abdominal abduct abducted abduction abductions abductor abductors abducts Abe abed Abel Abelian Abelson Aberdeen Abernathy aberrant aberration DROP TABLE t1;
mysql-test/t/ndb_blob.test +5 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ select * from t1 order by a; drop table t1; drop database test2; # -- bug-5252 tinytext crashes plus no-commit result -- # -- bug-5252 tinytext crashes + no-commit result + replace -- set autocommit=0; create table t1 ( Loading @@ -352,6 +352,10 @@ select * from t1; delete from t1; select * from t1; commit; replace t1 set a=2, b='y'; select * from t1; delete from t1; select * from t1; drop table t1; # -- bug-5013 insert empty string to text -- Loading
mysql-test/t/ndb_load.test 0 → 100644 +24 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/not_embedded.inc --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings # # Basic test for different types of loading data # # should give duplicate key CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; --error 1022 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; DROP TABLE t1; # now without a primary key we should be ok CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 ; SELECT * FROM t1 ORDER BY word; DROP TABLE t1; # End of 4.1 tests