1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-21 08:47:42 +03:00
Files
mariadb/mysql-test/t
unknown f3b78f34e5 Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE
mode.

When a new DATE/DATETIME field without default value is being added by the
ALTER TABLE the '0000-00-00' value is used as the default one. But it wasn't
checked whether such value was allowed by the set sql mode. Due to this
'0000-00-00' values was allowed for DATE/DATETIME fields even in the
NO_ZERO_DATE mode.

Now the mysql_alter_table() function checks whether the '0000-00-00' value
is allowed for DATE/DATETIME fields by the set sql mode.
The new error_if_not_empty flag is used in the mysql_alter_table() function
to indicate that it should abort if the table being altered isn't empty.
The new new_datetime_field field is used in the mysql_alter_table() function
for error throwing purposes. 
The new error_if_not_empty parameter is added to the copy_data_between_tables()
function to indicate the it should return error if the source table isn't empty.


mysql-test/t/alter_table.test:
  Added a test case for the bug#27507: Wrong DATETIME value was allowed by
  ALTER TABLE in the NO_ZERO_DATE mode.
mysql-test/r/alter_table.result:
  Added a test case for the bug#27507: Wrong DATETIME value was allowed by
  ALTER TABLE in the NO_ZERO_DATE mode.
sql/sql_table.cc:
  Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE
  mode.
  Now the mysql_alter_table() function checks whether the '0000-00-00' value
  is allowed for DATE/DATETIME fields by the set sql mode.
  The new error_if_not_empty flag is used in the mysql_alter_table() function
  to indicate that it should abort if the table being altered isn't empty.
  The new new_datetime_field field is used in the mysql_alter_table() function
  for error throwing purposes. 
  The new error_if_not_empty parameter is added to the copy_data_between_tables()
  function to indicate the it should return error if the source table isn't empty.
2007-05-22 00:22:53 +04:00
..
2007-05-17 19:38:34 +03:00
2007-05-11 20:33:13 +04:00
2006-11-20 22:42:06 +02:00
2006-11-20 22:42:06 +02:00
2007-02-23 18:49:41 +02:00
2007-05-14 19:25:03 +04:00
2007-04-10 16:55:48 +03:00
2007-03-08 00:27:42 +03:00
2006-11-29 13:56:59 -05:00
2006-11-20 22:42:06 +02:00
2007-04-11 13:58:16 +03:00
2007-05-12 00:46:07 +04:00
2006-11-20 22:42:06 +02:00
2007-03-28 12:11:44 +02:00
2007-03-20 19:36:11 +01:00
2007-04-18 19:36:22 -06:00
2007-05-11 03:17:05 +05:00
2007-05-16 09:51:05 +04:00
2006-11-15 10:23:27 +01:00
2007-02-07 14:22:19 -08:00
2007-02-24 13:12:20 +03:00
2007-05-09 14:46:11 +04:00
2007-02-24 13:12:20 +03:00
2007-04-23 21:27:43 +02:00
2007-03-31 17:18:03 +02:00
2007-03-21 09:13:05 +01:00
2006-11-20 22:42:06 +02:00
2006-11-15 10:23:27 +01:00
2006-11-15 10:23:27 +01:00
2007-02-08 15:53:14 +01:00
2006-11-15 10:23:27 +01:00
2006-11-15 10:23:27 +01:00
2007-04-10 19:08:08 +03:00
2006-12-11 18:52:24 -07:00
2007-05-18 17:48:44 +02:00
2006-11-20 22:42:06 +02:00
2007-05-18 17:48:44 +02:00
2007-02-01 18:00:24 +04:00
2007-05-11 20:33:13 +04:00
2007-04-17 12:32:01 +02:00
2007-03-29 09:08:30 +05:00
2007-02-24 13:12:20 +03:00
2007-04-23 17:15:51 +03:00