maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #10099
Re: Working on spider patches, MDEV-7698
Hi!
Now working on MDEV-7700 Spiral patch 002_mariadb-10.0.15.spider.diff
+++ ./002_mariadb-10.1.8-spider/sql/ha_partition.cc 2015-10-14
01:48:53.392665313 +0900
@@ -327,7 +327,9 @@ void ha_partition::init_handler_variable
m_file_buffer= NULL;
m_name_buffer_ptr= NULL;
m_engine_array= NULL;
+/*
m_connect_string= NULL;
+*/
m_file= NULL;
m_file_tot_parts= 0;
m_reorged_file= NULL;
@@ -1516,4 +1518,6 @@ int ha_partition::prepare_new_partition(
if ((error= set_up_table_before_create(tbl, part_name, create_info, p_elem)))
goto error_create;
+/*
tbl->s->connect_string = p_elem->connect_string;
+*/
I don't think this it will work removing the usage of p_elem->connect_string
This is because each partition may have a different connect string.
Here is an example from fedarated_partion.test:
eval create table t1 (s1 int primary key) engine=federated
partition by list (s1)
(partition p1 values in (1,3)
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_1',
partition p2 values in (2,4)
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2');
The above works in mariadb 10.2 but not in your spider tree.
>From this patch I will, for now, only take the code related to
HA_EXTRA_WRITE_CAN_REPLACE
HA_EXTRA_WRITE_CANNOT_REPLACE
--- ./001_mariadb-10.1.8-partition_cond_push/sql/sql_plugin.cc
2015-10-13 23:49:10.188129839 +0900
+++ ./002_mariadb-10.1.8-spider/sql/sql_plugin.cc 2015-10-14
01:48:54.296665317 +0900
@@ -2757,6 +2757,7 @@ static void update_func_str(THD *thd, st
*(char**) tgt= my_strdup(value, MYF(0));
else
*(char**) tgt= 0;
- my_free(old);
+ if (old)
+ my_free(old);
As my_free is safe to call with NULL, the above is not needed
diff -Narup ./001_mariadb-10.1.8-partition_cond_push/sql/sql_priv.h
./002_mariadb-10.1.8-spider/sql/sql_priv.h
--- ./001_mariadb-10.1.8-partition_cond_push/sql/sql_priv.h
2015-10-13 23:49:10.189129839 +0900
+++ ./002_mariadb-10.1.8-spider/sql/sql_priv.h 2015-10-14
01:48:54.642665315 +0900
@@ -27,6 +27,8 @@
#ifndef SQL_PRIV_INCLUDED
#define SQL_PRIV_INCLUDED
+#define PLUGIN_VAR_CAN_MEMALLOC
+
#ifndef MYSQL_CLIENT
The above is not needed, as all code that is testing this is doing:
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
Which is always true in MariaDB 10.x
Regards,
Monty
Follow ups