Commit 9ad5c2de authored by monty@mysql.com's avatar monty@mysql.com

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
parent adb59d92
......@@ -136,14 +136,17 @@ else
then \
$(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \
else \
current_dir=`pwd`; \
rm -rf tmp; mkdir tmp; \
(for arc in ./libmysqld_int.a $(INC_LIB); do \
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
for F in `$(AR) t $$arc`; do \
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
mkdir $$artmp; cd $$artmp; $(AR) x ../../$$arc; \
cd ../..; ls $$artmp/*; \
mkdir $$artmp; cd $$artmp > /dev/null; \
$(AR) x ../../$$arc; \
cd $$current_dir > /dev/null; \
ls $$artmp/*; \
continue 2; fi; done; \
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \
$(RANLIB) libmysqld.a ; \
......
......@@ -532,10 +532,10 @@ sub command_line_setup () {
my $opt_master_myport= 9306;
my $opt_slave_myport= 9308;
$opt_ndbcluster_port= 9350;
$opt_ndbcluster_port_slave= 9358;
my $im_port= 9310;
my $im_mysqld1_port= 9312;
$opt_ndbcluster_port= 9310;
$opt_ndbcluster_port_slave= 9311;
my $im_port= 9312;
my $im_mysqld1_port= 9313;
my $im_mysqld2_port= 9314;
#
......
......@@ -7,17 +7,11 @@
# List of failed cases (--force) backported from 4.1 by Joerg
# :-)
echo "##################################################";
echo "This script is deprecated and will soon be removed";
echo "Use mysql-test-run.pl instead";
echo "Now sleeping 20 seconds...";
echo "##################################################";
sleep 20;
echo "continuing";
echo;
#echo "##################################################";
#echo "This script is deprecated and will soon be removed";
#echo "Use mysql-test-run.pl instead";
#echo "##################################################";
#echo
#++
# Access Definitions
......@@ -250,6 +244,7 @@ MASTER_MYPORT=9306
SLAVE_RUNNING=0
SLAVE_MYHOST=127.0.0.1
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_SLAVE=9358
......@@ -1196,6 +1191,7 @@ abort_if_failed()
launch_in_background()
{
shift
echo $@ | /bin/sh >> $CUR_MYERR 2>&1 &
sleep 2 #hack
return
......
......@@ -74,6 +74,8 @@
static handler* example_create_handler(TABLE_SHARE *table);
static int example_init_func();
static bool example_init_func_for_handlerton();
static int example_panic(enum ha_panic_function flag);
handlerton example_hton= {
MYSQL_HANDLERTON_INTERFACE_VERSION,
......@@ -81,7 +83,7 @@ handlerton example_hton= {
SHOW_OPTION_YES,
"Example storage engine",
DB_TYPE_EXAMPLE_DB,
(bool (*)()) example_init_func,
example_init_func_for_handlerton,
0, /* slot */
0, /* savepoint size. */
NULL, /* close_connection */
......@@ -99,7 +101,7 @@ handlerton example_hton= {
NULL, /* close_cursor_read_view */
example_create_handler, /* Create a new handler */
NULL, /* Drop a database */
NULL, /* Panic call */
example_panic, /* Panic call */
NULL, /* Start Consistent Snapshot */
NULL, /* Flush logs */
NULL, /* Show status */
......@@ -107,7 +109,10 @@ handlerton example_hton= {
NULL, /* Alter table flags */
NULL, /* Alter tablespace */
NULL, /* Fill Files table */
HTON_CAN_RECREATE
HTON_CAN_RECREATE,
NULL,
NULL,
NULL,
};
/* Variables for example share methods */
......@@ -126,32 +131,43 @@ static byte* example_get_key(EXAMPLE_SHARE *share,uint *length,
return (byte*) share->table_name;
}
static int example_init_func()
{
DBUG_ENTER("example_init_func");
if (!example_init)
{
example_init++;
example_init= 1;
VOID(pthread_mutex_init(&example_mutex,MY_MUTEX_INIT_FAST));
(void) hash_init(&example_open_tables,system_charset_info,32,0,0,
(hash_get_key) example_get_key,0,0);
}
return 0;
DBUG_RETURN(0);
}
static int example_done_func()
{
int error= 0;
DBUG_ENTER("example_done_func");
if (example_init)
{
example_init= 0;
if (example_open_tables.records)
{
return 1;
}
error= 1;
hash_free(&example_open_tables);
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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment