summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-08-13 13:26:52 +0300
committerunknown <monty@mashka.mysql.fi>2003-08-13 13:26:52 +0300
commit5c9e0cdc5309a7f16aa57a9a99e11f0c7740e7ec (patch)
treeb9a42417de7e14e4868ea1376a4a8fe0bbe85203 /sql
parent06451ae43751d71ef7e15b48b006853c9d929e59 (diff)
parent74bab1fe02254e9fd4624fdc4c8d829a996840a4 (diff)
downloadmariadb-git-5c9e0cdc5309a7f16aa57a9a99e11f0c7740e7ec.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0 sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc24
-rw-r--r--sql/sql_parse.cc4
-rw-r--r--sql/sql_select.cc5
-rw-r--r--sql/sql_yacc.yy2
4 files changed, 20 insertions, 15 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index f7955be3b09..3451ffab65f 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -329,8 +329,14 @@ void Load_log_event::pack_info(String* packet)
pretty_print_str(&tmp, sql_ex.line_start, sql_ex.line_start_len);
}
- if ((int)skip_lines > 0)
- tmp.append( " IGNORE %ld LINES ", (long) skip_lines);
+ if ((long) skip_lines > 0)
+ {
+ char nr_buff[32], *end;
+ tmp.append( " IGNORE ");
+ end= longlong10_to_str((longlong) skip_lines, nr_buff, 10);
+ tmp.append(nr_buff, (uint) (end-nr_buff));
+ tmp.append( " LINES");
+ }
if (num_fields)
{
@@ -1338,8 +1344,8 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
pretty_print_str(file, sql_ex.line_start, sql_ex.line_start_len);
}
- if ((int)skip_lines > 0)
- fprintf(file, " IGNORE %ld LINES ", (long) skip_lines);
+ if ((long) skip_lines > 0)
+ fprintf(file, " IGNORE %ld LINES", (long) skip_lines);
if (num_fields)
{
@@ -1934,20 +1940,22 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
else if (sql_ex.opt_flags & IGNORE_FLAG)
handle_dup= DUP_IGNORE;
else
+ {
/*
- Note that when replication is running fine, if it was DUP_ERROR on the
+ When replication is running fine, if it was DUP_ERROR on the
master then we could choose DUP_IGNORE here, because if DUP_ERROR
suceeded on master, and data is identical on the master and slave,
then there should be no uniqueness errors on slave, so DUP_IGNORE is
the same as DUP_ERROR. But in the unlikely case of uniqueness errors
- (because the data on the master and slave happen to be different (user
- error or bug), we want LOAD DATA to print an error message on the
- slave to discover the problem.
+ (because the data on the master and slave happen to be different
+ (user error or bug), we want LOAD DATA to print an error message on
+ the slave to discover the problem.
If reading from net (a 3.23 master), mysql_load() will change this
to DUP_IGNORE.
*/
handle_dup= DUP_ERROR;
+ }
sql_exchange ex((char*)fname, sql_ex.opt_flags & DUMPFILE_FLAG);
String field_term(sql_ex.field_term,sql_ex.field_term_len);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 70c0f772d7d..f0e845e6f36 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3579,8 +3579,8 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
if (options & REFRESH_LOG)
{
/*
- Flush the normal query log, the update log, the binary log, the slow query
- log, and the relay log (if it exists).
+ Flush the normal query log, the update log, the binary log,
+ the slow query log, and the relay log (if it exists).
*/
mysql_log.new_file(1);
mysql_update_log.new_file(1);
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index c676f389da7..c4c2f890f5d 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -972,10 +972,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
group ? group : order,
select_limit,
thd->select_limit))
- {
- if (!join.join_tab[join.const_tables].select->quick)
- goto err;
- }
+ goto err;
}
join.having=having; // Actually a parameter
thd->proc_info="Sending data";
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index b07dca91a20..03837300904 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -2024,7 +2024,7 @@ simple_expr:
{
LEX *lex=Lex;
$$= new Item_func_week($3,new Item_int((char*) "0",
- lex->thd->variables.default_week_format,1));
+ lex->thd->variables.default_week_format,1));
}
| WEEK_SYM '(' expr ',' expr ')'
{ $$= new Item_func_week($3,$5); }