diff options
author | guilhem@mysql.com <> | 2005-01-13 15:35:36 +0100 |
---|---|---|
committer | guilhem@mysql.com <> | 2005-01-13 15:35:36 +0100 |
commit | a02601ecc572065c49c3b731db08d6c75d857192 (patch) | |
tree | f91bfea30b15dc9845b672c69618e3bf4fa0126e /sql | |
parent | 84bc0db087fbabd0d33227394a9efe8fb88fd3f0 (diff) | |
parent | 8474953cdfeebb080d50ca0f411c224c37be8cc4 (diff) | |
download | mariadb-git-a02601ecc572065c49c3b731db08d6c75d857192.tar.gz |
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-clean
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 12 | ||||
-rw-r--r-- | sql/filesort.cc | 5 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 5 |
4 files changed, 9 insertions, 15 deletions
diff --git a/sql/field.cc b/sql/field.cc index e2c11cc7372..86073072a64 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4393,8 +4393,7 @@ void Field_string::sort_string(char *to,uint length) uint tmp=my_strnxfrm(field_charset, (unsigned char *) to, length, (unsigned char *) ptr, field_length); - if (tmp < length) - field_charset->cset->fill(field_charset, to + tmp, length - tmp, ' '); + DBUG_ASSERT(tmp == length); } @@ -4596,9 +4595,7 @@ void Field_varstring::sort_string(char *to,uint length) (uchar*) to, length, (uchar*) ptr+HA_KEY_BLOB_LENGTH, tot_length); - if (tot_length < length) - field_charset->cset->fill(field_charset, to+tot_length,length-tot_length, - binary() ? (char) 0 : ' '); + DBUG_ASSERT(tot_length == length); } @@ -5116,10 +5113,7 @@ void Field_blob::sort_string(char *to,uint length) blob_length=my_strnxfrm(field_charset, (uchar*) to, length, (uchar*) blob, blob_length); - if (blob_length < length) - field_charset->cset->fill(field_charset, to+blob_length, - length-blob_length, - binary() ? (char) 0 : ' '); + DBUG_ASSERT(blob_length == length); } } diff --git a/sql/filesort.cc b/sql/filesort.cc index bd0de022fd4..cb377070aaa 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -622,10 +622,7 @@ static void make_sortkey(register SORTPARAM *param, } uint tmp_length=my_strnxfrm(cs,to,sort_field->length, (unsigned char *) from, length); - if (tmp_length < sort_field->length) - cs->cset->fill(cs, (char*) to+tmp_length, - sort_field->length-tmp_length, - fill_char); + DBUG_ASSERT(tmp_length == sort_field->length); } else { diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2b273f4b84c..4d802ad4f34 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -64,7 +64,7 @@ const char *command_name[]={ "Drop DB", "Refresh", "Shutdown", "Statistics", "Processlist", "Connect","Kill","Debug","Ping","Time","Delayed insert","Change user", "Binlog Dump","Table Dump", "Connect Out", "Register Slave", - "Prepare", "Prepare Execute", "Long Data", "Close stmt", + "Prepare", "Execute", "Long Data", "Close stmt", "Reset stmt", "Set option", "Error" // Last command number }; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 20ebc23e240..ecf01824755 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1592,7 +1592,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length, DBUG_RETURN(1); } - mysql_log.write(thd, COM_PREPARE, "%s", packet); + mysql_log.write(thd, COM_PREPARE, "[%lu] %s", stmt->id, packet); thd->current_arena= stmt; mysql_init_query(thd, (uchar *) thd->query, thd->query_length); @@ -1792,6 +1792,9 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length) if (stmt->param_count && stmt->set_params_data(stmt, &expanded_query)) goto set_params_data_err; #endif + mysql_log.write(thd, COM_EXECUTE, "[%lu] %s", stmt->id, + expanded_query.length() ? expanded_query.c_ptr() : + stmt->query); thd->protocol= &thd->protocol_prep; // Switch to binary protocol execute_stmt(thd, stmt, &expanded_query, TRUE); thd->protocol= &thd->protocol_simple; // Use normal protocol |