summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-11-03 19:17:05 +0100
committerSergei Golubchik <sergii@pisem.net>2011-11-03 19:17:05 +0100
commit0e007344eae972b9be7d88ca43373cb33662ac1c (patch)
tree7b3561cb3ea2ad24d013e847680ec165f406387e /libmysqld
parent3794110f0215f0631107c2694dc0f1675a4bb520 (diff)
parent681476255147dacac7e3674b6cd2ae770fee2208 (diff)
downloadmariadb-git-0e007344eae972b9be7d88ca43373cb33662ac1c.tar.gz
mysql-5.5.18 merge
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/emb_qcache.cc4
-rw-r--r--libmysqld/emb_qcache.h4
-rw-r--r--libmysqld/embedded_priv.h4
-rw-r--r--libmysqld/examples/CMakeLists.txt4
-rw-r--r--libmysqld/examples/builder-sample/emb_sample.bpr16
-rw-r--r--libmysqld/examples/builder-sample/emb_sample.cpp16
-rw-r--r--libmysqld/examples/builder-sample/emb_samples.cpp16
-rw-r--r--libmysqld/examples/builder-sample/emb_samples.h16
-rw-r--r--libmysqld/lib_sql.cc15
-rw-r--r--libmysqld/libmysqld.c4
10 files changed, 80 insertions, 19 deletions
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>