Commit 086f7ac2 authored by unknown's avatar unknown

Cleanups after merge from 4.1.


mysql-test/r/ps_1general.result:
  Update results
mysql-test/r/ps_2myisam.result:
  Update results
mysql-test/r/ps_3innodb.result:
  Update results
mysql-test/r/ps_4heap.result:
  Update results
mysql-test/r/ps_5merge.result:
  Update results
mysql-test/r/ps_6bdb.result:
  Update results
mysql-test/r/ps_7ndb.result:
  Update results
mysql-test/r/select.result:
  Update results
mysql-test/t/disabled.def:
  Disable ndb_condition_pushdown test
mysql-test/t/select.test:
  Fix bad merge
sql/field_conv.cc:
  Update name of warning message
sql/mysqld.cc:
  Set proper thd->killed
tests/mysql_client_test.c:
  Update test cases, change verify_prepared_field() help function
  so it is passed the filename and line from where it is called
  and includes that in the error message.
parent fd764de3
...@@ -473,12 +473,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -473,12 +473,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 14 N 1 31 8 def Extra 253 255 14 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
SET @arg00=1 ; SET @arg00=1 ;
...@@ -489,12 +489,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -489,12 +489,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 5 Y 0 31 8 def type 253 10 5 Y 0 31 8
def possible_keys 252 4096 7 Y 0 31 8 def possible_keys 253 4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8 def key 253 64 7 Y 0 31 8
def key_len 253 4096 1 Y 128 31 63 def key_len 253 4096 1 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 27 N 1 31 8 def Extra 253 255 27 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
drop table if exists t2; drop table if exists t2;
......
...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
drop table if exists t2 ; drop table if exists t2 ;
......
...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence test_sequence
......
...@@ -1155,12 +1155,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1155,12 +1155,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence test_sequence
......
...@@ -1197,12 +1197,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1197,12 +1197,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence test_sequence
...@@ -4209,12 +4209,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -4209,12 +4209,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence test_sequence
......
...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 1 SIMPLE t9 ALL NULL NULL NULL NULL 3
test_sequence test_sequence
......
...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 ...@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8 def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8 def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8 def type 253 10 3 Y 0 31 8
def possible_keys 252 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8 def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63 def key_len 253 4096 0 Y 128 31 63
def ref 252 1024 0 Y 0 31 8 def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63 def rows 8 10 1 Y 32928 0 63
def Extra 252 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2 1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence test_sequence
......
...@@ -2579,6 +2579,25 @@ K2C4 K4N4 F2I4 ...@@ -2579,6 +2579,25 @@ K2C4 K4N4 F2I4
WART 0100 1 WART 0100 1
WART 0200 1 WART 0200 1
WART 0300 3 WART 0300 3
select found_rows();
found_rows()
3
select count(*) from t1;
count(*)
15
select found_rows();
found_rows()
1
select count(*) from t1 limit 2,3;
count(*)
select found_rows();
found_rows()
0
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
count(*)
select found_rows();
found_rows()
1
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( a BLOB, INDEX (a(20)) ); CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
...@@ -2781,26 +2800,7 @@ INSERT INTO t1 ...@@ -2781,26 +2800,7 @@ INSERT INTO t1
SELECT 50, 3, 3 FROM DUAL SELECT 50, 3, 3 FROM DUAL
WHERE NOT EXISTS WHERE NOT EXISTS
(SELECT * FROM t1 WHERE a = 50 AND b = 3); (SELECT * FROM t1 WHERE a = 50 AND b = 3);
select found_rows();
found_rows()
0
SELECT * FROM t1; SELECT * FROM t1;
a b c a b c
50 3 3 50 3 3
select count(*) from t1;
count(*)
1
select found_rows();
found_rows()
1
select count(*) from t1 limit 2,3;
count(*)
select found_rows();
found_rows()
0
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
count(*)
select found_rows();
found_rows()
1
DROP TABLE t1; DROP TABLE t1;
...@@ -11,3 +11,4 @@ ...@@ -11,3 +11,4 @@
############################################################################## ##############################################################################
sp-goto:GOTO is currently is disabled - will be fixed in the future sp-goto:GOTO is currently is disabled - will be fixed in the future
ndb_condition_pushdown:Bug #12021
...@@ -2152,16 +2152,16 @@ INSERT INTO t1 VALUES ...@@ -2152,16 +2152,16 @@ INSERT INTO t1 VALUES
SELECT K2C4, K4N4, F2I4 FROM t1 SELECT K2C4, K4N4, F2I4 FROM t1
WHERE K2C4 = 'WART' AND WHERE K2C4 = 'WART' AND
(F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200')); (F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200'));
SELECT K2C4, K4N4, F2I4 FROM t1
WHERE K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200');
select found_rows(); select found_rows();
SELECT K2C4, K4N4, F2I4 FROM t1
select count(*) from t1; select count(*) from t1;
select found_rows(); select found_rows();
select count(*) from t1 limit 2,3; select count(*) from t1 limit 2,3;
select found_rows(); select found_rows();
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3; select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
select found_rows(); select found_rows();
WHERE K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200');
DROP TABLE t1; DROP TABLE t1;
......
...@@ -339,7 +339,7 @@ static void do_cut_string(Copy_field *copy) ...@@ -339,7 +339,7 @@ static void do_cut_string(Copy_field *copy)
MY_SEQ_SPACES) < copy->from_length - copy->to_length) MY_SEQ_SPACES) < copy->from_length - copy->to_length)
{ {
copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DATA_TRUNCATED, 1); WARN_DATA_TRUNCATED, 1);
} }
} }
......
...@@ -692,7 +692,7 @@ static void close_connections(void) ...@@ -692,7 +692,7 @@ static void close_connections(void)
{ {
DBUG_PRINT("quit",("Informing thread %ld that it's time to die", DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
tmp->thread_id)); tmp->thread_id));
tmp->killed= 1; tmp->killed= THD::KILL_CONNECTION;
if (tmp->mysys_var) if (tmp->mysys_var)
{ {
tmp->mysys_var->abort=1; tmp->mysys_var->abort=1;
......
...@@ -666,13 +666,20 @@ static void verify_col_data(const char *table, const char *col, ...@@ -666,13 +666,20 @@ static void verify_col_data(const char *table, const char *col,
/* Utility function to verify the field members */ /* Utility function to verify the field members */
static void verify_prepare_field(MYSQL_RES *result, #define verify_prepare_field(result,no,name,org_name,type,table,\
unsigned int no, const char *name, org_table,db,length,def) \
const char *org_name, do_verify_prepare_field((result),(no),(name),(org_name),(type), \
enum enum_field_types type, (table),(org_table),(db),(length),(def), \
const char *table, __FILE__, __LINE__)
const char *org_table, const char *db,
unsigned long length, const char *def) static void do_verify_prepare_field(MYSQL_RES *result,
unsigned int no, const char *name,
const char *org_name,
enum enum_field_types type,
const char *table,
const char *org_table, const char *db,
unsigned long length, const char *def,
const char *file, int line)
{ {
MYSQL_FIELD *field; MYSQL_FIELD *field;
CHARSET_INFO *cs; CHARSET_INFO *cs;
...@@ -719,8 +726,9 @@ static void verify_prepare_field(MYSQL_RES *result, ...@@ -719,8 +726,9 @@ static void verify_prepare_field(MYSQL_RES *result,
{ {
if (field->type != type) if (field->type != type)
{ {
fprintf(stderr, "Expected field type: %d, got type: %d\n", fprintf(stderr,
(int) type, (int) field->type); "Expected field type: %d, got type: %d in file %s, line %d\n",
(int) type, (int) field->type, file, line);
DIE_UNLESS(field->type == type); DIE_UNLESS(field->type == type);
} }
} }
...@@ -7402,8 +7410,8 @@ static void test_explain_bug() ...@@ -7402,8 +7410,8 @@ static void test_explain_bug()
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "", 64, 0); 0, 0, "", 64, 0);
verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", MYSQL_TYPE_BLOB,
MYSQL_TYPE_BLOB, 0, 0, "", 0, 0); 0, 0, "", 0, 0);
verify_prepare_field(result, 2, "Null", "IS_NULLABLE", verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
mysql_get_server_version(mysql) <= 50000 ? mysql_get_server_version(mysql) <= 50000 ?
...@@ -7457,7 +7465,7 @@ static void test_explain_bug() ...@@ -7457,7 +7465,7 @@ static void test_explain_bug()
verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING, verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING,
"", "", "", 10, 0); "", "", "", 10, 0);
verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_BLOB, verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_VAR_STRING,
"", "", "", NAME_LEN*MAX_KEY, 0); "", "", "", NAME_LEN*MAX_KEY, 0);
verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING, verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING,
...@@ -7474,13 +7482,13 @@ static void test_explain_bug() ...@@ -7474,13 +7482,13 @@ static void test_explain_bug()
"", "", NAME_LEN*MAX_KEY, 0); "", "", NAME_LEN*MAX_KEY, 0);
} }
verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_BLOB, verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING,
"", "", "", NAME_LEN*16, 0); "", "", "", NAME_LEN*16, 0);
verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG, verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG,
"", "", "", 10, 0); "", "", "", 10, 0);
verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_BLOB, verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_VAR_STRING,
"", "", "", 255, 0); "", "", "", 255, 0);
mysql_free_result(result); mysql_free_result(result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment