mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 17:25:31 +02:00
5.5 merge
This commit is contained in:
commit
97e640b9ae
1704 changed files with 7800 additions and 3313 deletions
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#include <mysql.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test with uses processes to insert, select and drop tables.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
# This is a test with uses two processes to a database.
|
||||
# The other inserts records in two tables, the other does a lot of joins
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
# This is a test with uses 5 processes to insert, update and select from
|
||||
# two tables.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test with uses many processes to test a MySQL server.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test with uses many processes to test a MySQL server.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test for a key cache bug (bug #10167)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test of insert and repair/check.
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#ifdef __WIN__
|
||||
#include <windows.h>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
# This is a test with uses two processes to a database.
|
||||
# The other inserts records in two tables, the other does a lot of joins
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#include <my_global.h>
|
||||
#include <my_sys.h>
|
||||
|
|
@ -30,8 +30,9 @@
|
|||
and use poll()/select() to wait for them to complete. This way we can get
|
||||
a good coverage testing of the non-blocking API as well.
|
||||
*/
|
||||
#include <my_context.h>
|
||||
static my_bool non_blocking_api_enabled= 0;
|
||||
#if !defined(EMBEDDED_LIBRARY)
|
||||
#if !defined(EMBEDDED_LIBRARY) && !defined(MY_CONTEXT_DISABLE)
|
||||
#define WRAP_NONBLOCK_ENABLED non_blocking_api_enabled
|
||||
#include "nonblock-wrappers.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,7 +12,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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
/***************************************************************************
|
||||
This is a test sample to test the new features in MySQL client-server
|
||||
|
|
@ -18775,6 +18775,76 @@ static void test_bug11754979()
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
static void test_ps_sp_out_params()
|
||||
{
|
||||
MYSQL *my;
|
||||
MYSQL_STMT *stmt;
|
||||
MYSQL_BIND bind[1];
|
||||
char buffer[20];
|
||||
int status, rc;
|
||||
|
||||
myheader("test_ps_sp_out_params");
|
||||
my= mysql_client_init(NULL);
|
||||
|
||||
if (!mysql_real_connect(my, opt_host, opt_user,
|
||||
opt_password, current_db, opt_port,
|
||||
opt_unix_socket, CLIENT_MULTI_RESULTS))
|
||||
DIE("mysql_real_connect failed");
|
||||
|
||||
rc= mysql_query(my, "DROP PROCEDURE IF EXISTS p1");
|
||||
myquery(rc);
|
||||
|
||||
rc= mysql_query(my,
|
||||
"CREATE PROCEDURE p1(OUT out_param VARCHAR(19)) "
|
||||
"BEGIN"
|
||||
" SELECT 'foo' FROM DUAL;"
|
||||
" SET out_param='foo';"
|
||||
" SELECT 'foo' FROM DUAL;"
|
||||
"END");
|
||||
myquery(rc);
|
||||
|
||||
stmt= mysql_stmt_init(my);
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, "CALL P1(?)", 10);
|
||||
DIE_UNLESS(rc==0);
|
||||
|
||||
DIE_UNLESS(mysql_stmt_param_count(stmt) == 1);
|
||||
|
||||
memset(bind, 0, sizeof(MYSQL_BIND));
|
||||
bind[0].buffer= buffer;
|
||||
bind[0].buffer_length= sizeof(buffer);
|
||||
bind[0].buffer_type= MYSQL_TYPE_STRING;
|
||||
|
||||
mysql_stmt_bind_param(stmt, bind);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_execute(stmt, rc);
|
||||
|
||||
do {
|
||||
if (mysql_stmt_field_count(stmt))
|
||||
{
|
||||
/* since server sends a status packet at the end,
|
||||
there must follow at least one additional packet */
|
||||
DIE_UNLESS(mysql_more_results(stmt->mysql));
|
||||
|
||||
mysql_stmt_bind_result(stmt, bind);
|
||||
|
||||
rc= mysql_stmt_fetch(stmt);
|
||||
DIE_UNLESS(rc== 0);
|
||||
|
||||
DIE_UNLESS(strcmp(buffer, "foo") == 0);
|
||||
}
|
||||
status= mysql_stmt_next_result(stmt);
|
||||
} while (status == 0);
|
||||
|
||||
rc= mysql_stmt_reset(stmt);
|
||||
DIE_UNLESS(rc== 0);
|
||||
|
||||
mysql_stmt_close(stmt);
|
||||
mysql_close(my);
|
||||
|
||||
printf("end\n");
|
||||
}
|
||||
|
||||
/*
|
||||
Bug#13001491: MYSQL_REFRESH CRASHES WHEN STORED ROUTINES ARE RUN CONCURRENTLY.
|
||||
|
|
@ -19224,6 +19294,7 @@ static struct my_tests_st my_tests[]= {
|
|||
{ "test_bug11754979", test_bug11754979 },
|
||||
{ "test_bug13001491", test_bug13001491 },
|
||||
{ "test_mdev4326", test_mdev4326 },
|
||||
{ "test_ps_sp_out_params", test_ps_sp_out_params },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# Prints mails to standard output
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test with uses processes to insert, select and drop tables.
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <windows.h>
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
|
||||
#ifdef __WIN__
|
||||
|
|
|
|||
|
|
@ -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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
|
||||
#ifdef __WIN__
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
use DBI;
|
||||
use Benchmark;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
# This is a test for INSERT DELAYED
|
||||
#
|
||||
|
|
|
|||
|
|
@ -13,7 +13,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 Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#
|
||||
# This is a test with uses many processes to test a MySQL server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue