From 2b8b1a399ac9bd2d6293c6e0232ac9abe64ece58 Mon Sep 17 00:00:00 2001 From: "ram@gw.mysql.r18.ru" <> Date: Wed, 8 Sep 2004 16:45:03 +0500 Subject: A fix (bug #3120: 'mysqladmin ping' - return error code). --- client/mysqladmin.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 3bc11ec0fb0..153fcdde96d 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -246,7 +246,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), int main(int argc,char *argv[]) { - int error, ho_error; + int error= 0, ho_error; MYSQL mysql; char **commands, **save_argv; @@ -285,10 +285,25 @@ int main(int argc,char *argv[]) opt_ssl_capath, opt_ssl_cipher); #endif if (sql_connect(&mysql, option_wait)) - error = 1; + { + unsigned int err= mysql_errno(&mysql); + if (err >= CR_MIN_ERROR && err <= CR_MAX_ERROR) + error= 1; + else + { + /* Return 0 if all commands are PING */ + for (; argc > 0; argv++, argc--) + { + if (find_type(argv[0], &command_typelib, 2) != ADMIN_PING) + { + error= 1; + break; + } + } + } + } else { - error = 0; while (!interrupted && (!opt_count_iterations || nr_iterations)) { new_line = 0; -- cgit v1.2.1 From 751071a6773db42da4b2d5e4060d6b0377d151c1 Mon Sep 17 00:00:00 2001 From: "rburnett@build.mysql.com" <> Date: Wed, 8 Sep 2004 16:31:01 +0200 Subject: [This patch has already been approved by Serge. I am recommitting and pushing from a new repository because there were other changesets that couldn't be pushed.] BUG# 5229 --password=foobar does not override the empty 'password' option in the my.cnf This is a backport of a change made by jani in the 4.1 tree. mysql.cc: Add tty_password=0 in the p case handling in get_one_option --- client/mysql.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/client/mysql.cc b/client/mysql.cc index 3cc8b41af66..7d1b6af2c37 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -689,6 +689,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), while (*argument) *argument++= 'x'; // Destroy argument if (*start) start[1]=0 ; + tty_password= 0; } else tty_password= 1; -- cgit v1.2.1 From df461bdeaba8dddf8056430c48926ac4a614a7cd Mon Sep 17 00:00:00 2001 From: "brian@brian-akers-computer.local" <> Date: Wed, 8 Sep 2004 18:26:19 -0700 Subject: Updating the headers on a few files to include GPL header. --- BitKeeper/etc/logging_ok | 1 + sql/repl_failsafe.cc | 2 -- sql/repl_failsafe.h | 16 ++++++++++++++++ sql/slave.h | 16 ++++++++++++++++ sql/sql_repl.cc | 2 -- sql/sql_repl.h | 16 ++++++++++++++++ 6 files changed, 49 insertions(+), 4 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 698f7655b6e..ca4a56eb210 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -20,6 +20,7 @@ bar@mysql.com bell@laptop.sanja.is.com.ua bell@sanja.is.com.ua bk@admin.bk +brian@brian-akers-computer.local carsten@tsort.bitbybit.dk davida@isil.mysql.com dlenev@brandersnatch.localdomain diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 604938a8ed0..9fa6ea843f1 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -14,8 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Sasha Pachev is currently in charge of this file - #include "mysql_priv.h" #include "repl_failsafe.h" #include "sql_repl.h" diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h index ae8bb2bc4d5..eb0e97c2820 100644 --- a/sql/repl_failsafe.h +++ b/sql/repl_failsafe.h @@ -1,3 +1,19 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef REPL_FAILSAFE_H #define REPL_FAILSAFE_H diff --git a/sql/slave.h b/sql/slave.h index 0cd8545338d..eb54e258a96 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -1,3 +1,19 @@ +/* Copyright (C) 2000-2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef SLAVE_H #define SLAVE_H diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index cff36eaa388..514fed226d2 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -14,8 +14,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Sasha Pachev is currently in charge of this file - #include "mysql_priv.h" #include "sql_repl.h" #include "sql_acl.h" diff --git a/sql/sql_repl.h b/sql/sql_repl.h index 570c41c98f7..5eac754c25c 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -1,3 +1,19 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include "slave.h" typedef struct st_slave_info -- cgit v1.2.1 From cda336b9289be4368998986eaed2c7439e59a82e Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Thu, 9 Sep 2004 12:23:10 +0500 Subject: Bug #5447 Select does not find records Note, there is no need to propagate this change into 4.1. --- mysql-test/r/ctype_latin1_de.result | 15 +++++++++++++++ mysql-test/t/ctype_latin1_de.test | 14 ++++++++++++++ strings/ctype-latin1_de.c | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index 28394d9533a..c4bf6b5a3a9 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -267,3 +267,18 @@ select * from t1 where word like CAST(0xDF as CHAR); word word2 ß ß drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +autor varchar(80) NOT NULL default '', +PRIMARY KEY (autor) +); +INSERT INTO t1 VALUES ('Powell, B.'),('Powell, Bud.'),('Powell, L. H.'),('Power, H.'), +('Poynter, M. A. L. Lane'),('Poynting, J. H. und J. J. Thomson.'),('Pozzi, S(amuel-Jean).'), +('Pozzi, Samuel-Jean.'),('Pozzo, A.'),('Pozzoli, Serge.'); +SELECT * FROM t1 WHERE autor LIKE 'Poz%' ORDER BY autor; +autor +Pozzi, S(amuel-Jean). +Pozzi, Samuel-Jean. +Pozzo, A. +Pozzoli, Serge. +DROP TABLE t1; diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test index 3a0f2658969..d6c12683d94 100644 --- a/mysql-test/t/ctype_latin1_de.test +++ b/mysql-test/t/ctype_latin1_de.test @@ -72,3 +72,17 @@ select * from t1 where word like 'AE'; select * from t1 where word like 0xDF; select * from t1 where word like CAST(0xDF as CHAR); drop table t1; + +# +# Bug #5447 Select does not find records +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( + autor varchar(80) NOT NULL default '', + PRIMARY KEY (autor) +); +INSERT INTO t1 VALUES ('Powell, B.'),('Powell, Bud.'),('Powell, L. H.'),('Power, H.'), +('Poynter, M. A. L. Lane'),('Poynting, J. H. und J. J. Thomson.'),('Pozzi, S(amuel-Jean).'), +('Pozzi, Samuel-Jean.'),('Pozzo, A.'),('Pozzoli, Serge.'); +SELECT * FROM t1 WHERE autor LIKE 'Poz%' ORDER BY autor; +DROP TABLE t1; diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 5b7a68fb967..bc4327e921d 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -248,7 +248,7 @@ int my_strxfrm_latin1_de(uchar * dest, const uchar * src, int len) */ #define min_sort_char ((char) 0) -#define max_sort_char ((char) 255) +#define max_sort_char ((char) 0xF7) #define wild_one '_' #define wild_many '%' -- cgit v1.2.1