Commit bd365f76 authored by unknown's avatar unknown
Browse files

After merge fixes

Add support for warnings for prepare of prepared statements
Fixed test to work with --ps-protocol
Fixed some test results


libmysql/libmysql.c:
  Add support for warnings for prepare of prepared statements
mysql-test/r/func_concat.result:
  After merge fixes
mysql-test/r/select.result:
  Delete conflicting tables form previous tests
mysql-test/r/view.result:
  New code from 4.1 fixed old error
mysql-test/t/create.test:
  Ensure that --ps-protocol return same results as normal test
mysql-test/t/func_group.test:
  Remove not needed --disable_ps_protocol
mysql-test/t/func_time.test:
  Ensure that --ps-protocol return same results as normal test
mysql-test/t/having.test:
  Ensure that --ps-protocol return same results as normal test
mysql-test/t/insert_select.test:
  Remove not needed --disable_ps_protocol
mysql-test/t/select.test:
  Ensure that --ps-protocol return same results as normal test
mysql-test/t/sp.test:
  Fixed comment
mysql-test/t/system_mysql_db_fix.test:
  Fix that results is same as from system_mysql_db.test
mysql-test/t/trigger.test:
  Added comment
mysql-test/t/type_blob.test:
  Remove not needed --disable_ps_protocol
mysql-test/t/union.test:
  Run most of the test with --ps-protocol
mysql-test/t/user_limits.test:
  Ensure that --ps-protocol return same results as normal test
mysql-test/t/view.test:
  Removed --error as bug is now fixed
mysql-test/t/warnings.test:
  Ensure that --ps-protocol return same results as normal test
ndb/include/Makefile.am:
  Don't automaticly use SCCS files
sql/ha_ndbcluster.cc:
  Removed compiler warning
sql/log_event.cc:
  After merge fix
sql/sql_class.h:
  After merge fix
sql/sql_insert.cc:
  After merge fix
sql/sql_load.cc:
  After merge fix
sql/sql_prepare.cc:
  Add support for warnings for prepare of prepared statements
sql/sql_update.cc:
  After merge fixes
parent 6d044333
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1864,13 +1864,14 @@ void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
{
  uchar *pos;
  uint field_count, param_count;
  uint field_count, param_count, packet_length;
  MYSQL_DATA *fields_data;
  DBUG_ENTER("read_prepare_result");

  mysql= mysql->last_used_con;
  if (net_safe_read(mysql) == packet_error)
  if ((packet_length=net_safe_read(mysql)) == packet_error)
    DBUG_RETURN(1);
  mysql->warning_count= 0;

  pos= (uchar*) mysql->net.read_pos;
  stmt->stmt_id= uint4korr(pos+1); pos+= 5;
@@ -1878,6 +1879,8 @@ my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
  field_count=   uint2korr(pos);   pos+= 2;
  /* Number of placeholders in the statement */
  param_count=   uint2korr(pos);   pos+= 2;
  if (packet_length >= 12)
    mysql->warning_count= uint2korr(pos+1);

  if (param_count != 0)
  {
@@ -1894,7 +1897,6 @@ my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
    if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT))
      mysql->server_status|= SERVER_STATUS_IN_TRANS;

    mysql->extra_info= net_field_length_ll(&pos);
    if (!(fields_data= (*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0,7)))
      DBUG_RETURN(1);
    if (!(stmt->fields= unpack_fields(fields_data,&stmt->mem_root,
@@ -1902,9 +1904,10 @@ my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
				      mysql->server_capabilities)))
      DBUG_RETURN(1);
  }
  stmt->field_count=  (uint) field_count;
  stmt->field_count=  field_count;
  stmt->param_count=  (ulong) param_count;
  mysql->warning_count= 0;
  DBUG_PRINT("exit",("field_count: %u  param_count: %u  warning_count: %u",
                     field_count, param_count, (uint) mysql->warning_count));

  DBUG_RETURN(0);
}
+5 −1
Original line number Diff line number Diff line
@@ -63,4 +63,8 @@ a0
select 'a' union select concat('a', -0.0);
a
a
good
a0.0
select 'a' union select concat('a', -0.0000);
a
a
a0.0000
+1 −1
Original line number Diff line number Diff line
drop table if exists t1,t2,t3,t4;
drop table if exists t1_1,t1_2,t9_1,t9_2;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
+2 −1
Original line number Diff line number Diff line
@@ -1433,7 +1433,8 @@ insert into v1 values (1) on duplicate key update a=2;
insert into v1 values (1) on duplicate key update a=2;
ERROR HY000: CHECK OPTION failed 'test.v1'
insert ignore into v1 values (1) on duplicate key update a=2;
ERROR HY000: CHECK OPTION failed 'test.v1'
Warnings:
Error	1369	CHECK OPTION failed 'test.v1'
select * from t1;
a
1
+1 −1
Original line number Diff line number Diff line
@@ -273,8 +273,8 @@ create table t3 like t1;
show create table t3;
select * from t3;
# Disable PS becasue of @@warning_count
--disable_ps_protocol
create table if not exists t3 like t1;
--disable_ps_protocol
select @@warning_count;
--enable_ps_protocol
create temporary table t3 like t2;
Loading