mariadb/BUILD
Michael Widenius ae5bc05988 Fix for MDEV-533: Confusing error code when doing auto-increment insert for out-of-range values
create table t1 (a smallint primary key auto_increment);
insert into t1 values(32767);
insert into t1 values(NULL);
ERROR 1062 (23000): Duplicate entry '32767' for key 'PRIMARY

Now on always gets error HA_ERR_AUTOINC_RANGE=167 "Out of range value for column", independent of
store engine, SQL Mode or number of inserted rows. This is an unique error that is easier to test for in replication.

Another bug fix is that we now get an error when trying to insert a too big auto-generated value, even in non-strict mode.
Before one get insted the max column value inserted.
This patch also fixes some issues with inserting negative numbers in an auto-increment column.
Fixed the ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
Added SQLSTATE errors for handler errors

Smaller bug fixes:
* Added warnings for duplicate key errors when using INSERT IGNORE
* Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
* Allow one to see how cmake is called by using --just-print --just-configure


BUILD/FINISH.sh:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
cmake/configure.pl:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
include/CMakeLists.txt:
  Added handler_state.h
include/handler_state.h:
  SQLSTATE for handler error messages.
  Required for HA_ERR_AUTOINC_ERANGE, but solves also some other cases.
mysql-test/extra/binlog_tests/binlog.test:
  Fixed old wrong behaviour
  Added more tests
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  Reset binary log to only print what's necessary in show_binlog_events
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Update to new error codes
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  Ignore warnings as this depends on how the test is run
mysql-test/include/strict_autoinc.inc:
  On now gets an error on overflow
mysql-test/r/auto_increment.result:
  Update results after fixing error message
mysql-test/r/auto_increment_ranges_innodb.result:
  Test new behaviour
mysql-test/r/auto_increment_ranges_myisam.result:
  Test new behaviour
mysql-test/r/commit_1innodb.result:
  Added warnings for duplicate key error
mysql-test/r/create.result:
  Added warnings for duplicate key error
mysql-test/r/insert.result:
  Added warnings for duplicate key error
mysql-test/r/insert_select.result:
  Added warnings for duplicate key error
mysql-test/r/insert_update.result:
  Added warnings for duplicate key error
mysql-test/r/mix2_myisam.result:
  Added warnings for duplicate key error
mysql-test/r/myisam_mrr.result:
  Added warnings for duplicate key error
mysql-test/r/null_key.result:
  Added warnings for duplicate key error
mysql-test/r/replace.result:
  Update to new error codes
mysql-test/r/strict_autoinc_1myisam.result:
  Update to new error codes
mysql-test/r/strict_autoinc_2innodb.result:
  Update to new error codes
mysql-test/r/strict_autoinc_3heap.result:
  Update to new error codes
mysql-test/r/trigger.result:
  Added warnings for duplicate key error
mysql-test/r/xtradb_mrr.result:
  Added warnings for duplicate key error
mysql-test/suite/binlog/r/binlog_innodb_row.result:
  Updated result
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated result
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Updated result
mysql-test/suite/innodb/r/innodb-autoinc.result:
  Update to new error codes
mysql-test/suite/innodb/r/innodb-lock.result:
  Updated results
mysql-test/suite/innodb/r/innodb.result:
  Updated results
mysql-test/suite/innodb/r/innodb_bug56947.result:
  Updated results
mysql-test/suite/innodb/r/innodb_mysql.result:
  Updated results
mysql-test/suite/innodb/t/innodb-autoinc.test:
  Update to new error codes
mysql-test/suite/maria/maria3.result:
  Updated result
mysql-test/suite/maria/mrr.result:
  Updated result
mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result:
  Updated result
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  Update to new error codes
mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff:
  Updated results
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Updated results
mysql-test/t/auto_increment.test:
  Update to new error codes
mysql-test/t/auto_increment_ranges.inc:
  Test new behaviour
mysql-test/t/auto_increment_ranges_innodb.test:
  Test new behaviour
mysql-test/t/auto_increment_ranges_myisam.test:
  Test new behaviour
mysql-test/t/replace.test:
  Update to new error codes
mysys/my_getopt.c:
  Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
sql/handler.cc:
  Ignore negative values for signed auto-increment columns
  Always give an error if we get an overflow for an auto-increment-column (instead of inserting the max value)
  Ensure that the row number is correct for the out-of-range-value error message.
  
  
  ******
  Fixed wrong printing of column namn for "Out of range value" errors
  Fixed that INSERT_ID is correctly replicated also for out-of-range autoincrement values
  Fixed that print_keydup_error() can also be used to generate warnings
  ******
  Return HA_ERR_AUTOINC_ERANGE (167) instead of ER_WARN_DATA_OUT_OF_RANGE for auto-increment overflow
sql/handler.h:
  Allow INSERT IGNORE to continue also after out-of-range inserts.
  Fixed that print_keydup_error() can also be used to generate warnings
sql/log_event.cc:
  Added DBUG_PRINT
  Fixed the ER_AUTOINC_READ_FAILED, ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
  This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
sql/sql_insert.cc:
  Add warnings for duplicate key errors when using INSERT IGNORE
sql/sql_state.c:
  Added handler errors
sql/sql_table.cc:
  Update call to print_keydup_error()
