diff options
| author | Sergei Golubchik <serg@mariadb.org> | 2015-02-11 23:50:40 +0100 |
|---|---|---|
| committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-11 23:50:40 +0100 |
| commit | 8e80f91fa3e584d6b681bfbb4664e80a255af866 (patch) | |
| tree | af4f13f6f0290ee72b33a0642aa7c03e4e5fcd1c /sql | |
| parent | 63108dc9d2cc9f31ae9927817652be465a17f767 (diff) | |
| parent | 3ee8aa216d55b858ba9e53874359dcac9a82933a (diff) | |
| download | mariadb-git-8e80f91fa3e584d6b681bfbb4664e80a255af866.tar.gz | |
Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | sql/item_func.cc | 8 | ||||
| -rw-r--r-- | sql/sql_db.cc | 6 | ||||
| -rw-r--r-- | sql/sql_select.cc | 4 | ||||
| -rw-r--r-- | sql/table.cc | 8 | ||||
| -rw-r--r-- | sql/udf_example.c | 5 |
6 files changed, 26 insertions, 16 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index dacc731b34e..7172294e4f6 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -1,4 +1,5 @@ -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. +# Copyright (c) 2010, 2015, MariaDB # # 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 @@ -253,14 +254,15 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED) ENDIF() FOREACH(tool glibtoolize libtoolize aclocal autoconf autoheader automake gtar - tar bzr git) + tar git) STRING(TOUPPER ${tool} TOOL) FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable") MARK_AS_ADVANCED(${TOOL}_EXECUTABLE) ENDFOREACH() CONFIGURE_FILE( - ${CMAKE_SOURCE_DIR}/cmake/make_dist.cmake.in ${CMAKE_BINARY_DIR}/make_dist.cmake @ONLY) + ${CMAKE_SOURCE_DIR}/cmake/make_dist.cmake.in + ${CMAKE_BINARY_DIR}/make_dist.cmake @ONLY) ADD_CUSTOM_TARGET(dist COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/make_dist.cmake @@ -270,8 +272,7 @@ ADD_CUSTOM_TARGET(dist ADD_CUSTOM_TARGET(distclean COMMAND ${CMAKE_COMMAND} -E echo WARNING: distclean target is not functional - COMMAND ${CMAKE_COMMAND} -E echo Use 'bzr clean-tree' with --unknown and/or - --ignored parameter instead + COMMAND ${CMAKE_COMMAND} -E echo Use 'git clean -fdx' instead VERBATIM ) diff --git a/sql/item_func.cc b/sql/item_func.cc index 90257406e1e..ed08555133f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, Monty Program Ab. + Copyright (c) 2009, 2015, MariaDB 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 @@ -3659,8 +3659,12 @@ bool udf_handler::get_arguments() { f_args.args[i]= (char*) res->ptr(); f_args.lengths[i]= res->length(); - break; } + else + { + f_args.lengths[i]= 0; + } + break; } case INT_RESULT: *((longlong*) to) = args[i]->val_int(); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 0464128bd97..f72a8918f61 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. + Copyright (c) 2009, 2015, MariaDB 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 @@ -917,7 +917,7 @@ update_binlog: if (!(query= (char*) thd->alloc(MAX_DROP_TABLE_Q_LEN))) goto exit; /* not much else we can do */ - query_pos= query_data_start= strmov(query,"DROP TABLE "); + query_pos= query_data_start= strmov(query,"DROP TABLE IF EXISTS "); query_end= query + MAX_DROP_TABLE_Q_LEN; db_len= strlen(db); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bdb2d1c3346..387fdb35ace 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2013 Oracle and/or its affiliates. - Copyright (c) 2009, 2013 Monty Program Ab. +/* Copyright (c) 2000, 2014 Oracle and/or its affiliates. + Copyright (c) 2009, 2015 MariaDB 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 diff --git a/sql/table.cc b/sql/table.cc index a4cf9939845..cfa0b6c09aa 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2008, 2014, SkySQL Ab. +/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. + Copyright (c) 2008, 2015, MariaDB 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 @@ -2723,7 +2723,9 @@ partititon_err: outparam->no_replicate= outparam->file && test(outparam->file->ha_table_flags() & HA_HAS_OWN_BINLOGGING); - thd->status_var.opened_tables++; + /* Increment the opened_tables counter, only when open flags set. */ + if (db_stat) + thd->status_var.opened_tables++; thd->lex->context_analysis_only= save_context_analysis_only; DBUG_RETURN (0); diff --git a/sql/udf_example.c b/sql/udf_example.c index 36a5eafb704..a48801d1c4a 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2010, Oracle and/or its affiliates. + Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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 @@ -296,9 +296,12 @@ char *metaphon(UDF_INIT *initid __attribute__((unused)), if (!word) /* Null argument */ { + /* The length is expected to be zero when the argument is NULL. */ + assert(args->lengths[0] == 0); *is_null=1; return 0; } + w_end=word+args->lengths[0]; org_result=result; |
