summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-19 11:10:06 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-19 11:10:06 +0300
commit1a905ce2440093117722aa25c0c88769318721a1 (patch)
tree7d6cac7d6357418f6b85ae82dcdb0e7532fca077
parent387e77d104887d45a4574a9bd1b826cfa20f01c1 (diff)
parent8a32ef1cf9e3d92230416b882b697aeb8867278c (diff)
downloadmariadb-git-1a905ce2440093117722aa25c0c88769318721a1.tar.gz
merge
Docs/glibc-2.2.5.patch: Auto merged Docs/manual.texi: Auto merged sql/item_strfunc.cc: Auto merged
-rw-r--r--Docs/manual.texi2
-rw-r--r--mysql-test/r/func_concat.result13
-rw-r--r--mysql-test/t/func_concat.test24
-rw-r--r--mysys/my_pthread.c1
-rw-r--r--sql/item_strfunc.cc2
-rw-r--r--sql/share/italian/errmsg.txt20
6 files changed, 51 insertions, 11 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index bbe18b9f402..0fd5b37b3ec 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -49850,6 +49850,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.51
@itemize @bullet
@item
+Fixed bug in @code{CONCAT_WS()} that cut the result.
+@item
Changed name of variables @code{Com_show_master_stat} to
@code{Com_show_master_status} and @code{Com_show_slave_stat} to
@code{Com_show_slave_status}.
diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result
new file mode 100644
index 00000000000..75ee8f2bf79
--- /dev/null
+++ b/mysql-test/r/func_concat.result
@@ -0,0 +1,13 @@
+number alpha new
+1413006 idlfmv 1413006<---->idlfmv
+1413065 smpsfz 1413065<---->smpsfz
+1413127 sljrhx 1413127<---->sljrhx
+1413304 qerfnd 1413304<---->qerfnd
+new
+1413006<---->idlfmv
+number alpha new
+1413006 idlfmv 1413006<->idlfmv
+number alpha new
+1413006 idlfmv 1413006-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv
+number alpha new
+1413006 idlfmv 1413006<------------------>idlfmv
diff --git a/mysql-test/t/func_concat.test b/mysql-test/t/func_concat.test
new file mode 100644
index 00000000000..d6da1d6a603
--- /dev/null
+++ b/mysql-test/t/func_concat.test
@@ -0,0 +1,24 @@
+#
+# Test of problem with CONCAT_WS() and long separators.
+#
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
+INSERT INTO t1 VALUES (1413006,'idlfmv'),
+(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
+
+SELECT number, alpha, CONCAT_WS('<---->',number,alpha) AS new
+FROM t1 GROUP BY number;
+
+SELECT CONCAT_WS('<---->',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('<->',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('-',number,alpha,alpha,alpha,alpha,alpha,alpha,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+
+SELECT number, alpha, CONCAT_WS('<------------------>',number,alpha) AS new
+FROM t1 GROUP BY new LIMIT 1;
+drop table t1;
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 0ac35123ad0..747a07e71b2 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -432,6 +432,7 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
}
#endif
+
#ifdef HPUX
int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
{
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 9d24ca19b4c..9c6681cdcbf 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -475,7 +475,7 @@ null:
void Item_func_concat_ws::fix_length_and_dec()
{
- max_length=0;
+ max_length=separator->max_length*(arg_count-1);
for (uint i=0 ; i < arg_count ; i++)
max_length+=args[i]->max_length;
if (max_length > MAX_BLOB_WIDTH)
diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt
index 228de271ad6..94e9235d590 100644
--- a/sql/share/italian/errmsg.txt
+++ b/sql/share/italian/errmsg.txt
@@ -209,16 +209,16 @@
"E' scaduto il timeout per l'attesa del lock",
"Il numero totale di lock e' maggiore della grandezza della tabella di lock",
"I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'",
-"DROP DATABASE not allowed while thread is holding global read lock",
-"CREATE DATABASE not allowed while thread is holding global read lock",
-"Wrong arguments to %s",
-"%-.32s@%-.64s is not allowed to create new users",
-"Incorrect table definition; All MERGE tables must be in the same database",
-"Deadlock found when trying to get lock; Try restarting transaction",
-"The used table type doesn't support FULLTEXT indexes",
-"Cannot add foreign key constraint",
-"Cannot add a child row: a foreign key constraint fails",
-"Cannot delete a parent row: a foreign key constraint fails",
+"DROP DATABASE non e' permesso mentre il thread ha un lock globale di lettura",
+"CREATE DATABASE non e' permesso mentre il thread ha un lock globale di lettura",
+"Argomenti errati a %s",
+"A %-.32s@%-.64s non e' permesso creare nuovi utenti",
+"Definizione della tabella errata; tutte le tabelle di tipo MERGE devono essere nello stesso database",
+"Trovato deadlock durante il lock; Provare a far ripartire la transazione",
+"La tabella usata non supporta gli indici FULLTEXT",
+"Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint)",
+"Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto",
+"Impossibile cancellare la riga: un vincolo d'integrita' referenziale non e' soddisfatto",
"Error connecting to master: %-.128s",
"Error running query on master: %-.128s",
"Error when executing command %s: %-.128s",