storage/innobase/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
storage/xtradb/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
2012-09-18 15:14:19 +03:00
..
autorun.sh Updated/added copyright headers 2011-06-30 17:46:53 +02:00
build_mccge.sh mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
check-cpu 5.3 merge 2012-01-13 15:50:02 +01:00
cleanup - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
cmake_configure.sh Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-alpha - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-alpha-debug Fixed all BUILD scripts to use g++ instead of gcc for linking 2011-03-31 16:26:51 +03:00
compile-amd64-debug-all created *-all build scripts that build with ndb 2010-08-10 18:36:04 +04:00
compile-amd64-debug-max Merge 2010-12-29 00:47:05 +01:00
compile-amd64-debug-max-no-ndb Merge 2010-12-29 00:47:05 +01:00
compile-amd64-gcov - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-amd64-gprof - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-amd64-gprof-no-ndb fater way to detect last page address for the last log file. 2007-10-01 18:48:20 +03:00
compile-amd64-max Merge 2010-12-29 00:47:05 +01:00
compile-amd64-max-sci - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-amd64-valgrind-max Merge 2010-12-29 01:26:31 +01:00
compile-bintar Merge OQGraph into MariaDB 5.2. 2010-03-31 10:17:03 +02:00
compile-darwin-mwcc Merge 2010-12-29 00:47:05 +01:00
compile-dist 5.3 merge 2012-01-13 15:50:02 +01:00
compile-hpux11-parisc2-aCC Merge 2010-12-29 00:47:05 +01:00
compile-ia64-debug-max Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-innodb merge with xtradb-5.5.15 2011-07-18 23:04:24 +02:00
compile-irix-mips64-mipspro Merge 2010-12-29 00:47:05 +01:00
compile-ndb-autotest Merge 2010-12-29 01:26:31 +01:00
compile-pentium 5.5-merge 2011-07-02 22:08:51 +02:00
compile-pentium-cybozu - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium-debug Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium-debug-all created *-all build scripts that build with ndb 2010-08-10 18:36:04 +04:00
compile-pentium-debug-max Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium-debug-max-no-embedded Merge 2010-12-29 00:47:05 +01:00
compile-pentium-debug-max-no-ndb Merge 2010-12-29 01:26:31 +01:00
compile-pentium-debug-max-no-qc comment added 2009-10-07 13:02:43 +03:00
compile-pentium-debug-openssl Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium-debug-yassl Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium-gcov Merge 2010-12-29 00:47:05 +01:00
compile-pentium-gprof - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium-icc - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium-icc-valgrind-max 5.3 merge 2012-01-13 15:50:02 +01:00
compile-pentium-icc-yassl - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium-max Merge 2010-12-29 00:47:05 +01:00
compile-pentium-myodbc - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium-pgcc Fixed all BUILD scripts to use g++ instead of gcc for linking 2011-03-31 16:26:51 +03:00
compile-pentium-valgrind-max 5.3 merge 2012-01-13 15:50:02 +01:00
compile-pentium-valgrind-max-no-ndb Merge 2010-12-29 01:26:31 +01:00
compile-pentium64 Merge 2010-12-29 00:47:05 +01:00
compile-pentium64-debug Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium64-debug-all created *-all build scripts that build with ndb 2010-08-10 18:36:04 +04:00
compile-pentium64-debug-max Updated/added copyright headers 2011-06-30 17:46:53 +02:00
compile-pentium64-gcov 5.5-merge 2011-07-02 22:08:51 +02:00
compile-pentium64-gprof 5.5-merge 2011-07-02 22:08:51 +02:00
compile-pentium64-max 5.5-merge 2011-07-02 22:08:51 +02:00
compile-pentium64-max-sci - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-pentium64-valgrind-max 5.3 merge 2012-01-13 15:50:02 +01:00
compile-ppc - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
compile-ppc-debug Merge 2010-12-29 00:47:05 +01:00
compile-ppc-debug-max Merge 2010-12-29 00:47:05 +01:00
compile-ppc-debug-max-no-ndb Merge 2010-12-29 00:47:05 +01:00
compile-ppc-max Merge 2010-12-29 00:47:05 +01:00
compile-solaris-amd64 fixes for opensolaris compilation failures 2012-01-05 18:56:31 +01:00
compile-solaris-amd64-debug 5.5-merge 2011-07-02 22:08:51 +02:00
compile-solaris-amd64-debug-forte Removed compiler warnings 2010-01-06 23:27:53 +02:00
compile-solaris-amd64-forte Initail merge with MySQL 5.1 (XtraDB still needs to be merged) 2011-11-21 19:13:14 +02:00
compile-solaris-amd64-forte-debug Updated/added copyright headers 2011-06-30 17:37:13 +02:00
compile-solaris-sparc Merge with 5.2. 2011-12-11 11:34:44 +02:00
compile-solaris-sparc-debug Fixed all BUILD scripts to use g++ instead of gcc for linking 2011-03-31 16:26:51 +03:00
compile-solaris-sparc-forte 5.3 merge 2012-01-13 15:50:02 +01:00
compile-solaris-sparc-purify 5.5-merge 2011-07-02 22:08:51 +02:00
compile-solaris-x86-32 Removed compiler warnings 2010-01-06 23:27:53 +02:00
compile-solaris-x86-32-debug Removed compiler warnings 2010-01-06 23:27:53 +02:00
compile-solaris-x86-32-debug-forte Removed compiler warnings 2010-01-06 23:27:53 +02:00
compile-solaris-x86-forte-32 Removed compiler warnings 2010-01-06 23:27:53 +02:00
FINISH.sh Fix for MDEV-533: Confusing error code when doing auto-increment insert for out-of-range values 2012-09-18 15:14:19 +03:00
SETUP.sh Cleanups: 2012-03-20 15:23:56 +02:00
util.sh Add support in bintar build script for OpenSolaris. 2010-01-28 23:34:22 +01:00