diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:51:33 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:51:33 +0100 |
commit | feba65a55495ce5cd9f5d8e6e0af8345485b52a1 (patch) | |
tree | 092f039bd213fbd1580a89f003cfd5d5690f5a86 /libmysqld | |
parent | c104d31404c68b5622dc676d53308d02349755d1 (diff) | |
parent | b81d8b2e5ab7baa9623d0af002083057cda28a97 (diff) | |
download | mariadb-git-feba65a55495ce5cd9f5d8e6e0af8345485b52a1.tar.gz |
merged
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 3 | ||||
-rw-r--r-- | libmysqld/emb_qcache.cc | 4 | ||||
-rw-r--r-- | libmysqld/emb_qcache.h | 4 | ||||
-rw-r--r-- | libmysqld/embedded_priv.h | 4 | ||||
-rw-r--r-- | libmysqld/examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | libmysqld/examples/builder-sample/emb_sample.bpr | 16 | ||||
-rw-r--r-- | libmysqld/examples/builder-sample/emb_sample.cpp | 16 | ||||
-rw-r--r-- | libmysqld/examples/builder-sample/emb_samples.cpp | 16 | ||||
-rw-r--r-- | libmysqld/examples/builder-sample/emb_samples.h | 16 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 15 | ||||
-rw-r--r-- | libmysqld/libmysqld.c | 4 |
11 files changed, 81 insertions, 21 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 9bafd7bad49..483e0ca05fd 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -83,11 +83,10 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc ../sql/sql_alter.cc ../sql/sql_partition_admin.cc ../sql/event_parse_data.cc ../sql/sql_signal.cc ../sql/rpl_handler.cc - ../sql/rpl_utility.cc ../sql/sys_vars.cc ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc ../sql/mdl.cc ../sql/transaction.cc - ../sql-common/client_plugin.c ../sql/sql_join_cache.cc + ../sql/sql_join_cache.cc ../sql/multi_range_read.cc ../sql/opt_index_cond_pushdown.cc ../sql/opt_subselect.cc diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc index 245dcb7f538..d263e5d5fe8 100644 --- a/libmysqld/emb_qcache.cc +++ b/libmysqld/emb_qcache.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 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 @@ -11,7 +11,7 @@ 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 */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "sql_priv.h" #include "my_global.h" // HAVE_* diff --git a/libmysqld/emb_qcache.h b/libmysqld/emb_qcache.h index 71e5cdd6dac..8fd166df88d 100644 --- a/libmysqld/emb_qcache.h +++ b/libmysqld/emb_qcache.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2005 MySQL AB +/* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 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 @@ -11,7 +11,7 @@ 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 */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "sql_cache.h" /* Query_cache_block */ diff --git a/libmysqld/embedded_priv.h b/libmysqld/embedded_priv.h index c246693594b..c096954a460 100644 --- a/libmysqld/embedded_priv.h +++ b/libmysqld/embedded_priv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2004, 2006 MySQL AB +/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 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 @@ -11,7 +11,7 @@ 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 */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Prototypes for the embedded version of MySQL */ diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index a9495922f77..8d76698117a 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -23,9 +23,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -UMYSQL_CLIENT) -# We never use "mysql_embedded", is more of a linktest, so we don't -# use MYSQL_ADD_EXECUTABLE as that would install it and package it -ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc +MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc ../../client/mysql.cc ../../client/readline.cc) TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver) IF(UNIX) diff --git a/libmysqld/examples/builder-sample/emb_sample.bpr b/libmysqld/examples/builder-sample/emb_sample.bpr index 07b39a6832b..100e5b98dfd 100644 --- a/libmysqld/examples/builder-sample/emb_sample.bpr +++ b/libmysqld/examples/builder-sample/emb_sample.bpr @@ -1,3 +1,19 @@ +# Copyright (c) 2002 MySQL AB +# Use is subject to license terms. +# +# 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; version 2 of the License. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # --------------------------------------------------------------------------- !if !$d(BCB) BCB = $(MAKEDIR)\.. diff --git a/libmysqld/examples/builder-sample/emb_sample.cpp b/libmysqld/examples/builder-sample/emb_sample.cpp index 5ad3bd69319..0c8f4fa0598 100644 --- a/libmysqld/examples/builder-sample/emb_sample.cpp +++ b/libmysqld/examples/builder-sample/emb_sample.cpp @@ -1,3 +1,19 @@ +// Copyright (c) 2002 MySQL AB +// Use is subject to license terms. +// +// 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; version 2 of the License. +// +// 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop diff --git a/libmysqld/examples/builder-sample/emb_samples.cpp b/libmysqld/examples/builder-sample/emb_samples.cpp index be3f1931af5..aab1385f6e6 100644 --- a/libmysqld/examples/builder-sample/emb_samples.cpp +++ b/libmysqld/examples/builder-sample/emb_samples.cpp @@ -1,3 +1,19 @@ +// Copyright (c) 2002, 2004, 2007 MySQL AB +// Use is subject to license terms. +// +// 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; version 2 of the License. +// +// 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop diff --git a/libmysqld/examples/builder-sample/emb_samples.h b/libmysqld/examples/builder-sample/emb_samples.h index 0562bc783cd..3024e75d533 100644 --- a/libmysqld/examples/builder-sample/emb_samples.h +++ b/libmysqld/examples/builder-sample/emb_samples.h @@ -1,3 +1,19 @@ +// Copyright (c) 2002 MySQL AB +// Use is subject to license terms. +// +// 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; version 2 of the License. +// +// 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + //--------------------------------------------------------------------------- #ifndef emb_samplesH #define emb_samplesH diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index f35e3cc9552..1ba54350883 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -1149,8 +1149,7 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, const char *sqlstate) { uint error; - uchar converted_err[MYSQL_ERRMSG_SIZE]; - uint32 converted_err_len; + char converted_err[MYSQL_ERRMSG_SIZE]; MYSQL_DATA *data= thd->cur_data; struct embedded_query_result *ei; @@ -1165,12 +1164,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, ei= data->embedded_info; ei->last_errno= sql_errno; - converted_err_len= convert_error_message((char*)converted_err, - sizeof(converted_err), - thd->variables.character_set_results, - err, strlen(err), - system_charset_info, &error); - strmake(ei->info, (const char*) converted_err, sizeof(ei->info)-1); + convert_error_message(converted_err, sizeof(converted_err), + thd->variables.character_set_results, + err, strlen(err), + system_charset_info, &error); + /* Converted error message is always null-terminated. */ + strmake(ei->info, converted_err, sizeof(ei->info)-1); strmov(ei->sqlstate, sqlstate); ei->server_status= thd->server_status; thd->cur_data= 0; diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index e875ff76201..36728cf573c 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 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 @@ -11,7 +11,7 @@ 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 */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <my_global.h> #include <mysql.h> |