| 1 |
Index: sqlx/Cargo.toml |
| 2 |
=================================================================== |
| 3 |
--- sqlx.orig/Cargo.toml |
| 4 |
+++ sqlx/Cargo.toml |
| 5 |
@@ -35,15 +35,17 @@ rustdoc-args = [ |
| 6 |
"docsrs", |
| 7 |
] |
| 8 |
|
| 9 |
-[[test]] |
| 10 |
-name = "any" |
| 11 |
-path = "tests/any/any.rs" |
| 12 |
-required-features = ["any"] |
| 13 |
+# requires sqlx_test |
| 14 |
+#[[test]] |
| 15 |
+#name = "any" |
| 16 |
+#path = "tests/any/any.rs" |
| 17 |
+#required-features = ["any"] |
| 18 |
|
| 19 |
-[[test]] |
| 20 |
-name = "any-pool" |
| 21 |
-path = "tests/any/pool.rs" |
| 22 |
-required-features = ["any"] |
| 23 |
+# requires sqlx_test |
| 24 |
+#[[test]] |
| 25 |
+#name = "any-pool" |
| 26 |
+#path = "tests/any/pool.rs" |
| 27 |
+#required-features = ["any"] |
| 28 |
|
| 29 |
#[[test]] |
| 30 |
#name = "migrate-macro" |
| 31 |
@@ -53,33 +55,38 @@ required-features = ["any"] |
| 32 |
# "migrate", |
| 33 |
#] |
| 34 |
|
| 35 |
-[[test]] |
| 36 |
-name = "sqlite" |
| 37 |
-path = "tests/sqlite/sqlite.rs" |
| 38 |
-required-features = ["sqlite"] |
| 39 |
+# requires sqlx_test |
| 40 |
+#[[test]] |
| 41 |
+#name = "sqlite" |
| 42 |
+#path = "tests/sqlite/sqlite.rs" |
| 43 |
+#required-features = ["sqlite"] |
| 44 |
|
| 45 |
-[[test]] |
| 46 |
-name = "sqlite-any" |
| 47 |
-path = "tests/sqlite/any.rs" |
| 48 |
-required-features = ["sqlite"] |
| 49 |
+# requires sqlx_test |
| 50 |
+#[[test]] |
| 51 |
+#name = "sqlite-any" |
| 52 |
+#path = "tests/sqlite/any.rs" |
| 53 |
+#required-features = ["sqlite"] |
| 54 |
|
| 55 |
-[[test]] |
| 56 |
-name = "sqlite-types" |
| 57 |
-path = "tests/sqlite/types.rs" |
| 58 |
-required-features = ["sqlite"] |
| 59 |
+# requires sqlx_test |
| 60 |
+#[[test]] |
| 61 |
+#name = "sqlite-types" |
| 62 |
+#path = "tests/sqlite/types.rs" |
| 63 |
+#required-features = ["sqlite"] |
| 64 |
|
| 65 |
-[[test]] |
| 66 |
-name = "sqlite-describe" |
| 67 |
-path = "tests/sqlite/describe.rs" |
| 68 |
-required-features = ["sqlite"] |
| 69 |
+# requires sqlx_test |
| 70 |
+#[[test]] |
| 71 |
+#name = "sqlite-describe" |
| 72 |
+#path = "tests/sqlite/describe.rs" |
| 73 |
+#required-features = ["sqlite"] |
| 74 |
|
| 75 |
-[[test]] |
| 76 |
-name = "sqlite-macros" |
| 77 |
-path = "tests/sqlite/macros.rs" |
| 78 |
-required-features = [ |
| 79 |
- "sqlite", |
| 80 |
- "macros", |
| 81 |
-] |
| 82 |
+# requires sqlx_test |
| 83 |
+#[[test]] |
| 84 |
+#name = "sqlite-macros" |
| 85 |
+#path = "tests/sqlite/macros.rs" |
| 86 |
+#required-features = [ |
| 87 |
+# "sqlite", |
| 88 |
+# "macros", |
| 89 |
+#] |
| 90 |
|
| 91 |
[[test]] |
| 92 |
name = "sqlite-unbundled-macros" |
| 93 |
@@ -89,18 +96,20 @@ required-features = [ |
| 94 |
"macros", |
| 95 |
] |
| 96 |
|
| 97 |
-[[test]] |
| 98 |
-name = "sqlite-derives" |
| 99 |
-path = "tests/sqlite/derives.rs" |
| 100 |
-required-features = [ |
| 101 |
- "sqlite", |
| 102 |
- "macros", |
| 103 |
-] |
| 104 |
+# requires sqlx_test |
| 105 |
+#[[test]] |
| 106 |
+#name = "sqlite-derives" |
| 107 |
+#path = "tests/sqlite/derives.rs" |
| 108 |
+#required-features = [ |
| 109 |
+# "sqlite", |
| 110 |
+# "macros", |
| 111 |
+#] |
| 112 |
|
| 113 |
-[[test]] |
| 114 |
-name = "sqlite-error" |
| 115 |
-path = "tests/sqlite/error.rs" |
| 116 |
-required-features = ["sqlite"] |
| 117 |
+# requires sqlx_test |
| 118 |
+#[[test]] |
| 119 |
+#name = "sqlite-error" |
| 120 |
+#path = "tests/sqlite/error.rs" |
| 121 |
+#required-features = ["sqlite"] |
| 122 |
|
| 123 |
[[test]] |
| 124 |
name = "sqlite-sqlcipher" |
| 125 |
@@ -189,41 +198,47 @@ name = "mysql-rustsec" |
| 126 |
path = "tests/mysql/rustsec.rs" |
| 127 |
required-features = ["mysql"] |
| 128 |
|
| 129 |
-[[test]] |
| 130 |
-name = "postgres" |
| 131 |
-path = "tests/postgres/postgres.rs" |
| 132 |
-required-features = ["postgres"] |
| 133 |
+# requires sqlx_test |
| 134 |
+#[[test]] |
| 135 |
+#name = "postgres" |
| 136 |
+#path = "tests/postgres/postgres.rs" |
| 137 |
+#required-features = ["postgres"] |
| 138 |
|
| 139 |
-[[test]] |
| 140 |
-name = "postgres-types" |
| 141 |
-path = "tests/postgres/types.rs" |
| 142 |
-required-features = ["postgres"] |
| 143 |
+# requires sqlx_test |
| 144 |
+#[[test]] |
| 145 |
+#name = "postgres-types" |
| 146 |
+#path = "tests/postgres/types.rs" |
| 147 |
+#required-features = ["postgres"] |
| 148 |
|
| 149 |
-[[test]] |
| 150 |
-name = "postgres-describe" |
| 151 |
-path = "tests/postgres/describe.rs" |
| 152 |
-required-features = ["postgres"] |
| 153 |
+# requires sqlx_test |
| 154 |
+#[[test]] |
| 155 |
+#name = "postgres-describe" |
| 156 |
+#path = "tests/postgres/describe.rs" |
| 157 |
+#required-features = ["postgres"] |
| 158 |
|
| 159 |
-[[test]] |
| 160 |
-name = "postgres-macros" |
| 161 |
-path = "tests/postgres/macros.rs" |
| 162 |
-required-features = [ |
| 163 |
- "postgres", |
| 164 |
- "macros", |
| 165 |
-] |
| 166 |
+# requires sqlx_test |
| 167 |
+# [[test]] |
| 168 |
+# name = "postgres-macros" |
| 169 |
+# path = "tests/postgres/macros.rs" |
| 170 |
+# required-features = [ |
| 171 |
+# "postgres", |
| 172 |
+# "macros", |
| 173 |
+#] |
| 174 |
|
| 175 |
-[[test]] |
| 176 |
-name = "postgres-derives" |
| 177 |
-path = "tests/postgres/derives.rs" |
| 178 |
-required-features = [ |
| 179 |
- "postgres", |
| 180 |
- "macros", |
| 181 |
-] |
| 182 |
+# requires sqlx_test |
| 183 |
+#[[test]] |
| 184 |
+#name = "postgres-derives" |
| 185 |
+#path = "tests/postgres/derives.rs" |
| 186 |
+#required-features = [ |
| 187 |
+# "postgres", |
| 188 |
+# "macros", |
| 189 |
+#] |
| 190 |
|
| 191 |
-[[test]] |
| 192 |
-name = "postgres-error" |
| 193 |
-path = "tests/postgres/error.rs" |
| 194 |
-required-features = ["postgres"] |
| 195 |
+# requires sqlx_test |
| 196 |
+#[[test]] |
| 197 |
+#name = "postgres-error" |
| 198 |
+#path = "tests/postgres/error.rs" |
| 199 |
+#required-features = ["postgres"] |
| 200 |
|
| 201 |
#[[test]] |
| 202 |
#name = "postgres-test-attr" |
| 203 |
@@ -243,10 +258,11 @@ required-features = ["postgres"] |
| 204 |
# "migrate", |
| 205 |
#] |
| 206 |
|
| 207 |
-[[test]] |
| 208 |
-name = "postgres-query-builder" |
| 209 |
-path = "tests/postgres/query_builder.rs" |
| 210 |
-required-features = ["postgres"] |
| 211 |
+#[[test]] |
| 212 |
+#[[test]] |
| 213 |
+#name = "postgres-query-builder" |
| 214 |
+#path = "tests/postgres/query_builder.rs" |
| 215 |
+#required-features = ["postgres"] |
| 216 |
|
| 217 |
# requires database |
| 218 |
#[[test]] |
| 219 |
@@ -258,11 +274,12 @@ required-features = ["postgres"] |
| 220 |
# "migrate", |
| 221 |
#] |
| 222 |
|
| 223 |
-[[bench]] |
| 224 |
-name = "sqlite-describe" |
| 225 |
-path = "benches/sqlite/describe.rs" |
| 226 |
-harness = false |
| 227 |
-required-features = ["sqlite"] |
| 228 |
+# requires sqlx_test |
| 229 |
+#[[bench]] |
| 230 |
+#name = "sqlite-describe" |
| 231 |
+#path = "benches/sqlite/describe.rs" |
| 232 |
+#harness = false |
| 233 |
+#required-features = ["sqlite"] |
| 234 |
|
| 235 |
[dependencies.sqlx-core] |
| 236 |
version = "=0.8.3" |
| 237 |
Index: sqlx/tests/mysql/error.rs |
| 238 |
=================================================================== |
| 239 |
--- sqlx.orig/tests/mysql/error.rs |
| 240 |
+++ sqlx/tests/mysql/error.rs |
| 241 |
@@ -1,7 +1,7 @@ |
| 242 |
use sqlx::{error::ErrorKind, mysql::MySql, Connection}; |
| 243 |
-use sqlx_test::new; |
| 244 |
+//use sqlx_test::new; |
| 245 |
|
| 246 |
-#[sqlx_macros::test] |
| 247 |
+/*#[sqlx_macros::test] |
| 248 |
async fn it_fails_with_unique_violation() -> anyhow::Result<()> { |
| 249 |
let mut conn = new::<MySql>().await?; |
| 250 |
let mut tx = conn.begin().await?; |
| 251 |
@@ -73,4 +73,4 @@ async fn it_fails_with_check_violation() |
| 252 |
assert_eq!(err.kind(), ErrorKind::CheckViolation); |
| 253 |
|
| 254 |
Ok(()) |
| 255 |
-} |
| 256 |
+}*/ |
| 257 |
Index: sqlx/tests/sqlite/macros.rs |
| 258 |
=================================================================== |
| 259 |
--- sqlx.orig/tests/sqlite/macros.rs |
| 260 |
+++ sqlx/tests/sqlite/macros.rs |
| 261 |
@@ -1,7 +1,7 @@ |
| 262 |
use sqlx::Sqlite; |
| 263 |
-use sqlx_test::new; |
| 264 |
+//use sqlx_test::new; |
| 265 |
|
| 266 |
-#[sqlx_macros::test] |
| 267 |
+/*#[sqlx_macros::test] |
| 268 |
async fn macro_select() -> anyhow::Result<()> { |
| 269 |
let mut conn = new::<Sqlite>().await?; |
| 270 |
|
| 271 |
@@ -14,9 +14,9 @@ async fn macro_select() -> anyhow::Resul |
| 272 |
assert_eq!(account.is_active, Some(true)); |
| 273 |
|
| 274 |
Ok(()) |
| 275 |
-} |
| 276 |
+}*/ |
| 277 |
|
| 278 |
-macro_rules! gen_macro_select_concats { |
| 279 |
+/*macro_rules! gen_macro_select_concats { |
| 280 |
($param:literal) => { |
| 281 |
#[sqlx_macros::test] |
| 282 |
async fn macro_select_concat_single() -> anyhow::Result<()> { |
| 283 |
@@ -86,7 +86,7 @@ async fn macro_select_bind() -> anyhow:: |
| 284 |
assert_eq!(account.is_active, Some(true)); |
| 285 |
|
| 286 |
Ok(()) |
| 287 |
-} |
| 288 |
+}*/ |
| 289 |
|
| 290 |
#[derive(Debug)] |
| 291 |
struct RawAccount { |
| 292 |
@@ -95,7 +95,7 @@ struct RawAccount { |
| 293 |
is_active: Option<bool>, |
| 294 |
} |
| 295 |
|
| 296 |
-#[sqlx_macros::test] |
| 297 |
+/*#[sqlx_macros::test] |
| 298 |
async fn test_query_as_raw() -> anyhow::Result<()> { |
| 299 |
let mut conn = new::<Sqlite>().await?; |
| 300 |
|
| 301 |
@@ -215,7 +215,7 @@ async fn test_column_override_nullable() |
| 302 |
assert_eq!(record.text.as_deref(), Some("#sqlx is pretty cool!")); |
| 303 |
|
| 304 |
Ok(()) |
| 305 |
-} |
| 306 |
+}*/ |
| 307 |
|
| 308 |
#[derive(PartialEq, Eq, Debug, sqlx::Type)] |
| 309 |
#[sqlx(transparent)] |
| 310 |
@@ -229,7 +229,7 @@ struct OptionalRecord { |
| 311 |
id: Option<MyInt>, |
| 312 |
} |
| 313 |
|
| 314 |
-#[sqlx_macros::test] |
| 315 |
+/*#[sqlx_macros::test] |
| 316 |
async fn test_column_override_wildcard() -> anyhow::Result<()> { |
| 317 |
let mut conn = new::<Sqlite>().await?; |
| 318 |
|
| 319 |
@@ -331,6 +331,6 @@ async fn test_column_override_exact_null |
| 320 |
assert_eq!(record.id, Some(MyInt(1))); |
| 321 |
|
| 322 |
Ok(()) |
| 323 |
-} |
| 324 |
+}*/ |
| 325 |
|
| 326 |
// we don't emit bind parameter typechecks for SQLite so testing the overrides is redundant |
| 327 |
Index: sqlx/tests/mysql/mysql.rs |
| 328 |
=================================================================== |
| 329 |
--- sqlx.orig/tests/mysql/mysql.rs |
| 330 |
+++ sqlx/tests/mysql/mysql.rs |
| 331 |
@@ -4,11 +4,11 @@ use sqlx::mysql::{MySql, MySqlConnection |
| 332 |
use sqlx::{Column, Connection, Executor, Row, Statement, TypeInfo}; |
| 333 |
use sqlx_core::connection::ConnectOptions; |
| 334 |
use sqlx_mysql::MySqlConnectOptions; |
| 335 |
-use sqlx_test::{new, setup_if_needed}; |
| 336 |
+//use sqlx_test::{new, setup_if_needed}; |
| 337 |
use std::env; |
| 338 |
use url::Url; |
| 339 |
|
| 340 |
-#[sqlx_macros::test] |
| 341 |
+/*#[sqlx_macros::test] |
| 342 |
async fn it_connects() -> anyhow::Result<()> { |
| 343 |
let mut conn = new::<MySql>().await?; |
| 344 |
|
| 345 |
@@ -121,9 +121,9 @@ async fn it_executes_with_pool() -> anyh |
| 346 |
assert_eq!(count, 2); |
| 347 |
|
| 348 |
Ok(()) |
| 349 |
-} |
| 350 |
+}*/ |
| 351 |
|
| 352 |
-#[sqlx_macros::test] |
| 353 |
+/*#[sqlx_macros::test] |
| 354 |
async fn it_works_with_cache_disabled() -> anyhow::Result<()> { |
| 355 |
setup_if_needed(); |
| 356 |
|
| 357 |
@@ -141,9 +141,9 @@ async fn it_works_with_cache_disabled() |
| 358 |
} |
| 359 |
|
| 360 |
Ok(()) |
| 361 |
-} |
| 362 |
+}*/ |
| 363 |
|
| 364 |
-#[sqlx_macros::test] |
| 365 |
+/*#[sqlx_macros::test] |
| 366 |
async fn it_drops_results_in_affected_rows() -> anyhow::Result<()> { |
| 367 |
let mut conn = new::<MySql>().await?; |
| 368 |
|
| 369 |
@@ -602,4 +602,4 @@ async fn select_statement_count(conn: &m |
| 370 |
) |
| 371 |
.fetch_one(conn) |
| 372 |
.await |
| 373 |
-} |
| 374 |
+}*/ |
| 375 |
Index: sqlx/tests/mysql/derives.rs |
| 376 |
=================================================================== |
| 377 |
--- sqlx.orig/tests/mysql/derives.rs |
| 378 |
+++ sqlx/tests/mysql/derives.rs |
| 379 |
@@ -1,5 +1,5 @@ |
| 380 |
use sqlx_mysql::MySql; |
| 381 |
-use sqlx_test::new; |
| 382 |
+//use sqlx_test::new; |
| 383 |
|
| 384 |
#[sqlx::test] |
| 385 |
#[cfg(any(feature = "runtime-async-std", feature = "runtime-tokio"))] |
| 386 |
@@ -79,7 +79,7 @@ async fn test_derive_strong_enum() -> an |
| 387 |
default_case: DefaultCaseEnum, |
| 388 |
} |
| 389 |
|
| 390 |
- let mut conn = new::<MySql>().await?; |
| 391 |
+ /*let mut conn = new::<MySql>().await?; |
| 392 |
|
| 393 |
sqlx::raw_sql( |
| 394 |
r#" |
| 395 |
@@ -139,7 +139,7 @@ async fn test_derive_strong_enum() -> an |
| 396 |
.fetch_one(&mut conn) |
| 397 |
.await?; |
| 398 |
|
| 399 |
- assert_eq!(input, output); |
| 400 |
+ assert_eq!(input, output);*/ |
| 401 |
|
| 402 |
Ok(()) |
| 403 |
} |
| 404 |
@@ -226,7 +226,7 @@ async fn test_derive_weak_enum() -> anyh |
| 405 |
u64: WeakEnumU64, |
| 406 |
} |
| 407 |
|
| 408 |
- let mut conn = new::<MySql>().await?; |
| 409 |
+ /*let mut conn = new::<MySql>().await?; |
| 410 |
|
| 411 |
sqlx::raw_sql( |
| 412 |
r#" |
| 413 |
@@ -301,7 +301,7 @@ async fn test_derive_weak_enum() -> anyh |
| 414 |
.fetch_all(&mut conn) |
| 415 |
.await?; |
| 416 |
|
| 417 |
- assert_eq!(rows_in, rows_out); |
| 418 |
+ assert_eq!(rows_in, rows_out);*/ |
| 419 |
|
| 420 |
Ok(()) |
| 421 |
} |
| 422 |
Index: sqlx/tests/mysql/macros.rs |
| 423 |
=================================================================== |
| 424 |
--- sqlx.orig/tests/mysql/macros.rs |
| 425 |
+++ sqlx/tests/mysql/macros.rs |
| 426 |
@@ -1,7 +1,7 @@ |
| 427 |
use sqlx::{Connection, MySql, MySqlConnection, Transaction}; |
| 428 |
-use sqlx_test::new; |
| 429 |
+//use sqlx_test::new; |
| 430 |
|
| 431 |
-#[sqlx_macros::test] |
| 432 |
+/*#[sqlx_macros::test] |
| 433 |
async fn macro_select_from_cte() -> anyhow::Result<()> { |
| 434 |
let mut conn = new::<MySql>().await?; |
| 435 |
let account = |
| 436 |
@@ -31,7 +31,7 @@ async fn macro_select_from_cte_bind() -> |
| 437 |
println!("{}: {}", account.id, account.name); |
| 438 |
|
| 439 |
Ok(()) |
| 440 |
-} |
| 441 |
+}*/ |
| 442 |
|
| 443 |
#[derive(Debug)] |
| 444 |
struct RawAccount { |
| 445 |
@@ -39,7 +39,7 @@ struct RawAccount { |
| 446 |
name: Option<String>, |
| 447 |
} |
| 448 |
|
| 449 |
-#[sqlx_macros::test] |
| 450 |
+/*#[sqlx_macros::test] |
| 451 |
async fn test_query_as_raw() -> anyhow::Result<()> { |
| 452 |
let mut conn = new::<MySql>().await?; |
| 453 |
|
| 454 |
@@ -184,7 +184,7 @@ async fn test_column_override_nullable() |
| 455 |
assert_eq!(record.id, Some(1)); |
| 456 |
|
| 457 |
Ok(()) |
| 458 |
-} |
| 459 |
+}*/ |
| 460 |
|
| 461 |
/*async fn with_test_row<'a>( |
| 462 |
conn: &'a mut MySqlConnection, |
| 463 |
@@ -209,7 +209,7 @@ struct OptionalRecord { |
| 464 |
id: Option<MyInt>, |
| 465 |
} |
| 466 |
|
| 467 |
-#[sqlx_macros::test] |
| 468 |
+/*#[sqlx_macros::test] |
| 469 |
async fn test_column_override_wildcard() -> anyhow::Result<()> { |
| 470 |
let mut conn = new::<MySql>().await?; |
| 471 |
let (mut conn, id) = with_test_row(&mut conn).await?; |
| 472 |
@@ -401,7 +401,7 @@ async fn test_try_from_attr_for_custom_t |
| 473 |
assert_eq!(record.id, Id(id.0)); |
| 474 |
|
| 475 |
Ok(()) |
| 476 |
-} |
| 477 |
+}*/ |
| 478 |
|
| 479 |
#[sqlx_macros::test] |
| 480 |
#[cfg(any(feature = "runtime-async-std", feature = "runtime-tokio"))] |
| 481 |
@@ -424,19 +424,19 @@ async fn test_try_from_attr_with_flatten |
| 482 |
} |
| 483 |
} |
| 484 |
|
| 485 |
- let mut conn = new::<MySql>().await?; |
| 486 |
+ /*let mut conn = new::<MySql>().await?; |
| 487 |
let (mut conn, id) = with_test_row(&mut conn).await?; |
| 488 |
|
| 489 |
let record = sqlx::query_as::<_, Record>("select id from tweet") |
| 490 |
.fetch_one(&mut *conn) |
| 491 |
.await?; |
| 492 |
|
| 493 |
- assert_eq!(record.id, id.0 as u64); |
| 494 |
+ assert_eq!(record.id, id.0 as u64);*/ |
| 495 |
|
| 496 |
Ok(()) |
| 497 |
} |
| 498 |
|
| 499 |
-#[sqlx_macros::test] |
| 500 |
+/*#[sqlx_macros::test] |
| 501 |
async fn test_try_from_attr_with_complex_type() -> anyhow::Result<()> { |
| 502 |
mod m { |
| 503 |
#[derive(sqlx::Type)] |
| 504 |
@@ -529,6 +529,6 @@ async fn test_from_row_json_try_from_att |
| 505 |
assert_eq!(record.j.sum, 3); |
| 506 |
|
| 507 |
Ok(()) |
| 508 |
-} |
| 509 |
+}*/ |
| 510 |
|
| 511 |
// we don't emit bind parameter type-checks for MySQL so testing the overrides is redundant |
| 512 |
Index: sqlx/tests/mysql/types.rs |
| 513 |
=================================================================== |
| 514 |
--- sqlx.orig/tests/mysql/types.rs |
| 515 |
+++ sqlx/tests/mysql/types.rs |
| 516 |
@@ -12,9 +12,9 @@ use sqlx::types::Text; |
| 517 |
use sqlx::mysql::types::MySqlTime; |
| 518 |
use sqlx_mysql::types::MySqlTimeSign; |
| 519 |
|
| 520 |
-use sqlx_test::{new, test_type}; |
| 521 |
+//use sqlx_test::{new, test_type}; |
| 522 |
|
| 523 |
-test_type!(bool(MySql, "false" == false, "true" == true)); |
| 524 |
+/*test_type!(bool(MySql, "false" == false, "true" == true)); |
| 525 |
|
| 526 |
test_type!(u8(MySql, "CAST(253 AS UNSIGNED)" == 253_u8)); |
| 527 |
test_type!(i8(MySql, "5" == 5_i8, "0" == 0_i8)); |
| 528 |
@@ -38,9 +38,9 @@ test_type!(f32(MySql, "3.141000032424926 |
| 529 |
test_type!(string<String>(MySql, |
| 530 |
"'helloworld'" == "helloworld", |
| 531 |
"''" == "" |
| 532 |
-)); |
| 533 |
+));*/ |
| 534 |
|
| 535 |
-test_type!(bytes<Vec<u8>>(MySql, |
| 536 |
+/*test_type!(bytes<Vec<u8>>(MySql, |
| 537 |
"X'DEADBEEF'" |
| 538 |
== vec![0xDE_u8, 0xAD, 0xBE, 0xEF], |
| 539 |
"X''" |
| 540 |
@@ -82,7 +82,7 @@ test_type!(mysql_time<MySqlTime>(MySql, |
| 541 |
"TIME '-123:45:56.890'" == MySqlTime::new(MySqlTimeSign::Negative, 123, 45, 56, 890_000).unwrap(), |
| 542 |
"TIME '123:45:56.890011'" == MySqlTime::new(MySqlTimeSign::Positive, 123, 45, 56, 890_011).unwrap(), |
| 543 |
"TIME '-123:45:56.890011'" == MySqlTime::new(MySqlTimeSign::Negative, 123, 45, 56, 890_011).unwrap(), |
| 544 |
-)); |
| 545 |
+));*/ |
| 546 |
|
| 547 |
#[cfg(feature = "chrono")] |
| 548 |
mod chrono { |
| 549 |
@@ -90,7 +90,7 @@ mod chrono { |
| 550 |
|
| 551 |
use super::*; |
| 552 |
|
| 553 |
- test_type!(chrono_date<NaiveDate>(MySql, |
| 554 |
+ /*test_type!(chrono_date<NaiveDate>(MySql, |
| 555 |
"DATE '2001-01-05'" == NaiveDate::from_ymd_opt(2001, 1, 5).unwrap(), |
| 556 |
"DATE '2050-11-23'" == NaiveDate::from_ymd_opt(2050, 11, 23).unwrap() |
| 557 |
)); |
| 558 |
@@ -112,9 +112,9 @@ mod chrono { |
| 559 |
== Utc.from_utc_datetime( |
| 560 |
&NaiveDate::from_ymd_opt(2019, 1, 2).unwrap().and_hms_micro_opt(5, 10, 20, 115100).unwrap(), |
| 561 |
) |
| 562 |
- )); |
| 563 |
+ ));*/ |
| 564 |
|
| 565 |
- #[sqlx_macros::test] |
| 566 |
+ /*#[sqlx_macros::test] |
| 567 |
async fn test_type_chrono_zero_date() -> anyhow::Result<()> { |
| 568 |
let mut conn = sqlx_test::new::<MySql>().await?; |
| 569 |
|
| 570 |
@@ -150,7 +150,7 @@ mod chrono { |
| 571 |
assert!(row.try_get::<NaiveDateTime, _>(0).is_err()); |
| 572 |
|
| 573 |
Ok(()) |
| 574 |
- } |
| 575 |
+ }*/ |
| 576 |
} |
| 577 |
|
| 578 |
#[cfg(feature = "time")] |
| 579 |
@@ -161,7 +161,7 @@ mod time_tests { |
| 580 |
|
| 581 |
use super::*; |
| 582 |
|
| 583 |
- test_type!(time_date<Date>( |
| 584 |
+ /*test_type!(time_date<Date>( |
| 585 |
MySql, |
| 586 |
"DATE '2001-01-05'" == date!(2001 - 1 - 5), |
| 587 |
"DATE '2050-11-23'" == date!(2050 - 11 - 23) |
| 588 |
@@ -190,9 +190,9 @@ mod time_tests { |
| 589 |
== date!(2019 - 1 - 2) |
| 590 |
.with_time(time!(5:10:20.115100)) |
| 591 |
.assume_utc() |
| 592 |
- )); |
| 593 |
+ ));*/ |
| 594 |
|
| 595 |
- #[sqlx_macros::test] |
| 596 |
+ /*#[sqlx_macros::test] |
| 597 |
async fn test_type_time_zero_date() -> anyhow::Result<()> { |
| 598 |
let mut conn = sqlx_test::new::<MySql>().await?; |
| 599 |
|
| 600 |
@@ -228,10 +228,10 @@ mod time_tests { |
| 601 |
assert!(row.try_get::<PrimitiveDateTime, _>(0).is_err()); |
| 602 |
|
| 603 |
Ok(()) |
| 604 |
- } |
| 605 |
+ }*/ |
| 606 |
} |
| 607 |
|
| 608 |
-#[cfg(feature = "bigdecimal")] |
| 609 |
+/*#[cfg(feature = "bigdecimal")] |
| 610 |
test_type!(bigdecimal<sqlx::types::BigDecimal>( |
| 611 |
MySql, |
| 612 |
"CAST(0 as DECIMAL(0, 0))" == "0".parse::<sqlx::types::BigDecimal>().unwrap(), |
| 613 |
@@ -252,18 +252,18 @@ test_type!(decimal<sqlx::types::Decimal> |
| 614 |
"CAST(0.01234 AS DECIMAL(6, 5))" == sqlx::types::Decimal::from_str("0.01234").unwrap(), |
| 615 |
"CAST(12.34 AS DECIMAL(4, 2))" == sqlx::types::Decimal::from_str("12.34").unwrap(), |
| 616 |
"CAST(12345.6789 AS DECIMAL(9, 4))" == sqlx::types::Decimal::from_str("12345.6789").unwrap(), |
| 617 |
-)); |
| 618 |
+));*/ |
| 619 |
|
| 620 |
#[cfg(feature = "json")] |
| 621 |
mod json_tests { |
| 622 |
use serde_json::{json, Value as JsonValue}; |
| 623 |
|
| 624 |
use sqlx::types::Json; |
| 625 |
- use sqlx_test::test_type; |
| 626 |
+ //use sqlx_test::test_type; |
| 627 |
|
| 628 |
use super::*; |
| 629 |
|
| 630 |
- test_type!(json<JsonValue>( |
| 631 |
+ /*test_type!(json<JsonValue>( |
| 632 |
MySql, |
| 633 |
// MySQL 8.0.27 changed `<=>` to return an unsigned integer |
| 634 |
"SELECT CAST(CAST({0} AS BINARY) <=> CAST(? AS BINARY) AS SIGNED INTEGER), CAST({0} AS BINARY) as _2, ? as _3", |
| 635 |
@@ -271,7 +271,7 @@ mod json_tests { |
| 636 |
"'\"π\"'" == json!("π"), |
| 637 |
"'\"πββοΈ\"'" == json!("πββοΈ"), |
| 638 |
"'[\"Hello\",\"World!\"]'" == json!(["Hello", "World!"]) |
| 639 |
- )); |
| 640 |
+ ));*/ |
| 641 |
|
| 642 |
#[derive(serde::Deserialize, serde::Serialize, Debug, PartialEq)] |
| 643 |
struct Friend { |
| 644 |
@@ -279,12 +279,12 @@ mod json_tests { |
| 645 |
age: u32, |
| 646 |
} |
| 647 |
|
| 648 |
- test_type!(json_struct<Json<Friend>>( |
| 649 |
+ /*test_type!(json_struct<Json<Friend>>( |
| 650 |
MySql, |
| 651 |
// MySQL 8.0.27 changed `<=>` to return an unsigned integer |
| 652 |
"SELECT CAST(CAST({0} AS BINARY) <=> CAST(? AS BINARY) AS SIGNED INTEGER), CAST({0} AS BINARY) as _2, ? as _3", |
| 653 |
"\'{\"name\":\"Joe\",\"age\":33}\'" == Json(Friend { name: "Joe".to_string(), age: 33 }) |
| 654 |
- )); |
| 655 |
+ ));*/ |
| 656 |
|
| 657 |
// NOTE: This is testing recursive (and transparent) usage of the `Json` wrapper. You don't |
| 658 |
// need to wrap the Vec in Json<_> to make the example work. |
| 659 |
@@ -294,13 +294,13 @@ mod json_tests { |
| 660 |
json_column: Json<Vec<i64>>, |
| 661 |
} |
| 662 |
|
| 663 |
- test_type!(json_struct_json_column<Json<Customer>>( |
| 664 |
+ /*test_type!(json_struct_json_column<Json<Customer>>( |
| 665 |
MySql, |
| 666 |
"\'{\"json_column\":[1,2]}\'" == Json(Customer { json_column: Json(vec![1, 2]) }) |
| 667 |
- )); |
| 668 |
+ ));*/ |
| 669 |
} |
| 670 |
|
| 671 |
-#[sqlx_macros::test] |
| 672 |
+/*#[sqlx_macros::test] |
| 673 |
async fn test_bits() -> anyhow::Result<()> { |
| 674 |
let mut conn = new::<MySql>().await?; |
| 675 |
|
| 676 |
@@ -383,4 +383,4 @@ CREATE TEMPORARY TABLE user_login ( |
| 677 |
assert_eq!(*last_login.socket_addr, socket_addr); |
| 678 |
|
| 679 |
Ok(()) |
| 680 |
-} |
| 681 |
+}*/ |
| 682 |
Index: sqlx/tests/mysql/describe.rs |
| 683 |
=================================================================== |
| 684 |
--- sqlx.orig/tests/mysql/describe.rs |
| 685 |
+++ sqlx/tests/mysql/describe.rs |
| 686 |
@@ -1,8 +1,8 @@ |
| 687 |
use sqlx::mysql::MySql; |
| 688 |
use sqlx::{Column, Executor, Type, TypeInfo}; |
| 689 |
-use sqlx_test::new; |
| 690 |
+//use sqlx_test::new; |
| 691 |
|
| 692 |
-#[sqlx_macros::test] |
| 693 |
+/*#[sqlx_macros::test] |
| 694 |
async fn it_describes_simple() -> anyhow::Result<()> { |
| 695 |
let mut conn = new::<MySql>().await?; |
| 696 |
|
| 697 |
@@ -68,4 +68,4 @@ async fn uses_alias_name() -> anyhow::Re |
| 698 |
assert_eq!(d.columns()[0].name(), "tweet_text"); |
| 699 |
|
| 700 |
Ok(()) |
| 701 |
-} |
| 702 |
+}*/ |
| 703 |
--- rust-sqlx-0.8.3.orig/tests/mysql/rustsec.rs |
| 704 |
+++ rust-sqlx-0.8.3/tests/mysql/rustsec.rs |
| 705 |
@@ -1,13 +1,13 @@ |
| 706 |
use sqlx::{Error, MySql}; |
| 707 |
use std::io; |
| 708 |
|
| 709 |
-use sqlx_test::new; |
| 710 |
+//use sqlx_test::new; |
| 711 |
|
| 712 |
// https://rustsec.org/advisories/RUSTSEC-2024-0363.html |
| 713 |
// |
| 714 |
// During the audit the MySQL driver was found to be *unlikely* to be vulnerable to the exploit, |
| 715 |
// so this just serves as a sanity check. |
| 716 |
-#[sqlx::test] |
| 717 |
+/*#[sqlx::test] |
| 718 |
async fn rustsec_2024_0363() -> anyhow::Result<()> { |
| 719 |
let overflow_len = 4 * 1024 * 1024 * 1024; // 4 GiB |
| 720 |
|
| 721 |
@@ -64,4 +64,4 @@ async fn rustsec_2024_0363() -> anyhow:: |
| 722 |
|
| 723 |
// Injection didn't affect our database; we're happy. |
| 724 |
Ok(()) |
| 725 |
-} |
| 726 |
+}*/ |