aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-mariadb.el39
1 files changed, 39 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-mariadb.el b/emacs/.emacs.d/lisp/my/my-mariadb.el
index bd9fd76..355b89e 100644
--- a/emacs/.emacs.d/lisp/my/my-mariadb.el
+++ b/emacs/.emacs.d/lisp/my/my-mariadb.el
@@ -115,5 +115,44 @@
(goto-char old-frame)
(gdb-select-frame)))))
+(defun my-mdev-29502-seek-next ()
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)SPIDER_CLEAR_FILE_POS(&\\(.*\\)->mta_conn_mutex_file_pos);
+\\ *pthread_mutex_unlock(&\\2->mta_conn_mutex);" nil t)
+ (replace-match "\\1spider_conn_mutex_unlock(\\2);")))
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)DBUG_ASSERT(!\\(.*\\)->mta_conn_mutex_lock_already);
+\\ *DBUG_ASSERT(!\\2->mta_conn_mutex_unlock_later);
+\\ *\\2->mta_conn_mutex_lock_already = TRUE;
+\\ *\\2->mta_conn_mutex_unlock_later = TRUE;" nil t)
+ (replace-match "\\1spider_conn_mutex_locked(\\2);")))
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)DBUG_ASSERT(\\(.*\\)->mta_conn_mutex_lock_already);
+\\ *DBUG_ASSERT(\\2->mta_conn_mutex_unlock_later);
+\\ *\\2->mta_conn_mutex_lock_already = FALSE;
+\\ *\\2->mta_conn_mutex_unlock_later = FALSE;" nil t)
+ (replace-match "\\1spider_conn_mutex_unlocking(\\2);")))
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)pthread_mutex_lock(&\\(.*\\)->mta_conn_mutex);
+\\ *SPIDER_SET_FILE_POS(&\\2->mta_conn_mutex_file_pos);" nil t)
+ (replace-match "\\1spider_conn_mutex_lock(\\2);")))
+ )
+
+(defun my-mdev-29502-need-lock ()
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)if ([^!].*need_lock_before_set_sql_for_exec(.*" nil t)
+ (beginning-of-line)
+ (kill-sexp 3)
+ (kill-line)))
+ (save-excursion
+ (while (re-search-forward "\\(\\ *\\)if (!.*need_lock_before_set_sql_for_exec(.*" nil t)
+ (beginning-of-line)
+ (kill-sexp 2)
+ (kill-line 2)
+ (c-indent-line-or-region)
+ (beginning-of-line 3)
+ (kill-line 1)
+ )))
+
(provide 'my-mariadb)
;;; my-mariadb.el ends here