summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2020-01-24 00:44:48 +0400
committerMonty <monty@mariadb.org>2020-03-24 20:47:41 +0200
commitda82e75901644b0f9ea25b526e13b4db1c9c8e63 (patch)
treee5a03f17f61b65de06b21f6e1de3b9f7851f9195 /sql/ha_partition.cc
parentbff79492c5f6c9669b9dc9bf2cf0483b3b001da7 (diff)
downloadmariadb-git-da82e75901644b0f9ea25b526e13b4db1c9c8e63.tar.gz
handler::rebind()
- rename PFS specific rebind_psi() to generic rebind() - call rebind independently of PFS compilation status - allow rebind() return an error
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 2e5355580c7..b52c193ba13 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -3715,18 +3715,25 @@ void ha_partition::unbind_psi()
DBUG_VOID_RETURN;
}
-void ha_partition::rebind_psi()
+int ha_partition::rebind()
{
uint i;
- DBUG_ENTER("ha_partition::rebind_psi");
- handler::rebind_psi();
+ DBUG_ENTER("ha_partition::rebind");
+ if (int error= handler::rebind())
+ DBUG_RETURN(error);
for (i= 0; i < m_tot_parts; i++)
{
DBUG_ASSERT(m_file[i] != NULL);
- m_file[i]->rebind_psi();
+ if (int error= m_file[i]->rebind())
+ {
+ while (i)
+ m_file[--i]->unbind_psi();
+ handler::unbind_psi();
+ DBUG_RETURN(error);
+ }
}
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
#endif /* HAVE_M_PSI_PER_PARTITION */