[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 4b58a6717e 250/427: Don't use temporary tables in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 4b58a6717e 250/427: Don't use temporary tables in foreign key test. |
Date: |
Tue, 13 Dec 2022 02:59:49 -0500 (EST) |
branch: elpa/emacsql
commit 4b58a6717e976d44550738474176dcc153dc1748
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Don't use temporary tables in foreign key test.
MySQL can't use foreign keys in temporary tables.
---
tests/emacsql-external-tests.el | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/tests/emacsql-external-tests.el b/tests/emacsql-external-tests.el
index d642ad4f2e..1438a219bc 100644
--- a/tests/emacsql-external-tests.el
+++ b/tests/emacsql-external-tests.el
@@ -41,23 +41,28 @@
(let ((emacsql-global-timeout emacsql-tests-timeout))
(dolist (factory emacsql-tests-connection-factories)
(emacsql-with-connection (db (funcall (cdr factory)))
- (emacsql-thread db
- [:create-temporary-table person ([(id integer :primary-key) name])]
- [:create-temporary-table likes
- ([(personid integer) color]
- (:foreign-key [personid] :references person [id]
- :on-delete :cascade))]
- [:insert :into person :values ([0 "Chris"] [1 "Brian"])])
- (should (equal (emacsql db [:select * :from person :order-by id])
- '((0 "Chris") (1 "Brian"))))
- (emacsql db [:insert :into likes
- :values ([0 red] [0 yellow] [1 yellow])])
- (should (equal (emacsql db [:select * :from likes
- :order-by [personid color]])
- '((0 red) (0 yellow) (1 yellow))))
- (emacsql db [:delete :from person :where (= id 0)])
- (should (equal (emacsql db [:select * :from likes])
- '((1 yellow))))))))
+ (unwind-protect
+ (progn
+ (emacsql-thread db
+ [:create-table person ([(id integer :primary-key) name])]
+ [:create-table likes
+ ([(personid integer) color]
+ (:foreign-key [personid] :references person [id]
+ :on-delete :cascade))]
+ [:insert :into person :values ([0 "Chris"] [1 "Brian"])])
+ (should (equal (emacsql db [:select * :from person :order-by id])
+ '((0 "Chris") (1 "Brian"))))
+ (emacsql db [:insert :into likes
+ :values ([0 red] [0 yellow] [1 yellow])])
+ (should (equal (emacsql db [:select * :from likes
+ :order-by [personid color]])
+ '((0 red) (0 yellow) (1 yellow))))
+ (emacsql db [:delete :from person :where (= id 0)])
+ (should (equal (emacsql db [:select * :from likes])
+ '((1 yellow)))))
+ (emacsql-thread db
+ [:drop-table likes]
+ [:drop-table person]))))))
(ert-deftest emacsql-error ()
"Check that we're getting expected conditions."
- [nongnu] elpa/emacsql ed86b098ce 197/427: Add prefix arg to emacsql-show-last-sql., (continued)
- [nongnu] elpa/emacsql ed86b098ce 197/427: Add prefix arg to emacsql-show-last-sql., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 027c5df94e 209/427: Organize all the keywords in the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1ebbc22411 212/427: Disable undo in process buffers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5bef799b6b 220/427: Make some tweaks to accommodate Windows., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 0cb9e47d24 227/427: Test all available backends., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 730e4d882a 235/427: Fix up the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4b45472ffa 240/427: Don't copy the binary every time., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c89ccf82df 241/427: Make a reconnect generic method., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 159195690d 245/427: Include bin/ in the package., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f98ee5e7cd 246/427: Use no-undo buffers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4b58a6717e 250/427: Don't use temporary tables in foreign key test.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 462d1f1b31 252/427: Fix stupid backslash escape mode in MySQL., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b0f0d3085d 258/427: Get OS tuple from Emacs., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1b5891298a 255/427: Officially add MySQL to unit testing., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 127bb98df2 264/427: Set coding system to utf-8-auto for sqlite., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 933e6f109a 263/427: Clean up for easier cross-compilation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 810243e823 290/427: Remember SQLite fetch preference in customization., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql fb2270509f 279/427: Adjust make clean., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 7e078e2b32 282/427: Change OS-detection in Makefile., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql cfde8bea56 291/427: Update README for new customization variable., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 46850a75d0 268/427: Update the README., ELPA Syncer, 2022/12/13