Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-29 11:37:21+02:00, jonas@stripped +9 -0
Merge perch.ndb.mysql.com:/home/jonas/src/tmp/mysql-5.0-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb-bj
MERGE: 1.2248.2.16
mysql-test/r/ctype_utf8.result@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.94.1.1
mysql-test/t/ctype_utf8.test@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.87.1.1
ndb/src/mgmclient/main.cpp@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.21.1.1
ndb/src/ndbapi/NdbScanOperation.cpp@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.75.1.1
ndb/tools/ndb_config.cpp@stripped, 2006-09-29 11:37:19+02:00, jonas@stripped +0 -1
merge
MERGE: 1.12.1.2
ndb/tools/restore/restore_main.cpp@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.34.1.1
sql/sql_base.cc@stripped, 2006-09-29 11:35:48+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.347.1.3
sql/sql_lex.h@stripped, 2006-09-29 11:35:49+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.225.1.2
sql/sql_view.cc@stripped, 2006-09-29 11:35:49+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.92.2.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.0-ndb-bj/RESYNC
--- 1.351/sql/sql_base.cc 2006-09-29 11:37:25 +02:00
+++ 1.352/sql/sql_base.cc 2006-09-29 11:37:25 +02:00
@@ -4563,9 +4563,11 @@
TABLE_LIST *tables,
Item **conds, TABLE_LIST **leaves,
bool select_insert,
+ ulong want_access_first,
ulong want_access)
{
TABLE_LIST *leaves_tmp = NULL;
+ bool first_table= true;
if (setup_tables (thd, context, from_clause, tables, conds,
&leaves_tmp, select_insert))
@@ -4575,13 +4577,16 @@
*leaves = leaves_tmp;
for (; leaves_tmp; leaves_tmp= leaves_tmp->next_leaf)
+ {
if (leaves_tmp->belong_to_view &&
- check_single_table_access(thd, want_access, leaves_tmp))
+ check_single_table_access(thd, first_table ? want_access_first :
+ want_access, leaves_tmp))
{
tables->hide_view_error(thd);
return TRUE;
}
-
+ first_table= false;
+ }
return FALSE;
}
--- 1.226/sql/sql_lex.h 2006-09-29 11:37:25 +02:00
+++ 1.227/sql/sql_lex.h 2006-09-29 11:37:25 +02:00
@@ -548,6 +548,12 @@
bool braces; /* SELECT ... UNION (SELECT ... ) <- this braces */
/* TRUE when having fix field called in processing of this SELECT */
bool having_fix_field;
+
+ /* Number of Item_sum-derived objects in this SELECT */
+ uint n_sum_items;
+ /* Number of Item_sum-derived objects in children and descendant SELECTs */
+ uint n_child_sum_items;
+
/* explicit LIMIT clause was used */
bool explicit_limit;
/*
@@ -640,7 +646,7 @@
bool test_limit();
friend void lex_start(THD *thd, uchar *buf, uint length);
- st_select_lex() {}
+ st_select_lex() : n_sum_items(0), n_child_sum_items(0) {}
void make_empty_select()
{
init_query();
@@ -834,7 +840,7 @@
XID *xid;
gptr yacc_yyss,yacc_yyvs;
THD *thd;
- CHARSET_INFO *charset;
+ CHARSET_INFO *charset, *underscore_charset;
/* store original leaf_tables for INSERT SELECT and PS/SP */
TABLE_LIST *leaf_tables_insert;
/* Position (first character index) of SELECT of CREATE VIEW statement */
--- 1.96/mysql-test/r/ctype_utf8.result 2006-09-29 11:37:25 +02:00
+++ 1.97/mysql-test/r/ctype_utf8.result 2006-09-29 11:37:25 +02:00
@@ -924,6 +924,37 @@
select ifnull(NULL, _utf8'string');
ifnull(NULL, _utf8'string')
string
+set names utf8;
+create table t1 (s1 char(5) character set utf8 collate utf8_lithuanian_ci);
+insert into t1 values ('I'),('K'),('Y');
+select * from t1 where s1 < 'K' and s1 = 'Y';
+s1
+I
+Y
+select * from t1 where 'K' > s1 and s1 = 'Y';
+s1
+I
+Y
+drop table t1;
+create table t1 (s1 char(5) character set utf8 collate utf8_czech_ci);
+insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i');
+select * from t1 where s1 > 'd' and s1 = 'CH';
+s1
+ch
+CH
+Ch
+select * from t1 where 'd' < s1 and s1 = 'CH';
+s1
+ch
+CH
+Ch
+select * from t1 where s1 = 'cH' and s1 <> 'ch';
+s1
+cH
+select * from t1 where 'cH' = s1 and s1 <> 'ch';
+s1
+cH
+drop table t1;
create table t1 (a varchar(255)) default character set utf8;
insert into t1 values (1.0);
drop table t1;
--- 1.88/mysql-test/t/ctype_utf8.test 2006-09-29 11:37:25 +02:00
+++ 1.89/mysql-test/t/ctype_utf8.test 2006-09-29 11:37:25 +02:00
@@ -728,6 +728,24 @@
select ifnull(NULL, _utf8'string');
#
+# Bug#9509 Optimizer: wrong result after AND with comparisons
+#
+set names utf8;
+create table t1 (s1 char(5) character set utf8 collate utf8_lithuanian_ci);
+insert into t1 values ('I'),('K'),('Y');
+select * from t1 where s1 < 'K' and s1 = 'Y';
+select * from t1 where 'K' > s1 and s1 = 'Y';
+drop table t1;
+
+create table t1 (s1 char(5) character set utf8 collate utf8_czech_ci);
+insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i');
+select * from t1 where s1 > 'd' and s1 = 'CH';
+select * from t1 where 'd' < s1 and s1 = 'CH';
+select * from t1 where s1 = 'cH' and s1 <> 'ch';
+select * from t1 where 'cH' = s1 and s1 <> 'ch';
+drop table t1;
+
+#
# Bug#10714: Inserting double value into utf8 column crashes server
#
create table t1 (a varchar(255)) default character set utf8;
--- 1.94/sql/sql_view.cc 2006-09-29 11:37:25 +02:00
+++ 1.95/sql/sql_view.cc 2006-09-29 11:37:25 +02:00
@@ -1060,6 +1060,31 @@
table->next_global= view_tables;
}
+ bool view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
+ lex->can_be_merged());
+ TABLE_LIST *view_main_select_tables;
+ if (view_is_mergeable)
+ {
+ /*
+ Currently 'view_main_select_tables' differs from 'view_tables'
+ only then view has CONVERT_TZ() function in its select list.
+ This may change in future, for example if we enable merging of
+ views with subqueries in select list.
+ */
+ view_main_select_tables=
+ (TABLE_LIST*)lex->select_lex.table_list.first;
+
+ /*
+ Let us set proper lock type for tables of the view's main
+ select since we may want to perform update or insert on
+ view. This won't work for view containing union. But this is
+ ok since we don't allow insert and update on such views
+ anyway.
+ */
+ for (tbl= view_main_select_tables; tbl; tbl= tbl->next_local)
+ tbl->lock_type= table->lock_type;
+ }
+
/*
If we are opening this view as part of implicit LOCK TABLES, then
this view serves as simple placeholder and we should not continue
@@ -1114,43 +1139,26 @@
- VIEW SELECT allow merging
- VIEW used in subquery or command support MERGE algorithm
*/
- if (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
- lex->can_be_merged() &&
+ if (view_is_mergeable &&
(table->select_lex->master_unit() != &old_lex->unit ||
old_lex->can_use_merged()) &&
!old_lex->can_not_use_merged())
{
- List_iterator_fast<TABLE_LIST> ti(view_select->top_join_list);
- /*
- Currently 'view_main_select_tables' differs from 'view_tables'
- only then view has CONVERT_TZ() function in its select list.
- This may change in future, for example if we enable merging
- of views with subqueries in select list.
- */
- TABLE_LIST *view_main_select_tables=
- (TABLE_LIST*)lex->select_lex.table_list.first;
/* lex should contain at least one table */
DBUG_ASSERT(view_main_select_tables != 0);
+ List_iterator_fast<TABLE_LIST> ti(view_select->top_join_list);
+
table->effective_algorithm= VIEW_ALGORITHM_MERGE;
DBUG_PRINT("info", ("algorithm: MERGE"));
table->updatable= (table->updatable_view != 0);
table->effective_with_check=
old_lex->get_effective_with_check(table);
table->merge_underlying_list= view_main_select_tables;
- /*
- Let us set proper lock type for tables of the view's main select
- since we may want to perform update or insert on view. This won't
- work for view containing union. But this is ok since we don't
- allow insert and update on such views anyway.
- Also we fill correct wanted privileges.
- */
- for (tbl= table->merge_underlying_list; tbl; tbl= tbl->next_local)
- {
- tbl->lock_type= table->lock_type;
+ /* Fill correct wanted privileges. */
+ for (tbl= view_main_select_tables; tbl; tbl= tbl->next_local)
tbl->grant.want_privilege= top_view->grant.orig_want_privilege;
- }
/* prepare view context */
lex->select_lex.context.resolve_in_table_list_only(view_main_select_tables);
--- 1.35/ndb/tools/restore/restore_main.cpp 2006-09-29 11:37:25 +02:00
+++ 1.36/ndb/tools/restore/restore_main.cpp 2006-09-29 11:37:25 +02:00
@@ -433,6 +433,17 @@
}
}
}
+ for(Uint32 i= 0; i < g_consumers.size(); i++)
+ {
+ if (g_consumers[i]->has_temp_error())
+ {
+ clearConsumers();
+ ndbout_c("\nRestore successful, but encountered temporary error, "
+ "please look at configuration.");
+ return NDBT_ProgramExit(NDBT_TEMPORARY);
+ }
+ }
+
clearConsumers();
return NDBT_ProgramExit(NDBT_OK);
} // main
--- 1.22/ndb/src/mgmclient/main.cpp 2006-09-29 11:37:25 +02:00
+++ 1.23/ndb/src/mgmclient/main.cpp 2006-09-29 11:37:25 +02:00
@@ -38,6 +38,7 @@
#include "ndb_mgmclient.hpp"
const char *progname = "ndb_mgm";
+const char *load_default_groups[]= { "mysql_cluster","ndb_mgm",0 };
static Ndb_mgmclient* com;
@@ -87,6 +88,8 @@
{
short_usage_sub();
ndb_std_print_version();
+ print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
+ puts("");
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
@@ -128,7 +131,6 @@
NDB_INIT(argv[0]);
const char *_host = 0;
int _port = 0;
- const char *load_default_groups[]= { "mysql_cluster","ndb_mgm",0 };
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
--- 1.76/ndb/src/ndbapi/NdbScanOperation.cpp 2006-09-29 11:37:25 +02:00
+++ 1.77/ndb/src/ndbapi/NdbScanOperation.cpp 2006-09-29 11:37:25 +02:00
@@ -507,6 +507,8 @@
int return_code = theNdb->receiveResponse(3*timeout);
if (return_code == 0 && seq == tp->getNodeSequence(nodeId)) {
continue;
+ } else if(return_code == -1){
+ retVal = -1;
} else {
idx = last;
retVal = -2; //return_code;
@@ -1380,7 +1382,11 @@
continue;
}
if(DEBUG_NEXT_RESULT) ndbout_c("return -1");
- setErrorCode(4028);
+ if(return_code == -1){
+ setErrorCode(4008);
+ } else {
+ setErrorCode(4028);
+ }
return -1;
}
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.2257) | jonas | 29 Sep |