mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fix compilation failure when compiling with BUILD/compile-pentium-debug-max
(Problem with embedded server and ndb) Fix broken mysql-test-run.sh Removed memory leak in ha_example.cc
This commit is contained in:
@@ -136,14 +136,17 @@ else
|
|||||||
then \
|
then \
|
||||||
$(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \
|
$(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \
|
||||||
else \
|
else \
|
||||||
|
current_dir=`pwd`; \
|
||||||
rm -rf tmp; mkdir tmp; \
|
rm -rf tmp; mkdir tmp; \
|
||||||
(for arc in ./libmysqld_int.a $(INC_LIB); do \
|
(for arc in ./libmysqld_int.a $(INC_LIB); do \
|
||||||
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
||||||
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
||||||
for F in `$(AR) t $$arc`; do \
|
for F in `$(AR) t $$arc`; do \
|
||||||
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
||||||
mkdir $$artmp; cd $$artmp; $(AR) x ../../$$arc; \
|
mkdir $$artmp; cd $$artmp > /dev/null; \
|
||||||
cd ../..; ls $$artmp/*; \
|
$(AR) x ../../$$arc; \
|
||||||
|
cd $$current_dir > /dev/null; \
|
||||||
|
ls $$artmp/*; \
|
||||||
continue 2; fi; done; \
|
continue 2; fi; done; \
|
||||||
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
|
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
|
||||||
$(RANLIB) libmysqld.a ; \
|
$(RANLIB) libmysqld.a ; \
|
||||||
|
@@ -532,10 +532,10 @@ sub command_line_setup () {
|
|||||||
|
|
||||||
my $opt_master_myport= 9306;
|
my $opt_master_myport= 9306;
|
||||||
my $opt_slave_myport= 9308;
|
my $opt_slave_myport= 9308;
|
||||||
$opt_ndbcluster_port= 9350;
|
$opt_ndbcluster_port= 9310;
|
||||||
$opt_ndbcluster_port_slave= 9358;
|
$opt_ndbcluster_port_slave= 9311;
|
||||||
my $im_port= 9310;
|
my $im_port= 9312;
|
||||||
my $im_mysqld1_port= 9312;
|
my $im_mysqld1_port= 9313;
|
||||||
my $im_mysqld2_port= 9314;
|
my $im_mysqld2_port= 9314;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -7,17 +7,11 @@
|
|||||||
# List of failed cases (--force) backported from 4.1 by Joerg
|
# List of failed cases (--force) backported from 4.1 by Joerg
|
||||||
# :-)
|
# :-)
|
||||||
|
|
||||||
|
#echo "##################################################";
|
||||||
echo "##################################################";
|
#echo "This script is deprecated and will soon be removed";
|
||||||
echo "This script is deprecated and will soon be removed";
|
#echo "Use mysql-test-run.pl instead";
|
||||||
echo "Use mysql-test-run.pl instead";
|
#echo "##################################################";
|
||||||
echo "Now sleeping 20 seconds...";
|
#echo
|
||||||
echo "##################################################";
|
|
||||||
sleep 20;
|
|
||||||
echo "continuing";
|
|
||||||
echo;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#++
|
#++
|
||||||
# Access Definitions
|
# Access Definitions
|
||||||
@@ -250,6 +244,7 @@ MASTER_MYPORT=9306
|
|||||||
SLAVE_RUNNING=0
|
SLAVE_RUNNING=0
|
||||||
SLAVE_MYHOST=127.0.0.1
|
SLAVE_MYHOST=127.0.0.1
|
||||||
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
||||||
|
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
|
||||||
NDBCLUSTER_PORT=9350
|
NDBCLUSTER_PORT=9350
|
||||||
NDBCLUSTER_PORT_SLAVE=9358
|
NDBCLUSTER_PORT_SLAVE=9358
|
||||||
|
|
||||||
@@ -1196,6 +1191,7 @@ abort_if_failed()
|
|||||||
|
|
||||||
launch_in_background()
|
launch_in_background()
|
||||||
{
|
{
|
||||||
|
shift
|
||||||
echo $@ | /bin/sh >> $CUR_MYERR 2>&1 &
|
echo $@ | /bin/sh >> $CUR_MYERR 2>&1 &
|
||||||
sleep 2 #hack
|
sleep 2 #hack
|
||||||
return
|
return
|
||||||
|
@@ -74,6 +74,8 @@
|
|||||||
|
|
||||||
static handler* example_create_handler(TABLE_SHARE *table);
|
static handler* example_create_handler(TABLE_SHARE *table);
|
||||||
static int example_init_func();
|
static int example_init_func();
|
||||||
|
static bool example_init_func_for_handlerton();
|
||||||
|
static int example_panic(enum ha_panic_function flag);
|
||||||
|
|
||||||
handlerton example_hton= {
|
handlerton example_hton= {
|
||||||
MYSQL_HANDLERTON_INTERFACE_VERSION,
|
MYSQL_HANDLERTON_INTERFACE_VERSION,
|
||||||
@@ -81,7 +83,7 @@ handlerton example_hton= {
|
|||||||
SHOW_OPTION_YES,
|
SHOW_OPTION_YES,
|
||||||
"Example storage engine",
|
"Example storage engine",
|
||||||
DB_TYPE_EXAMPLE_DB,
|
DB_TYPE_EXAMPLE_DB,
|
||||||
(bool (*)()) example_init_func,
|
example_init_func_for_handlerton,
|
||||||
0, /* slot */
|
0, /* slot */
|
||||||
0, /* savepoint size. */
|
0, /* savepoint size. */
|
||||||
NULL, /* close_connection */
|
NULL, /* close_connection */
|
||||||
@@ -99,7 +101,7 @@ handlerton example_hton= {
|
|||||||
NULL, /* close_cursor_read_view */
|
NULL, /* close_cursor_read_view */
|
||||||
example_create_handler, /* Create a new handler */
|
example_create_handler, /* Create a new handler */
|
||||||
NULL, /* Drop a database */
|
NULL, /* Drop a database */
|
||||||
NULL, /* Panic call */
|
example_panic, /* Panic call */
|
||||||
NULL, /* Start Consistent Snapshot */
|
NULL, /* Start Consistent Snapshot */
|
||||||
NULL, /* Flush logs */
|
NULL, /* Flush logs */
|
||||||
NULL, /* Show status */
|
NULL, /* Show status */
|
||||||
@@ -107,7 +109,10 @@ handlerton example_hton= {
|
|||||||
NULL, /* Alter table flags */
|
NULL, /* Alter table flags */
|
||||||
NULL, /* Alter tablespace */
|
NULL, /* Alter tablespace */
|
||||||
NULL, /* Fill Files table */
|
NULL, /* Fill Files table */
|
||||||
HTON_CAN_RECREATE
|
HTON_CAN_RECREATE,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Variables for example share methods */
|
/* Variables for example share methods */
|
||||||
@@ -126,32 +131,43 @@ static byte* example_get_key(EXAMPLE_SHARE *share,uint *length,
|
|||||||
return (byte*) share->table_name;
|
return (byte*) share->table_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int example_init_func()
|
static int example_init_func()
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("example_init_func");
|
||||||
if (!example_init)
|
if (!example_init)
|
||||||
{
|
{
|
||||||
example_init++;
|
example_init= 1;
|
||||||
VOID(pthread_mutex_init(&example_mutex,MY_MUTEX_INIT_FAST));
|
VOID(pthread_mutex_init(&example_mutex,MY_MUTEX_INIT_FAST));
|
||||||
(void) hash_init(&example_open_tables,system_charset_info,32,0,0,
|
(void) hash_init(&example_open_tables,system_charset_info,32,0,0,
|
||||||
(hash_get_key) example_get_key,0,0);
|
(hash_get_key) example_get_key,0,0);
|
||||||
}
|
}
|
||||||
return 0;
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int example_done_func()
|
static int example_done_func()
|
||||||
{
|
{
|
||||||
|
int error= 0;
|
||||||
|
DBUG_ENTER("example_done_func");
|
||||||
|
|
||||||
if (example_init)
|
if (example_init)
|
||||||
{
|
{
|
||||||
|
example_init= 0;
|
||||||
if (example_open_tables.records)
|
if (example_open_tables.records)
|
||||||
{
|
error= 1;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
hash_free(&example_open_tables);
|
hash_free(&example_open_tables);
|
||||||
pthread_mutex_destroy(&example_mutex);
|
pthread_mutex_destroy(&example_mutex);
|
||||||
example_init--;
|
|
||||||
}
|
}
|
||||||
return 0;
|
DBUG_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool example_init_func_for_handlerton()
|
||||||
|
{
|
||||||
|
return example_init_func();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int example_panic(enum ha_panic_function flag)
|
||||||
|
{
|
||||||
|
return example_done_func();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user