@@ -292,14 +292,19 @@ public function testShowCreateTable1() {
292
292
293
293
public function testShowCreateTableWithEmptyDatetimeDefault () {
294
294
$ this ->assertQuery (
295
- ' CREATE TABLE _tmp_table (
295
+ " CREATE TABLE _tmp_table (
296
296
ID BIGINT PRIMARY KEY AUTO_INCREMENT,
297
297
timestamp1 datetime NOT NULL,
298
298
timestamp2 date NOT NULL,
299
299
timestamp3 time NOT NULL,
300
300
timestamp4 timestamp NOT NULL,
301
- timestamp5 year NOT NULL
302
- ); '
301
+ timestamp5 year NOT NULL,
302
+ notempty1 datetime DEFAULT '1999-12-12 12:12:12',
303
+ notempty2 date DEFAULT '1999-12-12',
304
+ notempty3 time DEFAULT '12:12:12',
305
+ notempty4 year DEFAULT '2024',
306
+ notempty5 timestamp DEFAULT '1734539165',
307
+ ); "
303
308
);
304
309
305
310
$ this ->assertQuery (
@@ -308,15 +313,20 @@ public function testShowCreateTableWithEmptyDatetimeDefault() {
308
313
$ results = $ this ->engine ->get_query_results ();
309
314
310
315
$ this ->assertEquals (
311
- ' CREATE TABLE `_tmp_table` (
316
+ " CREATE TABLE `_tmp_table` (
312
317
`ID` bigint AUTO_INCREMENT,
313
318
`timestamp1` datetime NOT NULL,
314
319
`timestamp2` date NOT NULL,
315
320
`timestamp3` time NOT NULL,
316
321
`timestamp4` timestamp NOT NULL,
317
322
`timestamp5` year NOT NULL,
323
+ `notempty1` datetime DEFAULT '1999-12-12 12:12:12',
324
+ `notempty2` date DEFAULT '1999-12-12',
325
+ `notempty3` time DEFAULT '12:12:12',
326
+ `notempty4` year DEFAULT '2024',
327
+ `notempty5` timestamp DEFAULT '1734539165',
318
328
PRIMARY KEY (`ID`)
319
- ); ' ,
329
+ ); " ,
320
330
$ results [0 ]->{'Create Table ' }
321
331
);
322
332
}
0 commit comments