You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1422 lines
56 KiB

BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol Various parts of code used different 'precision' arguments for sprintf("%g") when converting floating point numbers to a string. This led to differences in results in some cases depending on whether the text-based or prepared statements protocol is used for a query. Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are consistent regardless of the protocol. This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the patch for WL#2934). client/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. libmysql/libmysql.c: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. mysql-test/r/archive_gis.result: Fixed test results to take additional precision into account. mysql-test/r/func_group.result: Fixed test results to take additional precision into account. mysql-test/r/func_math.result: Fixed test results to take additional precision into account. mysql-test/r/func_str.result: Fixed test results to take additional precision into account. mysql-test/r/gis.result: Fixed test results to take additional precision into account. mysql-test/r/innodb_gis.result: Fixed test results to take additional precision into account. mysql-test/r/select.result: Fixed test results to take additional precision into account. mysql-test/r/sp.result: Fixed test results to take additional precision into account. mysql-test/r/type_float.result: Fixed test results to take additional precision into account. mysql-test/t/type_float.test: Fixed test results to take additional precision into account. sql/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
17 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol Various parts of code used different 'precision' arguments for sprintf("%g") when converting floating point numbers to a string. This led to differences in results in some cases depending on whether the text-based or prepared statements protocol is used for a query. Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are consistent regardless of the protocol. This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the patch for WL#2934). client/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. libmysql/libmysql.c: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. mysql-test/r/archive_gis.result: Fixed test results to take additional precision into account. mysql-test/r/func_group.result: Fixed test results to take additional precision into account. mysql-test/r/func_math.result: Fixed test results to take additional precision into account. mysql-test/r/func_str.result: Fixed test results to take additional precision into account. mysql-test/r/gis.result: Fixed test results to take additional precision into account. mysql-test/r/innodb_gis.result: Fixed test results to take additional precision into account. mysql-test/r/select.result: Fixed test results to take additional precision into account. mysql-test/r/sp.result: Fixed test results to take additional precision into account. mysql-test/r/type_float.result: Fixed test results to take additional precision into account. mysql-test/t/type_float.test: Fixed test results to take additional precision into account. sql/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
17 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
Bug #27531: 5.1 part of the fix - Renamed "Using join cache" to "Using join buffer". - "Using join buffer" is now printed on the last table that "reads" from the join buffer cache. mysql-test/r/archive_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ctype_utf8.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/derived.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/distinct.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group_innodb.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/greedy_optimizer.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_by.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_min_max.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/index_merge_myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/information_schema.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_mysql.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join_nested.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/key_diff.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_condition_pushdown.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/range.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/row.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/select.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl_compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect3.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/union.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/view.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. sql/sql_select.cc: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch.
19 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
BUG#14940 "MySQL choose wrong index", v.2 - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments mysql-test/r/archive_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/auto_increment.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bdb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/bench_count_distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/binlog_stm_blackhole.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/case.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/cast.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_collate.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ctype_cp1250_ch.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/date_formats.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/distinct.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/fulltext.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_crypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_default.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_encrypt.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_gconcat.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_group.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_if.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_in.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_like.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_math.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_op.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_regexp.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_set.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_str.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_system.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_test.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/func_time.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_by.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/group_min_max.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/having.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/heap_hash.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_innodb.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/index_merge_ror.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/innodb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/insert_update.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/join_nested.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/key_diff.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/myisam.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ndb_gis.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/negation_elimination.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/null.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/olap.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/partition_pruning.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/query_cache.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/row.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_get_lock.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/rpl_master_pos_wait.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/select.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/ssl_compress.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/subselect.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/type_blob.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/union.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/varbinary.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/variables.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/r/view.result: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/ctype_cp1250_ch.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/func_like.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/group_min_max.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/index_merge_ror_cpk.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/join.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column mysql-test/t/partition_pruning.test: BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column sql/opt_range.cc: BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows - estimate of #records that will match the table condition. sql/sql_class.cc: BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.cc: BUG#14940: - Make the join optimizer to use TABLE::quick_condition_rows= = E(#table records after filtering with table condition) - Add "filtered" column to output of EXPLAIN EXTENDED sql/sql_select.h: BUG#14940: Added comments sql/table.h: BUG#14940: Added comments
20 years ago
18 years ago
WL#4189 - dynamic configuration support - safe process - cleanups - create new suite for fedarated BitKeeper/deleted/.del-basic.test: Rename: mysql-test/ndb/basic.test -> BitKeeper/deleted/.del-basic.test BitKeeper/deleted/.del-basic_log.result: Rename: mysql-test/ndb/basic_log.result -> BitKeeper/deleted/.del-basic_log.result mysql-test/suite/federated/federated_transactions.result: Rename: mysql-test/r/federated_transactions.result -> mysql-test/suite/federated/federated_transactions.result BitKeeper/deleted/.del-have_bug25714.require: Rename: mysql-test/r/have_bug25714.require -> BitKeeper/deleted/.del-have_bug25714.require BitKeeper/deleted/.del-kill_master.sh: Rename: mysql-test/misc/kill_master.sh -> BitKeeper/deleted/.del-kill_master.sh BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a: Rename: mysql-test/ndb/ndb_config_4_node.ini -> BitKeeper/deleted/.del-ndb_config_4_node.ini~d8e572e9b68f933a BitKeeper/deleted/.del-restart.result: Rename: mysql-test/ndb/restart.result -> BitKeeper/deleted/.del-restart.result mysql-test/suite/federated/federated_cleanup.inc: Rename: mysql-test/include/federated_cleanup.inc -> mysql-test/suite/federated/federated_cleanup.inc mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt: Rename: mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi -> mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt BitKeeper/deleted/.del-install_test_db.sh: Rename: mysql-test/install_test_db.sh -> BitKeeper/deleted/.del-install_test_db.sh BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16: Rename: mysql-test/ndb/ndb_config_1_node.ini -> BitKeeper/deleted/.del-ndb_config_1_node.ini~7ec640ed25570e16 BitKeeper/deleted/.del-mtr_timer.pl: Rename: mysql-test/lib/mtr_timer.pl -> BitKeeper/deleted/.del-mtr_timer.pl BitKeeper/deleted/.del-create-test-result: Rename: mysql-test/create-test-result -> BitKeeper/deleted/.del-create-test-result BitKeeper/deleted/.del-fix-result: Rename: mysql-test/fix-result -> BitKeeper/deleted/.del-fix-result BitKeeper/deleted/.del-mysql-test-run-shell.sh: Rename: mysql-test/mysql-test-run-shell.sh -> BitKeeper/deleted/.del-mysql-test-run-shell.sh BitKeeper/deleted/.del-mysql-test_V1.9.pl: Rename: mysql-test/misc/mysql-test_V1.9.pl -> BitKeeper/deleted/.del-mysql-test_V1.9.pl BitKeeper/deleted/.del-resolve-stack: Rename: mysql-test/resolve-stack -> BitKeeper/deleted/.del-resolve-stack BitKeeper/deleted/.del-restart_log.result: Rename: mysql-test/ndb/restart_log.result -> BitKeeper/deleted/.del-restart_log.result mysql-test/suite/rpl/t/rpl_000015-slave.opt: Rename: mysql-test/suite/rpl/t/rpl_000015.slave-mi -> mysql-test/suite/rpl/t/rpl_000015-slave.opt BitKeeper/deleted/.del-ndb_config_2_node.ini: Rename: mysql-test/ndb/ndb_config_2_node.ini -> BitKeeper/deleted/.del-ndb_config_2_node.ini BitKeeper/deleted/.del-ndbcluster.sh: Rename: mysql-test/ndb/ndbcluster.sh -> BitKeeper/deleted/.del-ndbcluster.sh BitKeeper/deleted/.del-basic.result: Rename: mysql-test/ndb/basic.result -> BitKeeper/deleted/.del-basic.result BitKeeper/deleted/.del-restart.test: Rename: mysql-test/ndb/restart.test -> BitKeeper/deleted/.del-restart.test BitKeeper/deleted/.del-have_bug25714.inc: Rename: mysql-test/include/have_bug25714.inc -> BitKeeper/deleted/.del-have_bug25714.inc BitKeeper/deleted/.del-mtr_diff.pl: Rename: mysql-test/lib/mtr_diff.pl -> BitKeeper/deleted/.del-mtr_diff.pl mysql-test/suite/federated/federated_transactions-slave.opt: Rename: mysql-test/t/federated_transactions-slave.opt -> mysql-test/suite/federated/federated_transactions-slave.opt BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b: Rename: mysql-test/ndb/Makefile.am -> BitKeeper/deleted/.del-Makefile.am~343467da4d0f211b BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949: Rename: mysql-test/lib/mtr_im.pl -> BitKeeper/deleted/.del-mtr_im.pl~9762b0336c28949 mysql-test/suite/federated/federated_innodb-slave.opt: Rename: mysql-test/t/federated_innodb-slave.opt -> mysql-test/suite/federated/federated_innodb-slave.opt client/mysqltest.c: Use current files path first when looking for include file configure.in: Remove mysql-test/nbd mysql-test/Makefile.am: Cleanup mysql-test/Makefile.am mysql-test/extra/binlog_tests/blackhole.test: Use new paths mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Use new paths mysql-test/mysql-test-run.pl: Dynamic configuration support Safe process mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test: Use new paths mysql-test/extra/rpl_tests/rpl_EE_err.test: Use new paths mysql-test/extra/rpl_tests/rpl_loaddata.test: Use new paths mysql-test/extra/rpl_tests/rpl_log.test: Use new paths mysql-test/extra/rpl_tests/rpl_row_001.test: Use new paths mysql-test/extra/rpl_tests/rpl_row_charset.test: Use new paths mysql-test/extra/rpl_tests/rpl_stm_000001.test: Use new paths mysql-test/extra/rpl_tests/rpl_stm_charset.test: Use new paths mysql-test/include/have_blackhole.inc: Use new paths mysql-test/include/have_ndbapi_examples.inc: Use new paths mysql-test/include/loaddata_autocom.inc: Use new paths mysql-test/include/mix1.inc: Use new paths mysql-test/include/ndb_backup.inc: Use new paths mysql-test/include/ndb_restore_master.inc: Use new paths mysql-test/include/ndb_restore_slave_eoption.inc: Use new paths mysql-test/include/testdb_only.inc: Use new paths mysql-test/lib/My/Config.pm: dynamic configuration safe process cleanups mysql-test/lib/mtr_cases.pm: dynamic configuration safe process cleanups mysql-test/lib/mtr_io.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_misc.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_process.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_report.pl: dynamic configuration safe process cleanups mysql-test/lib/mtr_stress.pl: dynamic configuration safe process cleanups mysql-test/r/backup.result: Use new paths mysql-test/r/ctype_big5.result: Use new paths mysql-test/r/gis.result: Use new paths mysql-test/r/loaddata.result: Use new paths mysql-test/r/loaddata_autocom_innodb.result: Use new paths mysql-test/r/mysqlbinlog.result: Use new paths mysql-test/r/mysqlbinlog_base64.result: Use new paths mysql-test/r/outfile.result: Use new paths mysql-test/r/partition_error.result: Use new paths mysql-test/r/partition_not_windows.result: Use new paths mysql-test/r/partition_symlink.result: Use new paths mysql-test/r/query_cache.result: Use new paths mysql-test/r/sp.result: Use new paths mysql-test/r/symlink.result: Use new paths mysql-test/r/system_mysql_db.result: Use new paths mysql-test/r/trigger.result: Use new paths mysql-test/r/type_blob.result: Use new paths mysql-test/r/view.result: Use new paths mysql-test/r/warnings.result: Use new paths mysql-test/suite/binlog/r/binlog_killed_simulate.result: Use new paths mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Use new paths mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Use new paths mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Use new paths mysql-test/suite/binlog/t/binlog_killed.test: Use new paths mysql-test/suite/binlog/t/binlog_killed_simulate.test: Use new paths mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Use new paths mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: Use new paths mysql-test/suite/federated/federated.inc: Use new paths mysql-test/suite/federated/federated.result: Use new paths mysql-test/suite/federated/federated.test: Use new paths mysql-test/suite/federated/federated_archive.result: Use new paths mysql-test/suite/federated/federated_archive.test: Use new paths mysql-test/suite/federated/federated_bug_13118.result: Use new paths mysql-test/suite/federated/federated_bug_13118.test: Use new paths mysql-test/suite/federated/federated_bug_25714.result: Use new paths mysql-test/suite/federated/federated_bug_25714.test: Use new paths mysql-test/suite/federated/federated_innodb.result: Use new paths mysql-test/suite/federated/federated_innodb.test: Use new paths mysql-test/suite/federated/federated_server.result: Use new paths mysql-test/suite/federated/federated_server.test: Use new paths mysql-test/suite/federated/federated_transactions.test: Use new paths mysql-test/suite/federated/have_federated_db.inc: Use new paths mysql-test/suite/ndb/r/loaddata_autocom_ndb.result: Use new paths mysql-test/suite/ndb/r/ndb_config.result: Use new paths mysql-test/suite/ndb/r/ndb_dd_backuprestore.result: Use new paths mysql-test/suite/ndb/r/ndb_load.result: Use new paths mysql-test/suite/ndb/r/ndb_loaddatalocal.result: Use new paths mysql-test/suite/ndb/r/ndb_replace.result: Use new paths mysql-test/suite/ndb/r/ndb_restore.result: Use new paths mysql-test/suite/ndb/r/ndb_restore_partition.result: Use new paths mysql-test/suite/ndb/r/ndb_restore_print.result: Use new paths mysql-test/suite/ndb/r/ndb_trigger.result: Use new paths mysql-test/suite/ndb/t/ndb_alter_table.test: Use new paths mysql-test/suite/ndb/t/ndb_config.test: Use new paths mysql-test/suite/ndb/t/ndb_load.test: Use new paths mysql-test/suite/ndb/t/ndb_loaddatalocal.test: Use new paths mysql-test/suite/ndb/t/ndb_replace.test: Use new paths mysql-test/suite/ndb/t/ndb_restore.test: Use new paths mysql-test/suite/ndb/t/ndb_single_user.test: Use new paths mysql-test/suite/ndb/t/ndb_trigger.test: Use new paths mysql-test/suite/ndb/t/ndbapi.test: Use new paths mysql-test/suite/rpl/include/rpl_mixed_dml.inc: Use new paths mysql-test/suite/rpl/r/rpl_LD_INFILE.result: Use new paths mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Use new paths mysql-test/suite/rpl/r/rpl_innodb.result: Use new paths mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Use new paths mysql-test/suite/rpl/r/rpl_load_table_from_master.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_charset.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_m.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_s.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddata_simple.result: Use new paths mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Use new paths mysql-test/suite/rpl/r/rpl_loadfile.result: Use new paths mysql-test/suite/rpl/r/rpl_misc_functions.result: Use new paths mysql-test/suite/rpl/r/rpl_replicate_do.result: Use new paths mysql-test/suite/rpl/r/rpl_rewrt_db.result: Use new paths mysql-test/suite/rpl/r/rpl_row_001.result: Use new paths mysql-test/suite/rpl/r/rpl_row_loaddata_m.result: Use new paths mysql-test/suite/rpl/r/rpl_row_log.result: Use new paths mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Use new paths mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: Use new paths mysql-test/suite/rpl/r/rpl_stm_000001.result: Use new paths mysql-test/suite/rpl/r/rpl_stm_log.result: Use new paths mysql-test/suite/rpl/r/rpl_timezone.result: Use new paths mysql-test/suite/rpl/t/disabled.def: Use new paths mysql-test/suite/rpl/t/rpl000017-slave.sh: Use new paths mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Use new paths mysql-test/suite/rpl/t/rpl_drop_db.test: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Use new paths mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Use new paths mysql-test/suite/rpl/t/rpl_innodb.test: Use new paths mysql-test/suite/rpl/t/rpl_innodb_bug30919.test: Use new paths mysql-test/suite/rpl/t/rpl_load_from_master.test: Use new paths mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_m.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_s.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Use new paths mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Use new paths mysql-test/suite/rpl/t/rpl_loadfile.test: Use new paths mysql-test/suite/rpl/t/rpl_misc_functions.test: Use new paths mysql-test/suite/rpl/t/rpl_replicate_do.test: Use new paths mysql-test/suite/rpl/t/rpl_rewrt_db.test: Use new paths mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt: Use new paths mysql-test/suite/rpl/t/rpl_rotate_logs.test: Use new paths mysql-test/suite/rpl/t/rpl_row_charset_innodb.test: Use new paths mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Use new paths mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Use new paths mysql-test/suite/rpl/t/rpl_timezone.test: Use new paths mysql-test/suite/rpl/t/rpl_trigger.test: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: Use new paths mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Use new paths mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: Use new paths mysql-test/t/backup.test: Use new paths mysql-test/t/bootstrap.test: Use new paths mysql-test/t/crash_commit_before.test: Use new paths mysql-test/t/create_not_windows.test: Use new paths mysql-test/t/csv.test: Use new paths mysql-test/t/ctype_big5.test: Use new paths mysql-test/t/disabled.def: Use new paths mysql-test/t/distinct.test: Use new paths mysql-test/t/gis.test: Use new paths mysql-test/t/grant_cache_no_prot.test: Use new paths mysql-test/t/grant_cache_ps_prot.test: Use new paths mysql-test/t/information_schema_chmod.test: Use new paths mysql-test/t/loaddata.test: Use new paths mysql-test/t/log_state.test: Use new paths mysql-test/t/myisam-system.test: Use new paths mysql-test/t/mysql_upgrade.test: Use new paths mysql-test/t/mysqlbinlog-cp932.test: Use new paths mysql-test/t/mysqlbinlog.test: Use new paths mysql-test/t/mysqlbinlog2.test: Use new paths mysql-test/t/mysqlbinlog_base64.test: Use new paths mysql-test/t/mysqldump.test: Use new paths mysql-test/t/outfile.test: Use new paths mysql-test/t/partition.test: Use new paths mysql-test/t/partition_error.test: Use new paths mysql-test/t/partition_federated.test: Use new paths mysql-test/t/partition_mgm.test: Use new paths mysql-test/t/partition_not_windows.test: Use new paths mysql-test/t/partition_symlink.test: Use new paths mysql-test/t/query_cache.test: Use new paths mysql-test/t/repair.test: Use new paths mysql-test/t/show_check.test: Use new paths mysql-test/t/sp-destruct.test: Use new paths mysql-test/t/sp.test: Use new paths mysql-test/t/symlink.test: Use new paths mysql-test/t/system_mysql_db.test: Use new paths mysql-test/t/system_mysql_db_fix30020.test: Use new paths mysql-test/t/system_mysql_db_fix40123.test: Use new paths mysql-test/t/system_mysql_db_fix50030.test: Use new paths mysql-test/t/system_mysql_db_fix50117.test: Use new paths mysql-test/t/trigger-compat.test: Use new paths mysql-test/t/trigger-grant.test: Use new paths mysql-test/t/trigger.test: Use new paths mysql-test/t/type_blob.test: Use new paths mysql-test/t/type_varchar.test: Use new paths mysql-test/t/upgrade.test: Use new paths mysql-test/t/user_var-binlog.test: Use new paths mysql-test/t/varbinary.test: Use new paths mysql-test/t/view.test: Use new paths mysql-test/t/warnings.test: Use new paths mysql-test/lib/My/ConfigFactory.pm: Initial version mysql-test/lib/My/Find.pm: Initial version mysql-test/lib/My/SafeProcess.pm: Initial version mysql-test/std_data/ndb_config_config.ini: Add "old" style config.ini for ndb mysql-test/suite/federated/disabled.def: Move disabled federated to it's new suite mysql-test/suite/federated/my.cnf: Add config for federated mysql-test/suite/ndb/my.cnf: Add config for ndb mysql-test/suite/rpl/my.cnf: Add config for rpl mysql-test/suite/rpl/rpl_1slave_base.cnf: Add base config for rpl mysql-test/suite/rpl/t/rpl_000015-master.opt: Use new paths mysql-test/suite/rpl_ndb/my.cnf: Add config for rpl_ndb mysql-test/lib/My/File/Path.pm: Initial version mysql-test/lib/My/SafeProcess/Base.pm: Initial version mysql-test/lib/My/SafeProcess/safe_kill_win.cc: Initial version mysql-test/lib/My/SafeProcess/safe_process.pl: Initial version mysql-test/lib/My/SafeProcess/safe_process_win.cc: Initial version mysql-test/lib/t/Base.t: Initial version mysql-test/lib/t/Find.t: Initial version mysql-test/lib/t/SafeProcess.t: Initial version mysql-test/lib/t/SafeProcessStress.pl: Initial version mysql-test/lib/t/copytree.t: Initial version mysql-test/lib/t/dummyd.pl: Initial version mysql-test/lib/t/rmtree.t: Initial version mysql-test/lib/t/testMyConfig.t: Initial version mysql-test/lib/t/testMyConfigFactory.t: Initial version mysql-test/lib/t/test_child.pl: Initial version mysql-test/include/default_my.cnf: Add default config file used when no suite specific file is found mysql-test/include/default_mysqld.cnf: New BitKeeper file ``mysql-test/include/default_mysqld.cnf'' mysql-test/include/default_ndbd.cnf: Add default settings for all ndbds mysql-test/lib/mtr_settings.pl: Initial version
18 years ago
19 years ago
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC stored function (SF) is called during statement-based replication (SBR). mysql-test/r/func_time.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/gis.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/grant2.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/innodb_notembedded.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/ps.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/query_cache.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/query_cache_notembedded.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/rpl_sp.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Move test for SF-calls in different replication modes to its own file, rpl_sf. mysql-test/r/rpl_sp_effects.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/sp.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/timezone2.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/func_time.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/gis.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/t/grant2.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/innodb_notembedded.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/ps.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/query_cache.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/query_cache_notembedded.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/rpl_sp.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/rpl_sp_effects.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/sp.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/t/timezone2.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). sql/item_func.cc: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR If 'log_bin_trust_function_creators' variable is set, don't throw an error on calling a non-deterministc function in statement-based replication (SBR). sql/sql_parse.cc: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP) while doing statement-based replication (SBR), as the routine body is executed statement-by-statement. mysql-test/r/rpl_sf.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Test for stored function (SF) calls in different replication modes. NON DETERMINISTIC SFs are not allowed while doing statement-based replication (SBR). mysql-test/t/rpl_sf.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Test for stored function (SF) calls in different replication modes. NON DETERMINISTIC SFs are not allowed while doing statement-based replication (SBR).
19 years ago
Patch for the following bugs: - BUG#11986: Stored routines and triggers can fail if the code has a non-ascii symbol - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars - BUG#19443: INFORMATION_SCHEMA does not support charsets properly - BUG#21249: Character set of SP-var can be ignored - BUG#25212: Character set of string constant is ignored (stored routines) - BUG#25221: Character set of string constant is ignored (triggers) There were a few general problems that caused these bugs: 1. Character set information of the original (definition) query for views, triggers, stored routines and events was lost. 2. mysqldump output query in client character set, which can be inappropriate to encode definition-query. 3. INFORMATION_SCHEMA used strings with mixed encodings to display object definition; 1. No query-definition-character set. In order to compile query into execution code, some extra data (such as environment variables or the database character set) is used. The problem here was that this context was not preserved. So, on the next load it can differ from the original one, thus the result will be different. The context contains the following data: - client character set; - connection collation (character set and collation); - collation of the owner database; The fix is to store this context and use it each time we parse (compile) and execute the object (stored routine, trigger, ...). 2. Wrong mysqldump-output. The original query can contain several encodings (by means of character set introducers). The problem here was that we tried to convert original query to the mysqldump-client character set. Moreover, we stored queries in different character sets for different objects (views, for one, used UTF8, triggers used original character set). The solution is - to store definition queries in the original character set; - to change SHOW CREATE statement to output definition query in the binary character set (i.e. without any conversion); - introduce SHOW CREATE TRIGGER statement; - to dump special statements to switch the context to the original one before dumping and restore it afterwards. Note, in order to preserve the database collation at the creation time, additional ALTER DATABASE might be used (to temporary switch the database collation back to the original value). In this case, ALTER DATABASE privilege will be required. This is a backward-incompatible change. 3. INFORMATION_SCHEMA showed non-UTF8 strings The fix is to generate UTF8-query during the parsing, store it in the object and show it in the INFORMATION_SCHEMA. Basically, the idea is to create a copy of the original query convert it to UTF8. Character set introducers are removed and all text literals are converted to UTF8. This UTF8 query is intended to provide user-readable output. It must not be used to recreate the object. Specialized SHOW CREATE statements should be used for this. The reason for this limitation is the following: the original query can contain symbols from several character sets (by means of character set introducers). Example: - original query: CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1; - UTF8 query (for INFORMATION_SCHEMA): CREATE VIEW v1 AS SELECT 'Hello' AS c1; client/mysqldump.c: Set original character set and collation before dumping definition query. include/my_sys.h: Move out-parameter to the end of list. mysql-test/lib/mtr_report.pl: Ignore server-warnings during the test case. mysql-test/r/create.result: Update result file. mysql-test/r/ctype_cp932_binlog_stm.result: Update result file. mysql-test/r/events.result: Update result file. mysql-test/r/events_bugs.result: Update result file. mysql-test/r/events_grant.result: Update result file. mysql-test/r/func_in.result: Update result file. mysql-test/r/gis.result: Update result file. mysql-test/r/grant.result: Update result file. mysql-test/r/information_schema.result: Update result file. mysql-test/r/information_schema_db.result: Update result file. mysql-test/r/lowercase_view.result: Update result file. mysql-test/r/mysqldump.result: Update result file. mysql-test/r/ndb_sp.result: Update result file. mysql-test/r/ps.result: Update result file. mysql-test/r/rpl_replicate_do.result: Update result file. mysql-test/r/rpl_sp.result: Update result file. mysql-test/r/rpl_trigger.result: Update result file. mysql-test/r/rpl_view.result: Update result file. mysql-test/r/show_check.result: Update result file. mysql-test/r/skip_grants.result: Update result file. mysql-test/r/sp-destruct.result: Update result file. mysql-test/r/sp-error.result: Update result file. mysql-test/r/sp-security.result: Update result file. mysql-test/r/sp.result: Update result file. mysql-test/r/sql_mode.result: Update result file. mysql-test/r/system_mysql_db.result: Update result file. mysql-test/r/temp_table.result: Update result file. mysql-test/r/trigger-compat.result: Update result file. mysql-test/r/trigger-grant.result: Update result file. mysql-test/r/trigger.result: Update result file. mysql-test/r/view.result: Update result file. mysql-test/r/view_grant.result: Update result file. mysql-test/t/events.test: Update test case (new columns added). mysql-test/t/information_schema.test: Update test case (new columns added). mysql-test/t/show_check.test: Test case for SHOW CREATE TRIGGER in prepared statements and stored routines. mysql-test/t/sp-destruct.test: Update test case (new columns added). mysql-test/t/sp.test: Update test case (new columns added). mysql-test/t/view.test: Update test. mysys/charset.c: Move out-parameter to the end of list. scripts/mysql_system_tables.sql: Add new columns to mysql.proc and mysql.event. scripts/mysql_system_tables_fix.sql: Add new columns to mysql.proc and mysql.event. sql/event_data_objects.cc: Support new attributes for events. sql/event_data_objects.h: Support new attributes for events. sql/event_db_repository.cc: Support new attributes for events. sql/event_db_repository.h: Support new attributes for events. sql/events.cc: Add new columns to SHOW CREATE event resultset. sql/mysql_priv.h: 1. Introduce Object_creation_ctx; 2. Introduce SHOW CREATE TRIGGER; 3. Introduce auxilary functions. sql/sp.cc: Add support for new store routines attributes. sql/sp_head.cc: Add support for new store routines attributes. sql/sp_head.h: Add support for new store routines attributes. sql/sql_lex.cc: Generate UTF8-body on parsing/lexing. sql/sql_lex.h: 1. Generate UTF8-body on parsing/lexing. 2. Introduce SHOW CREATE TRIGGER. sql/sql_parse.cc: Introduce SHOW CREATE TRIGGER. sql/sql_partition.cc: Update parse_sql(). sql/sql_prepare.cc: Update parse_sql(). sql/sql_show.cc: Support new attributes for views sql/sql_trigger.cc: Support new attributes for views sql/sql_trigger.h: Support new attributes for views sql/sql_view.cc: Support new attributes for views sql/sql_yacc.yy: 1. Add SHOW CREATE TRIGGER statement. 2. Generate UTF8-body for views, stored routines, triggers and events. sql/table.cc: Introduce Object_creation_ctx. sql/table.h: Introduce Object_creation_ctx. sql/share/errmsg.txt: Add new errors. mysql-test/include/ddl_i18n.check_events.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_sp.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_triggers.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_views.inc: Aux file for test suite. mysql-test/include/have_cp1251.inc: Aux file for test suite. mysql-test/include/have_cp866.inc: Aux file for test suite. mysql-test/include/have_koi8r.inc: Aux file for test suite. mysql-test/include/have_utf8.inc: Aux file for test suite. mysql-test/r/ddl_i18n_koi8r.result: Result file. mysql-test/r/ddl_i18n_utf8.result: Result file. mysql-test/r/have_cp1251.require: Aux file for test suite. mysql-test/r/have_cp866.require: Aux file for test suite. mysql-test/r/have_koi8r.require: Aux file for test suite. mysql-test/r/have_utf8.require: Aux file for test suite. mysql-test/t/ddl_i18n_koi8r.test: Complete koi8r test case for the CS patch. mysql-test/t/ddl_i18n_utf8.test: Complete utf8 test case for the CS patch.
19 years ago
Implementation of WL#2897: Complete definer support in the stored routines. The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION statements. Almost all support of definer in stored routines had been already done before this patch. NOTE: this patch changes behaviour of dumping stored routines in mysqldump. Before this patch, mysqldump did not dump DEFINER-clause for stored routines and this was documented behaviour. In order to get full information about stored routines, one should have dumped mysql.proc table. This patch changes this behaviour, so that DEFINER-clause is dumped. Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements before this patch, the clause is covered by additional version-specific comments. client/mysqldump.c: Updated the code for dumping stored routines: cover DEFINER-clause into version-specific comment. mysql-test/r/gis.result: Updated result file after adding DEFINER-clause. mysql-test/r/information_schema.result: Updated result file after adding DEFINER-clause. mysql-test/r/mysqldump.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_ddl.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_sp.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_trigger.result: Updated result file after adding DEFINER-clause. mysql-test/r/sp-security.result: Updated result file after adding DEFINER-clause. mysql-test/r/sp.result: Updated result file after adding DEFINER-clause. mysql-test/r/sql_mode.result: Updated result file after adding DEFINER-clause. mysql-test/t/sp-security.test: Updated result file after adding DEFINER-clause. sql/sp.cc: Added DEFINER-clause. sql/sp_head.cc: Added a new convenient variant of set_definer() operation. sql/sp_head.h: Updated result file after adding DEFINER-clause. sql/sql_lex.h: Renamed trigger_definition_begin into stmt_definition_begin to be used for triggers and stored routines. sql/sql_parse.cc: Check DEFINER-clause. sql/sql_trigger.cc: Renamed trigger_definition_begin into stmt_definition_begin to be used for triggers and stored routines. sql/sql_yacc.yy: Added DEFINER-clause.
20 years ago
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC stored function (SF) is called during statement-based replication (SBR). mysql-test/r/func_time.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/gis.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/grant2.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/innodb_notembedded.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/ps.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/query_cache.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/query_cache_notembedded.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/rpl_sp.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Move test for SF-calls in different replication modes to its own file, rpl_sf. mysql-test/r/rpl_sp_effects.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/r/sp.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/r/timezone2.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/func_time.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/gis.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/t/grant2.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/innodb_notembedded.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/ps.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/query_cache.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/query_cache_notembedded.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/rpl_sp.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/rpl_sp_effects.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). mysql-test/t/sp.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Mark function as DETERMINISTIC so it can be called with no error while doing statement-based replication (SBR). mysql-test/t/timezone2.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Modify test that contains non-deterministic functions so it can still be called with no error while doing statement-based replication (SBR). sql/item_func.cc: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR If 'log_bin_trust_function_creators' variable is set, don't throw an error on calling a non-deterministc function in statement-based replication (SBR). sql/sql_parse.cc: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP) while doing statement-based replication (SBR), as the routine body is executed statement-by-statement. mysql-test/r/rpl_sf.result: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Test for stored function (SF) calls in different replication modes. NON DETERMINISTIC SFs are not allowed while doing statement-based replication (SBR). mysql-test/t/rpl_sf.test: Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR Test for stored function (SF) calls in different replication modes. NON DETERMINISTIC SFs are not allowed while doing statement-based replication (SBR).
19 years ago
Patch for the following bugs: - BUG#11986: Stored routines and triggers can fail if the code has a non-ascii symbol - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars - BUG#19443: INFORMATION_SCHEMA does not support charsets properly - BUG#21249: Character set of SP-var can be ignored - BUG#25212: Character set of string constant is ignored (stored routines) - BUG#25221: Character set of string constant is ignored (triggers) There were a few general problems that caused these bugs: 1. Character set information of the original (definition) query for views, triggers, stored routines and events was lost. 2. mysqldump output query in client character set, which can be inappropriate to encode definition-query. 3. INFORMATION_SCHEMA used strings with mixed encodings to display object definition; 1. No query-definition-character set. In order to compile query into execution code, some extra data (such as environment variables or the database character set) is used. The problem here was that this context was not preserved. So, on the next load it can differ from the original one, thus the result will be different. The context contains the following data: - client character set; - connection collation (character set and collation); - collation of the owner database; The fix is to store this context and use it each time we parse (compile) and execute the object (stored routine, trigger, ...). 2. Wrong mysqldump-output. The original query can contain several encodings (by means of character set introducers). The problem here was that we tried to convert original query to the mysqldump-client character set. Moreover, we stored queries in different character sets for different objects (views, for one, used UTF8, triggers used original character set). The solution is - to store definition queries in the original character set; - to change SHOW CREATE statement to output definition query in the binary character set (i.e. without any conversion); - introduce SHOW CREATE TRIGGER statement; - to dump special statements to switch the context to the original one before dumping and restore it afterwards. Note, in order to preserve the database collation at the creation time, additional ALTER DATABASE might be used (to temporary switch the database collation back to the original value). In this case, ALTER DATABASE privilege will be required. This is a backward-incompatible change. 3. INFORMATION_SCHEMA showed non-UTF8 strings The fix is to generate UTF8-query during the parsing, store it in the object and show it in the INFORMATION_SCHEMA. Basically, the idea is to create a copy of the original query convert it to UTF8. Character set introducers are removed and all text literals are converted to UTF8. This UTF8 query is intended to provide user-readable output. It must not be used to recreate the object. Specialized SHOW CREATE statements should be used for this. The reason for this limitation is the following: the original query can contain symbols from several character sets (by means of character set introducers). Example: - original query: CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1; - UTF8 query (for INFORMATION_SCHEMA): CREATE VIEW v1 AS SELECT 'Hello' AS c1; client/mysqldump.c: Set original character set and collation before dumping definition query. include/my_sys.h: Move out-parameter to the end of list. mysql-test/lib/mtr_report.pl: Ignore server-warnings during the test case. mysql-test/r/create.result: Update result file. mysql-test/r/ctype_cp932_binlog_stm.result: Update result file. mysql-test/r/events.result: Update result file. mysql-test/r/events_bugs.result: Update result file. mysql-test/r/events_grant.result: Update result file. mysql-test/r/func_in.result: Update result file. mysql-test/r/gis.result: Update result file. mysql-test/r/grant.result: Update result file. mysql-test/r/information_schema.result: Update result file. mysql-test/r/information_schema_db.result: Update result file. mysql-test/r/lowercase_view.result: Update result file. mysql-test/r/mysqldump.result: Update result file. mysql-test/r/ndb_sp.result: Update result file. mysql-test/r/ps.result: Update result file. mysql-test/r/rpl_replicate_do.result: Update result file. mysql-test/r/rpl_sp.result: Update result file. mysql-test/r/rpl_trigger.result: Update result file. mysql-test/r/rpl_view.result: Update result file. mysql-test/r/show_check.result: Update result file. mysql-test/r/skip_grants.result: Update result file. mysql-test/r/sp-destruct.result: Update result file. mysql-test/r/sp-error.result: Update result file. mysql-test/r/sp-security.result: Update result file. mysql-test/r/sp.result: Update result file. mysql-test/r/sql_mode.result: Update result file. mysql-test/r/system_mysql_db.result: Update result file. mysql-test/r/temp_table.result: Update result file. mysql-test/r/trigger-compat.result: Update result file. mysql-test/r/trigger-grant.result: Update result file. mysql-test/r/trigger.result: Update result file. mysql-test/r/view.result: Update result file. mysql-test/r/view_grant.result: Update result file. mysql-test/t/events.test: Update test case (new columns added). mysql-test/t/information_schema.test: Update test case (new columns added). mysql-test/t/show_check.test: Test case for SHOW CREATE TRIGGER in prepared statements and stored routines. mysql-test/t/sp-destruct.test: Update test case (new columns added). mysql-test/t/sp.test: Update test case (new columns added). mysql-test/t/view.test: Update test. mysys/charset.c: Move out-parameter to the end of list. scripts/mysql_system_tables.sql: Add new columns to mysql.proc and mysql.event. scripts/mysql_system_tables_fix.sql: Add new columns to mysql.proc and mysql.event. sql/event_data_objects.cc: Support new attributes for events. sql/event_data_objects.h: Support new attributes for events. sql/event_db_repository.cc: Support new attributes for events. sql/event_db_repository.h: Support new attributes for events. sql/events.cc: Add new columns to SHOW CREATE event resultset. sql/mysql_priv.h: 1. Introduce Object_creation_ctx; 2. Introduce SHOW CREATE TRIGGER; 3. Introduce auxilary functions. sql/sp.cc: Add support for new store routines attributes. sql/sp_head.cc: Add support for new store routines attributes. sql/sp_head.h: Add support for new store routines attributes. sql/sql_lex.cc: Generate UTF8-body on parsing/lexing. sql/sql_lex.h: 1. Generate UTF8-body on parsing/lexing. 2. Introduce SHOW CREATE TRIGGER. sql/sql_parse.cc: Introduce SHOW CREATE TRIGGER. sql/sql_partition.cc: Update parse_sql(). sql/sql_prepare.cc: Update parse_sql(). sql/sql_show.cc: Support new attributes for views sql/sql_trigger.cc: Support new attributes for views sql/sql_trigger.h: Support new attributes for views sql/sql_view.cc: Support new attributes for views sql/sql_yacc.yy: 1. Add SHOW CREATE TRIGGER statement. 2. Generate UTF8-body for views, stored routines, triggers and events. sql/table.cc: Introduce Object_creation_ctx. sql/table.h: Introduce Object_creation_ctx. sql/share/errmsg.txt: Add new errors. mysql-test/include/ddl_i18n.check_events.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_sp.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_triggers.inc: Aux file for test suite. mysql-test/include/ddl_i18n.check_views.inc: Aux file for test suite. mysql-test/include/have_cp1251.inc: Aux file for test suite. mysql-test/include/have_cp866.inc: Aux file for test suite. mysql-test/include/have_koi8r.inc: Aux file for test suite. mysql-test/include/have_utf8.inc: Aux file for test suite. mysql-test/r/ddl_i18n_koi8r.result: Result file. mysql-test/r/ddl_i18n_utf8.result: Result file. mysql-test/r/have_cp1251.require: Aux file for test suite. mysql-test/r/have_cp866.require: Aux file for test suite. mysql-test/r/have_koi8r.require: Aux file for test suite. mysql-test/r/have_utf8.require: Aux file for test suite. mysql-test/t/ddl_i18n_koi8r.test: Complete koi8r test case for the CS patch. mysql-test/t/ddl_i18n_utf8.test: Complete utf8 test case for the CS patch.
19 years ago
Bug#28763: Selecting geometry fields in UNION caused server crash. This bug was introduced by the fix for the bug#27300. In this fix a section of code was added to the Item::tmp_table_field_from_field_type method. This section intended to create Field_geom fields for the Item_geometry_func class and its descendants. In order to get the geometry type of the current item it casted "this" to the Item_geometry_func* type. But the Item::tmp_table_field_from_field_type method is also used for creation of fields for UNION and in this case this method is called for an object of the Item_type_holder class and the cast to the Item_geometry_func* type causes a server crash. Now the Item::tmp_table_field_from_field_type method correctly works when it's called for both the Item_type_holder and the Item_geometry_func classes. The new geometry_type variable is added to the Item_type_holder class. The new method called get_geometry_type is added to the Item_field and the Field classes. It returns geometry type from the field for the Item_field and the Field_geom classes and fails an assert for other Field descendants. sql/field.h: Bug#28763: Selecting geometry fields in UNION caused server crash. The new method called get_geometry_type is added to the Field class. It returns geometry type of the field for the Field_geom class and fails an assert for other Field descendants. sql/item.cc: Bug#28763: Selecting geometry fields in UNION caused server crash. Now the Item::tmp_table_field_from_field_type method correctly works when it's called for both the Item_type_holder and the Item_geometry_func classes. mysql-test/r/gis.result: Added a test case for the bug#28763: Selecting geometry fields in UNION caused server crash. mysql-test/t/gis.test: Added a test case for the bug#28763: Selecting geometry fields in UNION caused server crash. sql/item.h: Bug#28763: Selecting geometry fields in UNION caused server crash. The new method called get_geometry_type is added to the Item_field class. It returns geometry type from the field. The new geometry_type variable is added to the Item_type_holder class.
19 years ago
Bug #30825: Problems when putting a non-spatial index on a GIS column Fixed the usage of spatial data (and Point in specific) with non-spatial indexes. Several problems : - The length of the Point class was not updated to include the spatial reference system identifier. Fixed by increasing with 4 bytes. - The storage length of the spatial columns was not accounting for the length that is prepended to it. Fixed by treating the spatial data columns as blobs (and thus increasing the storage length) - When creating the key image for comparison in index read wrong key image was created (the one needed for and r-tree search, not the one for b-tree/other search). Fixed by treating the spatial data columns as blobs (and creating the correct kind of image based on the index type). mysql-test/r/bdb_gis.result: Bug #30825: bdb tests mysql-test/r/gis-rtree.result: Bug #30825: key length changed mysql-test/r/gis.result: Bug #30825: MyISAM tests mysql-test/r/innodb_gis.result: Bug #30825: InnoDB tests mysql-test/t/bdb_gis.test: Bug #30825: bdb tests mysql-test/t/gis.test: Bug #30825: MyISAM tests mysql-test/t/innodb_gis.test: Bug #30825: InnoDB tests sql/field.cc: Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image takes type parameter into consideration and is a superset of Field_geom::get_key_image() sql/field.h: Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image takes type parameter into consideration and is a superset of Field_geom::get_key_image() sql/sql_select.h: Bug #30825: Geometry data are a blob derivate sql/sql_table.cc: Bug #30825: Increased key length to accomodate for spatial reference system identifier (srid) sql/sql_yacc.yy: Bug #30825: Increased key length to accomodate for spatial reference system identifier (srid) sql/table.cc: Bug #30825: It stores a length for spatial data as well, so increase the storage length (as it's done for blobs). mysql-test/include/gis_keys.inc: Bug #30825: Test file for spatial data and non-spatial indexes
18 years ago
Fix for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0". Attempt to create InnoDB table with non-nullable column of geometry type having an unique key with length 12 on it and with some other candidate key led to server crash due to assertion failure in both non-debug and debug builds. The problem was that such a non-candidate key could have been sorted as the first key in table/.FRM, before any legit candidate keys. This resulted in assertion failure in InnoDB engine which assumes that primary key should either be the first key in table/.FRM or should not exist at all. The reason behind such an incorrect sorting was an wrong value of Create_field::key_length member for geometry field (which was set to its pack_length == 12) which confused code in mysql_prepare_create_table(), so it would skip marking such key as a key with partial segments. This patch fixes the problem by ensuring that this member gets the same value of Create_field::key_length member as for other blob fields (from which geometry field class is inherited), and as result unique keys on geometry fields are correctly marked as having partial segments. mysql-test/include/gis_keys.inc: Added test case for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0". mysql-test/r/gis.result: Added test case for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0". mysql-test/suite/innodb/r/innodb_gis.result: Added test case for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0". mysql-test/suite/innodb_plugin/r/innodb_gis.result: Added test case for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0". sql/field.cc: Changed Create_field::create_length_to_internal_length() to correctly set Create_field::key_length member for geometry fields. Similar to the blob types key_length for such fields should be the same as length and not field's packed length (which is always 12 for geometry). As result of this change code handling table creation now always correctly identifies btree/unique keys on geometry fields as partial keys, so such keys can't be erroneously treated as candidate keys and sorted in keys array in .FRM before legit candidate keys. This fixes bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0" in which incorrect candidate key sorting led to assertion failure in InnoDB code.
15 years ago
  1. DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
  2. CREATE TABLE gis_point (fid INTEGER NOT NULL PRIMARY KEY, g POINT);
  3. CREATE TABLE gis_line (fid INTEGER NOT NULL PRIMARY KEY, g LINESTRING);
  4. CREATE TABLE gis_polygon (fid INTEGER NOT NULL PRIMARY KEY, g POLYGON);
  5. CREATE TABLE gis_multi_point (fid INTEGER NOT NULL PRIMARY KEY, g MULTIPOINT);
  6. CREATE TABLE gis_multi_line (fid INTEGER NOT NULL PRIMARY KEY, g MULTILINESTRING);
  7. CREATE TABLE gis_multi_polygon (fid INTEGER NOT NULL PRIMARY KEY, g MULTIPOLYGON);
  8. CREATE TABLE gis_geometrycollection (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRYCOLLECTION);
  9. CREATE TABLE gis_geometry (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY);
  10. SHOW FIELDS FROM gis_point;
  11. Field Type Null Key Default Extra
  12. fid int(11) NO PRI NULL
  13. g point YES NULL
  14. SHOW FIELDS FROM gis_line;
  15. Field Type Null Key Default Extra
  16. fid int(11) NO PRI NULL
  17. g linestring YES NULL
  18. SHOW FIELDS FROM gis_polygon;
  19. Field Type Null Key Default Extra
  20. fid int(11) NO PRI NULL
  21. g polygon YES NULL
  22. SHOW FIELDS FROM gis_multi_point;
  23. Field Type Null Key Default Extra
  24. fid int(11) NO PRI NULL
  25. g multipoint YES NULL
  26. SHOW FIELDS FROM gis_multi_line;
  27. Field Type Null Key Default Extra
  28. fid int(11) NO PRI NULL
  29. g multilinestring YES NULL
  30. SHOW FIELDS FROM gis_multi_polygon;
  31. Field Type Null Key Default Extra
  32. fid int(11) NO PRI NULL
  33. g multipolygon YES NULL
  34. SHOW FIELDS FROM gis_geometrycollection;
  35. Field Type Null Key Default Extra
  36. fid int(11) NO PRI NULL
  37. g geometrycollection YES NULL
  38. SHOW FIELDS FROM gis_geometry;
  39. Field Type Null Key Default Extra
  40. fid int(11) NO PRI NULL
  41. g geometry YES NULL
  42. INSERT INTO gis_point VALUES
  43. (101, PointFromText('POINT(10 10)')),
  44. (102, PointFromText('POINT(20 10)')),
  45. (103, PointFromText('POINT(20 20)')),
  46. (104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
  47. INSERT INTO gis_line VALUES
  48. (105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
  49. (106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
  50. (107, LineStringFromWKB(AsWKB(LineString(Point(10, 10), Point(40, 10)))));
  51. INSERT INTO gis_polygon VALUES
  52. (108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
  53. (109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
  54. (110, PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))));
  55. INSERT INTO gis_multi_point VALUES
  56. (111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
  57. (112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
  58. (113, MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4, 10)))));
  59. INSERT INTO gis_multi_line VALUES
  60. (114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
  61. (115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
  62. (116, MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))));
  63. INSERT INTO gis_multi_polygon VALUES
  64. (117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
  65. (118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
  66. (119, MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
  67. INSERT INTO gis_geometrycollection VALUES
  68. (120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
  69. (121, GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))));
  70. INSERT into gis_geometry SELECT * FROM gis_point;
  71. INSERT into gis_geometry SELECT * FROM gis_line;
  72. INSERT into gis_geometry SELECT * FROM gis_polygon;
  73. INSERT into gis_geometry SELECT * FROM gis_multi_point;
  74. INSERT into gis_geometry SELECT * FROM gis_multi_line;
  75. INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
  76. INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
  77. SELECT fid, AsText(g) FROM gis_point;
  78. fid AsText(g)
  79. 101 POINT(10 10)
  80. 102 POINT(20 10)
  81. 103 POINT(20 20)
  82. 104 POINT(10 20)
  83. SELECT fid, AsText(g) FROM gis_line;
  84. fid AsText(g)
  85. 105 LINESTRING(0 0,0 10,10 0)
  86. 106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
  87. 107 LINESTRING(10 10,40 10)
  88. SELECT fid, AsText(g) FROM gis_polygon;
  89. fid AsText(g)
  90. 108 POLYGON((10 10,20 10,20 20,10 20,10 10))
  91. 109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
  92. 110 POLYGON((0 0,30 0,30 30,0 0))
  93. SELECT fid, AsText(g) FROM gis_multi_point;
  94. fid AsText(g)
  95. 111 MULTIPOINT(0 0,10 10,10 20,20 20)
  96. 112 MULTIPOINT(1 1,11 11,11 21,21 21)
  97. 113 MULTIPOINT(3 6,4 10)
  98. SELECT fid, AsText(g) FROM gis_multi_line;
  99. fid AsText(g)
  100. 114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
  101. 115 MULTILINESTRING((10 48,10 21,10 0))
  102. 116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
  103. SELECT fid, AsText(g) FROM gis_multi_polygon;
  104. fid AsText(g)
  105. 117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
  106. 118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
  107. 119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
  108. SELECT fid, AsText(g) FROM gis_geometrycollection;
  109. fid AsText(g)
  110. 120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
  111. 121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
  112. SELECT fid, AsText(g) FROM gis_geometry;
  113. fid AsText(g)
  114. 101 POINT(10 10)
  115. 102 POINT(20 10)
  116. 103 POINT(20 20)
  117. 104 POINT(10 20)
  118. 105 LINESTRING(0 0,0 10,10 0)
  119. 106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
  120. 107 LINESTRING(10 10,40 10)
  121. 108 POLYGON((10 10,20 10,20 20,10 20,10 10))
  122. 109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
  123. 110 POLYGON((0 0,30 0,30 30,0 0))
  124. 111 MULTIPOINT(0 0,10 10,10 20,20 20)
  125. 112 MULTIPOINT(1 1,11 11,11 21,21 21)
  126. 113 MULTIPOINT(3 6,4 10)
  127. 114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
  128. 115 MULTILINESTRING((10 48,10 21,10 0))
  129. 116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
  130. 117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
  131. 118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
  132. 119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
  133. 120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
  134. 121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
  135. SELECT fid, Dimension(g) FROM gis_geometry;
  136. fid Dimension(g)
  137. 101 0
  138. 102 0
  139. 103 0
  140. 104 0
  141. 105 1
  142. 106 1
  143. 107 1
  144. 108 2
  145. 109 2
  146. 110 2
  147. 111 0
  148. 112 0
  149. 113 0
  150. 114 1
  151. 115 1
  152. 116 1
  153. 117 2
  154. 118 2
  155. 119 2
  156. 120 1
  157. 121 1
  158. SELECT fid, GeometryType(g) FROM gis_geometry;
  159. fid GeometryType(g)
  160. 101 POINT
  161. 102 POINT
  162. 103 POINT
  163. 104 POINT
  164. 105 LINESTRING
  165. 106 LINESTRING
  166. 107 LINESTRING
  167. 108 POLYGON
  168. 109 POLYGON
  169. 110 POLYGON
  170. 111 MULTIPOINT
  171. 112 MULTIPOINT
  172. 113 MULTIPOINT
  173. 114 MULTILINESTRING
  174. 115 MULTILINESTRING
  175. 116 MULTILINESTRING
  176. 117 MULTIPOLYGON
  177. 118 MULTIPOLYGON
  178. 119 MULTIPOLYGON
  179. 120 GEOMETRYCOLLECTION
  180. 121 GEOMETRYCOLLECTION
  181. SELECT fid, IsEmpty(g) FROM gis_geometry;
  182. fid IsEmpty(g)
  183. 101 0
  184. 102 0
  185. 103 0
  186. 104 0
  187. 105 0
  188. 106 0
  189. 107 0
  190. 108 0
  191. 109 0
  192. 110 0
  193. 111 0
  194. 112 0
  195. 113 0
  196. 114 0
  197. 115 0
  198. 116 0
  199. 117 0
  200. 118 0
  201. 119 0
  202. 120 0
  203. 121 0
  204. SELECT fid, AsText(Envelope(g)) FROM gis_geometry;
  205. fid AsText(Envelope(g))
  206. 101 POLYGON((10 10,10 10,10 10,10 10,10 10))
  207. 102 POLYGON((20 10,20 10,20 10,20 10,20 10))
  208. 103 POLYGON((20 20,20 20,20 20,20 20,20 20))
  209. 104 POLYGON((10 20,10 20,10 20,10 20,10 20))
  210. 105 POLYGON((0 0,10 0,10 10,0 10,0 0))
  211. 106 POLYGON((10 10,20 10,20 20,10 20,10 10))
  212. 107 POLYGON((10 10,40 10,40 10,10 10,10 10))
  213. 108 POLYGON((10 10,20 10,20 20,10 20,10 10))
  214. 109 POLYGON((0 0,50 0,50 50,0 50,0 0))
  215. 110 POLYGON((0 0,30 0,30 30,0 30,0 0))
  216. 111 POLYGON((0 0,20 0,20 20,0 20,0 0))
  217. 112 POLYGON((1 1,21 1,21 21,1 21,1 1))
  218. 113 POLYGON((3 6,4 6,4 10,3 10,3 6))
  219. 114 POLYGON((10 0,16 0,16 48,10 48,10 0))
  220. 115 POLYGON((10 0,10 0,10 48,10 48,10 0))
  221. 116 POLYGON((1 2,21 2,21 8,1 8,1 2))
  222. 117 POLYGON((28 0,84 0,84 42,28 42,28 0))
  223. 118 POLYGON((28 0,84 0,84 42,28 42,28 0))
  224. 119 POLYGON((0 0,3 0,3 3,0 3,0 0))
  225. 120 POLYGON((0 0,10 0,10 10,0 10,0 0))
  226. 121 POLYGON((3 6,44 6,44 9,3 9,3 6))
  227. explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry;
  228. id select_type table type possible_keys key key_len ref rows filtered Extra
  229. 1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00
  230. Warnings:
  231. Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry`
  232. SELECT fid, X(g) FROM gis_point;
  233. fid X(g)
  234. 101 10
  235. 102 20
  236. 103 20
  237. 104 10
  238. SELECT fid, Y(g) FROM gis_point;
  239. fid Y(g)
  240. 101 10
  241. 102 10
  242. 103 20
  243. 104 20
  244. explain extended select X(g),Y(g) FROM gis_point;
  245. id select_type table type possible_keys key key_len ref rows filtered Extra
  246. 1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00
  247. Warnings:
  248. Note 1003 select st_x(`test`.`gis_point`.`g`) AS `X(g)`,st_y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point`
  249. SELECT fid, AsText(StartPoint(g)) FROM gis_line;
  250. fid AsText(StartPoint(g))
  251. 105 POINT(0 0)
  252. 106 POINT(10 10)
  253. 107 POINT(10 10)
  254. SELECT fid, AsText(EndPoint(g)) FROM gis_line;
  255. fid AsText(EndPoint(g))
  256. 105 POINT(10 0)
  257. 106 POINT(10 10)
  258. 107 POINT(40 10)
  259. SELECT fid, GLength(g) FROM gis_line;
  260. fid GLength(g)
  261. 105 24.142135623731
  262. 106 40
  263. 107 30
  264. SELECT fid, NumPoints(g) FROM gis_line;
  265. fid NumPoints(g)
  266. 105 3
  267. 106 5
  268. 107 2
  269. SELECT fid, AsText(PointN(g, 2)) FROM gis_line;
  270. fid AsText(PointN(g, 2))
  271. 105 POINT(0 10)
  272. 106 POINT(20 10)
  273. 107 POINT(40 10)
  274. SELECT fid, IsClosed(g) FROM gis_line;
  275. fid IsClosed(g)
  276. 105 0
  277. 106 1
  278. 107 0
  279. explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line;
  280. id select_type table type possible_keys key key_len ref rows filtered Extra
  281. 1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00
  282. Warnings:
  283. Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `GLength(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line`
  284. SELECT fid, AsText(Centroid(g)) FROM gis_polygon;
  285. fid AsText(Centroid(g))
  286. 108 POINT(15 15)
  287. 109 POINT(25.4166666666667 25.4166666666667)
  288. 110 POINT(20 10)
  289. SELECT fid, Area(g) FROM gis_polygon;
  290. fid Area(g)
  291. 108 100
  292. 109 2400
  293. 110 450
  294. SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon;
  295. fid AsText(ExteriorRing(g))
  296. 108 LINESTRING(10 10,20 10,20 20,10 20,10 10)
  297. 109 LINESTRING(0 0,50 0,50 50,0 50,0 0)
  298. 110 LINESTRING(0 0,30 0,30 30,0 0)
  299. SELECT fid, NumInteriorRings(g) FROM gis_polygon;
  300. fid NumInteriorRings(g)
  301. 108 0
  302. 109 1
  303. 110 0
  304. SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon;
  305. fid AsText(InteriorRingN(g, 1))
  306. 108 NULL
  307. 109 LINESTRING(10 10,20 10,20 20,10 20,10 10)
  308. 110 NULL
  309. explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon;
  310. id select_type table type possible_keys key key_len ref rows filtered Extra
  311. 1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00
  312. Warnings:
  313. Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon`
  314. SELECT fid, IsClosed(g) FROM gis_multi_line;
  315. fid IsClosed(g)
  316. 114 0
  317. 115 0
  318. 116 0
  319. SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon;
  320. fid AsText(Centroid(g))
  321. 117 POINT(55.5885277530424 17.426536064114)
  322. 118 POINT(55.5885277530424 17.426536064114)
  323. 119 POINT(2 2)
  324. SELECT fid, Area(g) FROM gis_multi_polygon;
  325. fid Area(g)
  326. 117 1684.5
  327. 118 1684.5
  328. 119 4.5
  329. SELECT fid, NumGeometries(g) from gis_multi_point;
  330. fid NumGeometries(g)
  331. 111 4
  332. 112 4
  333. 113 2
  334. SELECT fid, NumGeometries(g) from gis_multi_line;
  335. fid NumGeometries(g)
  336. 114 2
  337. 115 1
  338. 116 2
  339. SELECT fid, NumGeometries(g) from gis_multi_polygon;
  340. fid NumGeometries(g)
  341. 117 2
  342. 118 2
  343. 119 1
  344. SELECT fid, NumGeometries(g) from gis_geometrycollection;
  345. fid NumGeometries(g)
  346. 120 2
  347. 121 2
  348. explain extended SELECT fid, NumGeometries(g) from gis_multi_point;
  349. id select_type table type possible_keys key key_len ref rows filtered Extra
  350. 1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
  351. Warnings:
  352. Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point`
  353. SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
  354. fid AsText(GeometryN(g, 2))
  355. 111 POINT(10 10)
  356. 112 POINT(11 11)
  357. 113 POINT(4 10)
  358. SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line;
  359. fid AsText(GeometryN(g, 2))
  360. 114 LINESTRING(16 0,16 23,16 48)
  361. 115 NULL
  362. 116 LINESTRING(2 5,5 8,21 7)
  363. SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon;
  364. fid AsText(GeometryN(g, 2))
  365. 117 POLYGON((59 18,67 18,67 13,59 13,59 18))
  366. 118 POLYGON((59 18,67 18,67 13,59 13,59 18))
  367. 119 NULL
  368. SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection;
  369. fid AsText(GeometryN(g, 2))
  370. 120 LINESTRING(0 0,10 10)
  371. 121 LINESTRING(3 6,7 9)
  372. SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection;
  373. fid AsText(GeometryN(g, 1))
  374. 120 POINT(0 0)
  375. 121 POINT(44 6)
  376. explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
  377. id select_type table type possible_keys key key_len ref rows filtered Extra
  378. 1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
  379. Warnings:
  380. Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point`
  381. SELECT g1.fid as first, g2.fid as second,
  382. Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
  383. Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
  384. Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
  385. FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
  386. first second w c o e d t i r
  387. 120 120 1 1 0 1 0 1 1 1
  388. 120 121 0 0 1 0 0 0 1 0
  389. 121 120 0 0 1 0 0 0 1 0
  390. 121 121 1 1 0 1 0 1 1 1
  391. explain extended SELECT g1.fid as first, g2.fid as second,
  392. Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
  393. Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
  394. Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
  395. FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
  396. id select_type table type possible_keys key key_len ref rows filtered Extra
  397. 1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
  398. 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
  399. Warnings:
  400. Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,st_within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,st_contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,mbrequals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
  401. DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
  402. CREATE TABLE t1 (
  403. gp point,
  404. ln linestring,
  405. pg polygon,
  406. mp multipoint,
  407. mln multilinestring,
  408. mpg multipolygon,
  409. gc geometrycollection,
  410. gm geometry
  411. );
  412. SHOW FIELDS FROM t1;
  413. Field Type Null Key Default Extra
  414. gp point YES NULL
  415. ln linestring YES NULL
  416. pg polygon YES NULL
  417. mp multipoint YES NULL
  418. mln multilinestring YES NULL
  419. mpg multipolygon YES NULL
  420. gc geometrycollection YES NULL
  421. gm geometry YES NULL
  422. ALTER TABLE t1 ADD fid INT NOT NULL;
  423. SHOW FIELDS FROM t1;
  424. Field Type Null Key Default Extra
  425. gp point YES NULL
  426. ln linestring YES NULL
  427. pg polygon YES NULL
  428. mp multipoint YES NULL
  429. mln multilinestring YES NULL
  430. mpg multipolygon YES NULL
  431. gc geometrycollection YES NULL
  432. gm geometry YES NULL
  433. fid int(11) NO NULL
  434. DROP TABLE t1;
  435. SELECT AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))));
  436. AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))))
  437. POINT(1 4)
  438. explain extended SELECT AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))));
  439. id select_type table type possible_keys key key_len ref rows filtered Extra
  440. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
  441. Warnings:
  442. Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))))`
  443. explain extended SELECT AsText(GeometryFromWKB(AsWKB(PointFromText('POINT(1 4)'))));
  444. id select_type table type possible_keys key key_len ref rows filtered Extra
  445. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
  446. Warnings:
  447. Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `AsText(GeometryFromWKB(AsWKB(PointFromText('POINT(1 4)'))))`
  448. SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
  449. SRID(GeomFromText('LineString(1 1,2 2)',101))
  450. 101
  451. explain extended SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
  452. id select_type table type possible_keys key key_len ref rows filtered Extra
  453. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
  454. Warnings:
  455. Note 1003 select srid(st_geometryfromtext('LineString(1 1,2 2)',101)) AS `SRID(GeomFromText('LineString(1 1,2 2)',101))`
  456. explain extended select issimple(MultiPoint(Point(3, 6), Point(4, 10))), issimple(Point(3, 6));
  457. id select_type table type possible_keys key key_len ref rows filtered Extra
  458. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
  459. Warnings:
  460. Note 1003 select st_issimple(st_multipoint(st_point(3,6),st_point(4,10))) AS `issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(st_point(3,6)) AS `issimple(Point(3, 6))`
  461. create table t1 (a geometry not null);
  462. insert into t1 values (GeomFromText('Point(1 2)'));
  463. insert into t1 values ('Garbage');
  464. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  465. insert IGNORE into t1 values ('Garbage');
  466. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  467. alter table t1 add spatial index(a);
  468. drop table t1;
  469. create table t1(a geometry not null, spatial index(a));
  470. insert into t1 values
  471. (GeomFromText('POINT(1 1)')), (GeomFromText('POINT(3 3)')),
  472. (GeomFromText('POINT(4 4)')), (GeomFromText('POINT(6 6)'));
  473. select AsText(a) from t1 where
  474. MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a)
  475. or
  476. MBRContains(GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a);
  477. AsText(a)
  478. POINT(1 1)
  479. POINT(3 3)
  480. POINT(4 4)
  481. select AsText(a) from t1 where
  482. MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a)
  483. and
  484. MBRContains(GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a);
  485. AsText(a)
  486. POINT(1 1)
  487. drop table t1;
  488. CREATE TABLE t1 (Coordinates POINT NOT NULL, SPATIAL INDEX(Coordinates));
  489. INSERT INTO t1 VALUES(GeomFromText('POINT(383293632 1754448)'));
  490. INSERT INTO t1 VALUES(GeomFromText('POINT(564952612 157516260)'));
  491. INSERT INTO t1 VALUES(GeomFromText('POINT(903994614 180726515)'));
  492. INSERT INTO t1 VALUES(GeomFromText('POINT(98128178 141127631)'));
  493. INSERT INTO t1 VALUES(GeomFromText('POINT(862547902 799334546)'));
  494. INSERT INTO t1 VALUES(GeomFromText('POINT(341989013 850270906)'));
  495. INSERT INTO t1 VALUES(GeomFromText('POINT(803302376 93039099)'));
  496. INSERT INTO t1 VALUES(GeomFromText('POINT(857439153 817431356)'));
  497. INSERT INTO t1 VALUES(GeomFromText('POINT(319757546 343162742)'));
  498. INSERT INTO t1 VALUES(GeomFromText('POINT(826341972 717484432)'));
  499. INSERT INTO t1 VALUES(GeomFromText('POINT(305066789 201736238)'));
  500. INSERT INTO t1 VALUES(GeomFromText('POINT(626068992 616241497)'));
  501. INSERT INTO t1 VALUES(GeomFromText('POINT(55789424 755830108)'));
  502. INSERT INTO t1 VALUES(GeomFromText('POINT(802874458 312435220)'));
  503. INSERT INTO t1 VALUES(GeomFromText('POINT(153795660 551723671)'));
  504. INSERT INTO t1 VALUES(GeomFromText('POINT(242207428 537089292)'));
  505. INSERT INTO t1 VALUES(GeomFromText('POINT(553478119 807160039)'));
  506. INSERT INTO t1 VALUES(GeomFromText('POINT(694605552 457472733)'));
  507. INSERT INTO t1 VALUES(GeomFromText('POINT(987886554 792733729)'));
  508. INSERT INTO t1 VALUES(GeomFromText('POINT(598600363 850434457)'));
  509. INSERT INTO t1 VALUES(GeomFromText('POINT(592068275 940589376)'));
  510. INSERT INTO t1 VALUES(GeomFromText('POINT(700705362 395370650)'));
  511. INSERT INTO t1 VALUES(GeomFromText('POINT(33628474 558144514)'));
  512. INSERT INTO t1 VALUES(GeomFromText('POINT(212802006 353386020)'));
  513. INSERT INTO t1 VALUES(GeomFromText('POINT(901307256 39143977)'));
  514. INSERT INTO t1 VALUES(GeomFromText('POINT(70870451 206374045)'));
  515. INSERT INTO t1 VALUES(GeomFromText('POINT(240880214 696939443)'));
  516. INSERT INTO t1 VALUES(GeomFromText('POINT(822615542 296669638)'));
  517. INSERT INTO t1 VALUES(GeomFromText('POINT(452769551 625489999)'));
  518. INSERT INTO t1 VALUES(GeomFromText('POINT(609104858 606565210)'));
  519. INSERT INTO t1 VALUES(GeomFromText('POINT(177213669 851312285)'));
  520. INSERT INTO t1 VALUES(GeomFromText('POINT(143654501 730691787)'));
  521. INSERT INTO t1 VALUES(GeomFromText('POINT(658472325 838260052)'));
  522. INSERT INTO t1 VALUES(GeomFromText('POINT(188164520 646358878)'));
  523. INSERT INTO t1 VALUES(GeomFromText('POINT(630993781 786764883)'));
  524. INSERT INTO t1 VALUES(GeomFromText('POINT(496793334 223062055)'));
  525. INSERT INTO t1 VALUES(GeomFromText('POINT(727354258 197498696)'));
  526. INSERT INTO t1 VALUES(GeomFromText('POINT(618432704 760982731)'));
  527. INSERT INTO t1 VALUES(GeomFromText('POINT(755643210 831234710)'));
  528. INSERT INTO t1 VALUES(GeomFromText('POINT(114368751 656950466)'));
  529. INSERT INTO t1 VALUES(GeomFromText('POINT(870378686 185239202)'));
  530. INSERT INTO t1 VALUES(GeomFromText('POINT(863324511 111258900)'));
  531. INSERT INTO t1 VALUES(GeomFromText('POINT(882178645 685940052)'));
  532. INSERT INTO t1 VALUES(GeomFromText('POINT(407928538 334948195)'));
  533. INSERT INTO t1 VALUES(GeomFromText('POINT(311430051 17033395)'));
  534. INSERT INTO t1 VALUES(GeomFromText('POINT(941513405 488643719)'));
  535. INSERT INTO t1 VALUES(GeomFromText('POINT(868345680 85167906)'));
  536. INSERT INTO t1 VALUES(GeomFromText('POINT(219335507 526818004)'));
  537. INSERT INTO t1 VALUES(GeomFromText('POINT(923427958 407500026)'));
  538. INSERT INTO t1 VALUES(GeomFromText('POINT(173176882 554421738)'));
  539. INSERT INTO t1 VALUES(GeomFromText('POINT(194264908 669970217)'));
  540. INSERT INTO t1 VALUES(GeomFromText('POINT(777483793 921619165)'));
  541. INSERT INTO t1 VALUES(GeomFromText('POINT(867468912 395916497)'));
  542. INSERT INTO t1 VALUES(GeomFromText('POINT(682601897 623112122)'));
  543. INSERT INTO t1 VALUES(GeomFromText('POINT(227151206 796970647)'));
  544. INSERT INTO t1 VALUES(GeomFromText('POINT(280062588 97529892)'));
  545. INSERT INTO t1 VALUES(GeomFromText('POINT(982209849 143387099)'));
  546. INSERT INTO t1 VALUES(GeomFromText('POINT(208788792 864388493)'));
  547. INSERT INTO t1 VALUES(GeomFromText('POINT(829327151 616717329)'));
  548. INSERT INTO t1 VALUES(GeomFromText('POINT(199336688 140757201)'));
  549. INSERT INTO t1 VALUES(GeomFromText('POINT(633750724 140850093)'));
  550. INSERT INTO t1 VALUES(GeomFromText('POINT(629400920 502096404)'));
  551. INSERT INTO t1 VALUES(GeomFromText('POINT(226017998 848736426)'));
  552. INSERT INTO t1 VALUES(GeomFromText('POINT(28914408 149445955)'));
  553. INSERT INTO t1 VALUES(GeomFromText('POINT(256236452 202091290)'));
  554. INSERT INTO t1 VALUES(GeomFromText('POINT(703867693 450501360)'));
  555. INSERT INTO t1 VALUES(GeomFromText('POINT(872061506 481351486)'));
  556. INSERT INTO t1 VALUES(GeomFromText('POINT(372120524 739530418)'));
  557. INSERT INTO t1 VALUES(GeomFromText('POINT(877267982 54722420)'));
  558. INSERT INTO t1 VALUES(GeomFromText('POINT(362642540 104419188)'));
  559. INSERT INTO t1 VALUES(GeomFromText('POINT(851693067 642705127)'));
  560. INSERT INTO t1 VALUES(GeomFromText('POINT(201949080 833902916)'));
  561. INSERT INTO t1 VALUES(GeomFromText('POINT(786092225 410737872)'));
  562. INSERT INTO t1 VALUES(GeomFromText('POINT(698291409 615419376)'));
  563. INSERT INTO t1 VALUES(GeomFromText('POINT(27455201 897628096)'));
  564. INSERT INTO t1 VALUES(GeomFromText('POINT(756176576 661205925)'));
  565. INSERT INTO t1 VALUES(GeomFromText('POINT(38478189 385577496)'));
  566. INSERT INTO t1 VALUES(GeomFromText('POINT(163302328 264496186)'));
  567. INSERT INTO t1 VALUES(GeomFromText('POINT(234313922 192216735)'));
  568. INSERT INTO t1 VALUES(GeomFromText('POINT(413942141 490550373)'));
  569. INSERT INTO t1 VALUES(GeomFromText('POINT(394308025 117809834)'));
  570. INSERT INTO t1 VALUES(GeomFromText('POINT(941051732 266369530)'));
  571. INSERT INTO t1 VALUES(GeomFromText('POINT(599161319 313172256)'));
  572. INSERT INTO t1 VALUES(GeomFromText('POINT(5899948 476429301)'));
  573. INSERT INTO t1 VALUES(GeomFromText('POINT(367894677 368542487)'));
  574. INSERT INTO t1 VALUES(GeomFromText('POINT(580848489 219587743)'));
  575. INSERT INTO t1 VALUES(GeomFromText('POINT(11247614 782797569)'));
  576. drop table t1;
  577. create table t1 select GeomFromWKB(POINT(1,3));
  578. show create table t1;
  579. Table Create Table
  580. t1 CREATE TABLE `t1` (
  581. `GeomFromWKB(POINT(1,3))` geometry DEFAULT NULL
  582. ) ENGINE=MyISAM DEFAULT CHARSET=latin1
  583. drop table t1;
  584. CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo`
  585. geometry NOT NULL default '') ENGINE=MyISAM ;
  586. Warnings:
  587. Warning 1101 BLOB/TEXT column 'geo' can't have a default value
  588. insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363
  589. 36.305435,-114.992394 36.305202,-114.991219 36.305975,-114.991163
  590. 36.306845,-114.989432 36.309452,-114.978275 36.312642,-114.977363
  591. 36.311978,-114.975327 36.312344,-114.96502 36.31597,-114.963364
  592. 36.313629,-114.961723 36.313721,-114.956398 36.316057,-114.951882
  593. 36.320979,-114.947073 36.323475,-114.945207 36.326451,-114.945207
  594. 36.326451,-114.944132 36.326061,-114.94003 36.326588,-114.924017
  595. 36.334484,-114.923281 36.334146,-114.92564 36.331504,-114.94072
  596. 36.319282,-114.945348 36.314812,-114.948091 36.314762,-114.951755
  597. 36.316211,-114.952446 36.313883,-114.952644 36.309488,-114.944725
  598. 36.313083,-114.93706 36.32043,-114.932478 36.323497,-114.924556
  599. 36.327708,-114.922608 36.329715,-114.92009 36.328695,-114.912105
  600. 36.323566,-114.901647 36.317952,-114.897436 36.313968,-114.895344
  601. 36.309573,-114.891699 36.304398,-114.890569 36.303551,-114.886356
  602. 36.302702,-114.885141 36.301351,-114.885709 36.297391,-114.892499
  603. 36.290893,-114.902142 36.288974,-114.904941 36.288838,-114.905308
  604. 36.289845,-114.906325 36.290395,-114.909916 36.289549,-114.914527
  605. 36.287535,-114.918797 36.284423,-114.922982 36.279731,-114.924113
  606. 36.277282,-114.924057 36.275817,-114.927733 36.27053,-114.929354
  607. 36.269029,-114.929354 36.269029,-114.950856 36.268715,-114.950768
  608. 36.264324,-114.960206 36.264293,-114.960301 36.268943,-115.006662
  609. 36.268929,-115.008583 36.265619,-115.00665 36.264247,-115.006659
  610. 36.246873,-115.006659 36.246873,-115.006838 36.247697,-115.010764
  611. 36.247774,-115.015609 36.25113,-115.015765 36.254505,-115.029517
  612. 36.254619,-115.038573 36.249317,-115.038573 36.249317,-115.023403
  613. 36.25841,-115.023873 36.258994,-115.031845 36.259829,-115.03183
  614. 36.261053,-115.025561 36.261095,-115.036417 36.274632,-115.033729
  615. 36.276041,-115.032217 36.274851,-115.029845 36.273959,-115.029934
  616. 36.274966,-115.025763 36.274896,-115.025406 36.281044,-115.028731
  617. 36.284471,-115.036497 36.290377,-115.042071 36.291039,-115.026759
  618. 36.298478,-115.008995 36.301966,-115.006363 36.305435),(-115.079835
  619. 36.244369,-115.079735 36.260186,-115.076435 36.262369,-115.069758
  620. 36.265,-115.070235 36.268757,-115.064542 36.268655,-115.061843
  621. 36.269857,-115.062676 36.270693,-115.06305 36.272344,-115.059051
  622. 36.281023,-115.05918 36.283008,-115.060591 36.285246,-115.061913
  623. 36.290022,-115.062499 36.306353,-115.062499 36.306353,-115.060918
  624. 36.30642,-115.06112 36.289779,-115.05713 36.2825,-115.057314
  625. 36.279446,-115.060779 36.274659,-115.061366 36.27209,-115.057858
  626. 36.26557,-115.055805 36.262883,-115.054688 36.262874,-115.047335
  627. 36.25037,-115.044234 36.24637,-115.052434 36.24047,-115.061734
  628. 36.23507,-115.061934 36.22677,-115.061934 36.22677,-115.061491
  629. 36.225267,-115.062024 36.218194,-115.060134 36.218278,-115.060133
  630. 36.210771,-115.057833 36.210771,-115.057433 36.196271,-115.062233
  631. 36.196271,-115.062233 36.190371,-115.062233 36.190371,-115.065533
  632. 36.190371,-115.071333 36.188571,-115.098331 36.188275,-115.098331
  633. 36.188275,-115.098435 36.237569,-115.097535 36.240369,-115.097535
  634. 36.240369,-115.093235 36.240369,-115.089135 36.240469,-115.083135
  635. 36.240569,-115.083135 36.240569,-115.079835
  636. 36.244369)))')),('85998',GeomFromText('MULTIPOLYGON(((-115.333107
  637. 36.264587,-115.333168 36.280638,-115.333168 36.280638,-115.32226
  638. 36.280643,-115.322538 36.274311,-115.327222 36.274258,-115.32733
  639. 36.263026,-115.330675 36.262984,-115.332132 36.264673,-115.333107
  640. 36.264587),(-115.247239 36.247066,-115.247438 36.218267,-115.247438
  641. 36.218267,-115.278525 36.219263,-115.278525 36.219263,-115.301545
  642. 36.219559,-115.332748 36.219197,-115.332757 36.220041,-115.332757
  643. 36.220041,-115.332895 36.233514,-115.349023 36.233479,-115.351489
  644. 36.234475,-115.353681 36.237021,-115.357106 36.239789,-115.36519
  645. 36.243331,-115.368156 36.243487,-115.367389 36.244902,-115.364553
  646. 36.246014,-115.359219 36.24616,-115.356186 36.248025,-115.353347
  647. 36.248004,-115.350813 36.249507,-115.339673 36.25387,-115.333069
  648. 36.255018,-115.333069 36.255018,-115.333042 36.247767,-115.279039
  649. 36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439
  650. 36.252666,-115.261439 36.247366,-115.247239 36.247066)))'));
  651. select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
  652. t1 where object_id=85998;
  653. object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
  654. 85998 MULTIPOLYGON 1 POINT(115.318773152032 -36.2374728210215)
  655. select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
  656. t1 where object_id=85984;
  657. object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
  658. 85984 MULTIPOLYGON 1 POINT(-114.877871869233 36.3310176346905)
  659. drop table t1;
  660. create table t1 (fl geometry not null);
  661. insert into t1 values (1);
  662. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  663. insert into t1 values (1.11);
  664. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  665. insert into t1 values ("qwerty");
  666. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  667. insert into t1 values (pointfromtext('point(1,1)'));
  668. ERROR 23000: Column 'fl' cannot be null
  669. drop table t1;
  670. select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
  671. (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))))
  672. POINT(10 10)
  673. select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
  674. (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))))
  675. POINT(10 10)
  676. create table t1 (g GEOMETRY);
  677. select * from t1;
  678. Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
  679. def test t1 t1 g g 255 4294967295 0 Y 144 0 63
  680. g
  681. select asbinary(g) from t1;
  682. Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
  683. def asbinary(g) 252 4294967295 0 Y 128 0 63
  684. asbinary(g)
  685. drop table t1;
  686. create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
  687. alter table t1 disable keys;
  688. load data infile '../../std_data/bad_gis_data.dat' into table t1;
  689. ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
  690. alter table t1 enable keys;
  691. drop table t1;
  692. create table t1 (a int, b blob);
  693. insert into t1 values (1, ''), (2, NULL), (3, '1');
  694. select * from t1;
  695. a b
  696. 1
  697. 2 NULL
  698. 3 1
  699. select
  700. geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
  701. aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
  702. envelope(b) IS NULL, startpoint(b) IS NULL, endpoint(b) IS NULL,
  703. exteriorring(b) IS NULL, pointn(b, 1) IS NULL, geometryn(b, 1) IS NULL,
  704. interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, isempty(b) IS NULL,
  705. issimple(b) IS NULL, isclosed(b) IS NULL, dimension(b) IS NULL,
  706. numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
  707. area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
  708. y(b) IS NULL
  709. from t1;
  710. ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
  711. select
  712. within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
  713. equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
  714. intersects(b, b) IS NULL, crosses(b, b) IS NULL
  715. from t1;
  716. within(b, b) IS NULL contains(b, b) IS NULL overlaps(b, b) IS NULL equals(b, b) IS NULL disjoint(b, b) IS NULL touches(b, b) IS NULL intersects(b, b) IS NULL crosses(b, b) IS NULL
  717. 1 1 1 1 1 1 1 1
  718. 1 1 1 1 1 1 1 1
  719. 1 1 1 1 1 1 1 1
  720. select
  721. point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
  722. multilinestring(b) IS NULL, multipolygon(b) IS NULL,
  723. geometrycollection(b) IS NULL
  724. from t1;
  725. ERROR 22007: Illegal non geometric '`test`.`t1`.`b`' value found during parsing
  726. drop table t1;
  727. CREATE TABLE t1(a POINT) ENGINE=MyISAM;
  728. INSERT INTO t1 VALUES (NULL);
  729. SELECT * FROM t1;
  730. a
  731. NULL
  732. DROP TABLE t1;
  733. CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
  734. INSERT INTO `t1` VALUES ('','0000-00-00');
  735. select geomfromtext(col9,col89) as a from t1;
  736. a
  737. NULL
  738. DROP TABLE t1;
  739. CREATE TABLE t1 (
  740. geomdata polygon NOT NULL,
  741. SPATIAL KEY index_geom (geomdata)
  742. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
  743. CREATE TABLE t2 (
  744. geomdata polygon NOT NULL,
  745. SPATIAL KEY index_geom (geomdata)
  746. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED;
  747. CREATE TABLE t3
  748. select
  749. aswkb(ws.geomdata) AS geomdatawkb
  750. from
  751. t1 ws
  752. union
  753. select
  754. aswkb(ws.geomdata) AS geomdatawkb
  755. from
  756. t2 ws;
  757. describe t3;
  758. Field Type Null Key Default Extra
  759. geomdatawkb longblob YES NULL
  760. drop table t1;
  761. drop table t2;
  762. drop table t3;
  763. create table t1(col1 geometry default null,col15 geometrycollection not
  764. null,spatial index(col15),index(col1(15)))engine=myisam;
  765. insert into t1 set col15 = GeomFromText('POINT(6 5)');
  766. insert into t1 set col15 = GeomFromText('POINT(6 5)');
  767. check table t1 extended;
  768. Table Op Msg_type Msg_text
  769. test.t1 check status OK
  770. drop table t1;
  771. End of 4.1 tests
  772. create table t1 (s1 geometry not null,s2 char(100));
  773. create trigger t1_bu before update on t1 for each row set new.s1 = null;
  774. insert into t1 values (null,null);
  775. ERROR 23000: Column 's1' cannot be null
  776. drop table t1;
  777. drop procedure if exists fn3;
  778. create function fn3 () returns point deterministic return GeomFromText("point(1 1)");
  779. show create function fn3;
  780. Function sql_mode Create Function character_set_client collation_connection Database Collation
  781. fn3 CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point
  782. DETERMINISTIC
  783. return GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci
  784. select astext(fn3());
  785. astext(fn3())
  786. POINT(1 1)
  787. drop function fn3;
  788. create table t1(pt POINT);
  789. alter table t1 add primary key pti(pt);
  790. drop table t1;
  791. create table t1(pt GEOMETRY);
  792. alter table t1 add primary key pti(pt);
  793. ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
  794. alter table t1 add primary key pti(pt(20));
  795. drop table t1;
  796. create table t1 select GeomFromText('point(1 1)');
  797. desc t1;
  798. Field Type Null Key Default Extra
  799. GeomFromText('point(1 1)') geometry YES NULL
  800. drop table t1;
  801. create table t1 (g geometry not null);
  802. insert into t1 values(default);
  803. ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
  804. drop table t1;
  805. create table t1 (name VARCHAR(100), square GEOMETRY);
  806. INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
  807. INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
  808. INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
  809. INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
  810. INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
  811. INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
  812. INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
  813. INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
  814. INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
  815. INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
  816. INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
  817. INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
  818. INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
  819. INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
  820. INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
  821. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  822. mbrcontains
  823. center,small
  824. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  825. mbrdisjoint
  826. down3,left3,right3,up3
  827. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  828. mbrequal
  829. center
  830. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  831. mbrintersect
  832. big,center,down,down2,left,left2,right,right2,small,up,up2
  833. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  834. mbroverlaps
  835. down,left,right,up
  836. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  837. mbrtouches
  838. big,center,down,down2,left,left2,right,right2,small,up,up2
  839. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  840. mbrwithin
  841. big,center
  842. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  843. contains
  844. center,small
  845. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  846. disjoint
  847. down3,left3,right3,up3
  848. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  849. equals
  850. center
  851. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  852. intersect
  853. big,center,down,down2,left,left2,right,right2,small,up,up2
  854. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  855. overlaps
  856. down,left,right,up
  857. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  858. touches
  859. big,center,down,down2,left,left2,right,right2,small,up,up2
  860. SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
  861. within
  862. big,center
  863. SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))');
  864. SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))');
  865. SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))');
  866. SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))');
  867. SET @point1 = GeomFromText('POLYGON ((0 0))');
  868. SET @point2 = GeomFromText('POLYGON ((-2 0))');
  869. SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name;
  870. overlaps
  871. SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name;
  872. overlaps
  873. SELECT Overlaps(@horiz1, @vert1) FROM DUAL;
  874. Overlaps(@horiz1, @vert1)
  875. 0
  876. SELECT Overlaps(@horiz1, @horiz2) FROM DUAL;
  877. Overlaps(@horiz1, @horiz2)
  878. 1
  879. SELECT Overlaps(@horiz1, @horiz3) FROM DUAL;
  880. Overlaps(@horiz1, @horiz3)
  881. 0
  882. SELECT Overlaps(@horiz1, @point1) FROM DUAL;
  883. Overlaps(@horiz1, @point1)
  884. 0
  885. SELECT Overlaps(@horiz1, @point2) FROM DUAL;
  886. Overlaps(@horiz1, @point2)
  887. 0
  888. DROP TABLE t1;
  889. create table t1(f1 geometry, f2 point, f3 linestring);
  890. select f1 from t1 union select f1 from t1;
  891. f1
  892. insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'),
  893. GeomFromText('LINESTRING(0 0,1 1,2 2)'));
  894. select AsText(f2),AsText(f3) from t1;
  895. AsText(f2) AsText(f3)
  896. POINT(1 1) LINESTRING(0 0,1 1,2 2)
  897. select AsText(a) from (select f2 as a from t1 union select f3 from t1) t;
  898. AsText(a)
  899. POINT(1 1)
  900. LINESTRING(0 0,1 1,2 2)
  901. create table t2 as select f2 as a from t1 union select f3 from t1;
  902. desc t2;
  903. Field Type Null Key Default Extra
  904. a point YES NULL
  905. select AsText(a) from t2;
  906. AsText(a)
  907. POINT(1 1)
  908. LINESTRING(0 0,1 1,2 2)
  909. drop table t1, t2;
  910. SELECT 1;
  911. 1
  912. 1
  913. CREATE TABLE t1 (p POINT);
  914. CREATE TABLE t2 (p POINT, INDEX(p));
  915. INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
  916. INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
  917. SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
  918. COUNT(*)
  919. 1
  920. EXPLAIN
  921. SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
  922. id select_type table type possible_keys key key_len ref rows Extra
  923. 1 SIMPLE t2 system p NULL NULL NULL 1
  924. SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
  925. COUNT(*)
  926. 1
  927. INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
  928. INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
  929. EXPLAIN
  930. SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
  931. id select_type table type possible_keys key key_len ref rows Extra
  932. 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
  933. SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
  934. COUNT(*)
  935. 2
  936. EXPLAIN
  937. SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
  938. id select_type table type possible_keys key key_len ref rows Extra
  939. 1 SIMPLE t2 ref p p 28 const 1 Using where
  940. SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
  941. COUNT(*)
  942. 2
  943. EXPLAIN
  944. SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
  945. id select_type table type possible_keys key key_len ref rows Extra
  946. 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
  947. SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
  948. COUNT(*)
  949. 2
  950. DROP TABLE t1, t2;
  951. End of 5.0 tests
  952. #
  953. # Test for bug #58650 "Failing assertion: primary_key_no == -1 ||
  954. # primary_key_no == 0".
  955. #
  956. drop table if exists t1;
  957. # The minimal test case.
  958. create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a));
  959. drop table t1;
  960. # The original test case.
  961. create table t1 (a int not null, b linestring not null, unique key b (b(12)));
  962. create unique index a on t1(a);
  963. drop table t1;
  964. create table `t1` (`col002` point)engine=myisam;
  965. insert into t1 values (),(),();
  966. select min(`col002`) from t1 union select `col002` from t1;
  967. min(`col002`)
  968. NULL
  969. drop table t1;
  970. #
  971. # Bug #47780: crash when comparing GIS items from subquery
  972. #
  973. CREATE TABLE t1(a INT, b MULTIPOLYGON);
  974. INSERT INTO t1 VALUES
  975. (0,
  976. GEOMFROMTEXT(
  977. 'multipolygon(((1 2,3 4,5 6,7 8,9 8),(7 6,5 4,3 2,1 2,3 4)))'));
  978. # must not crash
  979. SELECT 1 FROM t1 WHERE a <> (SELECT GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
  980. 1
  981. DROP TABLE t1;
  982. #
  983. # Bug #49250 : spatial btree index corruption and crash
  984. # Part one : spatial syntax check
  985. #
  986. CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL,
  987. SPATIAL INDEX USING BTREE (col1));
  988. ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1))' at line 2
  989. CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL);
  990. CREATE SPATIAL INDEX USING BTREE ON t2(col);
  991. ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1
  992. ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1);
  993. ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1)' at line 1
  994. DROP TABLE t2;
  995. End of 5.0 tests
  996. create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
  997. create view v1 as select * from t1;
  998. desc v1;
  999. Field Type Null Key Default Extra
  1000. f1 tinyint(1) YES NULL
  1001. f2 char(1) YES NULL
  1002. f3 varchar(1) YES NULL
  1003. f4 geometry YES NULL
  1004. f5 datetime YES NULL
  1005. drop view v1;
  1006. drop table t1;
  1007. SELECT MultiPoint(12345,'');
  1008. ERROR 22007: Illegal non geometric '12345' value found during parsing
  1009. SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b));
  1010. ERROR 22007: Illegal non geometric ''00000'' value found during parsing
  1011. #
  1012. # BUG#51875: crash when loading data into geometry function polyfromwkb
  1013. #
  1014. SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
  1015. SET @a=POLYFROMWKB(@a);
  1016. SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
  1017. SET @a=POLYFROMWKB(@a);
  1018. create table t1(a polygon NOT NULL)engine=myisam;
  1019. insert into t1 values (geomfromtext("point(0 1)"));
  1020. insert into t1 values (geomfromtext("point(1 0)"));
  1021. select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
  1022. p
  1023. NULL
  1024. NULL
  1025. drop table t1;
  1026. #
  1027. # Test for bug #59888 "debug assertion when attempt to create spatial index
  1028. # on char > 31 bytes".
  1029. #
  1030. create table t1(a char(32) not null) engine=myisam;
  1031. create spatial index i on t1 (a);
  1032. ERROR 42000: A SPATIAL index may only contain a geometrical type column
  1033. drop table t1;
  1034. End of 5.1 tests
  1035. CREATE TABLE t1(
  1036. col0 BINARY NOT NULL,
  1037. col2 TIMESTAMP,
  1038. SPATIAL INDEX i1 (col0)
  1039. ) ENGINE=MyISAM;
  1040. ERROR 42000: A SPATIAL index may only contain a geometrical type column
  1041. CREATE TABLE t1 (
  1042. col0 BINARY NOT NULL,
  1043. col2 TIMESTAMP
  1044. ) ENGINE=MyISAM;
  1045. CREATE SPATIAL INDEX idx0 ON t1(col0);
  1046. ERROR 42000: A SPATIAL index may only contain a geometrical type column
  1047. ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
  1048. ERROR 42000: A SPATIAL index may only contain a geometrical type column
  1049. CREATE TABLE t2 (
  1050. col0 INTEGER NOT NULL,
  1051. col1 POINT,
  1052. col2 POINT
  1053. );
  1054. CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
  1055. ERROR HY000: Incorrect arguments to SPATIAL INDEX
  1056. CREATE TABLE t3 (
  1057. col0 INTEGER NOT NULL,
  1058. col1 POINT,
  1059. col2 LINESTRING,
  1060. SPATIAL INDEX i1 (col1, col2)
  1061. );
  1062. ERROR HY000: Incorrect arguments to SPATIAL INDEX
  1063. DROP TABLE t1;
  1064. DROP TABLE t2;
  1065. DROP DATABASE IF EXISTS gis_ogs;
  1066. CREATE DATABASE gis_ogs;
  1067. USE gis_ogs;
  1068. #
  1069. # C.3.3.1 Geometry types and functions schema construction
  1070. #
  1071. CREATE TABLE lakes (
  1072. fid INTEGER NOT NULL PRIMARY KEY,
  1073. name CHARACTER VARYING(64),
  1074. shore POLYGON);
  1075. CREATE TABLE road_segments (
  1076. fid INTEGER NOT NULL PRIMARY KEY,
  1077. name CHARACTER VARYING(64),
  1078. aliases CHARACTER VARYING(64),
  1079. num_lanes INTEGER,
  1080. centerline LINESTRING);
  1081. CREATE TABLE divided_routes (
  1082. fid INTEGER NOT NULL PRIMARY KEY,
  1083. name CHARACTER VARYING(64),
  1084. num_lanes INTEGER,
  1085. centerlines MULTILINESTRING);
  1086. CREATE TABLE forests (
  1087. fid INTEGER NOT NULL PRIMARY KEY,
  1088. name CHARACTER VARYING(64),
  1089. boundary MULTIPOLYGON);
  1090. CREATE TABLE bridges (
  1091. fid INTEGER NOT NULL PRIMARY KEY,
  1092. name CHARACTER VARYING(64),
  1093. position POINT);
  1094. CREATE TABLE streams (
  1095. fid INTEGER NOT NULL PRIMARY KEY,
  1096. name CHARACTER VARYING(64),
  1097. centerline LINESTRING);
  1098. CREATE TABLE buildings (
  1099. fid INTEGER NOT NULL PRIMARY KEY,
  1100. address CHARACTER VARYING(64),
  1101. position POINT,
  1102. footprint POLYGON);
  1103. CREATE TABLE ponds (
  1104. fid INTEGER NOT NULL PRIMARY KEY,
  1105. name CHARACTER VARYING(64),
  1106. type CHARACTER VARYING(64),
  1107. shores MULTIPOLYGON);
  1108. CREATE TABLE named_places (
  1109. fid INTEGER NOT NULL PRIMARY KEY,
  1110. name CHARACTER VARYING(64),
  1111. boundary POLYGON);
  1112. CREATE TABLE map_neatlines (
  1113. fid INTEGER NOT NULL PRIMARY KEY,
  1114. neatline POLYGON);
  1115. #
  1116. # C.3.3.2 Geometry types and functions schema data loading
  1117. #
  1118. # Lakes
  1119. INSERT INTO lakes VALUES (
  1120. 101, 'BLUE LAKE',
  1121. PolyFromText(
  1122. 'POLYGON(
  1123. (52 18,66 23,73 9,48 6,52 18),
  1124. (59 18,67 18,67 13,59 13,59 18)
  1125. )',
  1126. 101));
  1127. # Road Segments
  1128. INSERT INTO road_segments VALUES(102, 'Route 5', NULL, 2,
  1129. LineFromText(
  1130. 'LINESTRING( 0 18, 10 21, 16 23, 28 26, 44 31 )' ,101));
  1131. INSERT INTO road_segments VALUES(103, 'Route 5', 'Main Street', 4,
  1132. LineFromText(
  1133. 'LINESTRING( 44 31, 56 34, 70 38 )' ,101));
  1134. INSERT INTO road_segments VALUES(104, 'Route 5', NULL, 2,
  1135. LineFromText(
  1136. 'LINESTRING( 70 38, 72 48 )' ,101));
  1137. INSERT INTO road_segments VALUES(105, 'Main Street', NULL, 4,
  1138. LineFromText(
  1139. 'LINESTRING( 70 38, 84 42 )' ,101));
  1140. INSERT INTO road_segments VALUES(106, 'Dirt Road by Green Forest', NULL,
  1141. 1,
  1142. LineFromText(
  1143. 'LINESTRING( 28 26, 28 0 )',101));
  1144. # DividedRoutes
  1145. INSERT INTO divided_routes VALUES(119, 'Route 75', 4,
  1146. MLineFromText(
  1147. 'MULTILINESTRING((10 48,10 21,10 0),
  1148. (16 0,16 23,16 48))', 101));
  1149. # Forests
  1150. INSERT INTO forests VALUES(109, 'Green Forest',
  1151. MPolyFromText(
  1152. 'MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),
  1153. (52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))',
  1154. 101));
  1155. # Bridges
  1156. INSERT INTO bridges VALUES(110, 'Cam Bridge', PointFromText(
  1157. 'POINT( 44 31 )', 101));
  1158. # Streams
  1159. INSERT INTO streams VALUES(111, 'Cam Stream',
  1160. LineFromText(
  1161. 'LINESTRING( 38 48, 44 41, 41 36, 44 31, 52 18 )', 101));
  1162. INSERT INTO streams VALUES(112, NULL,
  1163. LineFromText(
  1164. 'LINESTRING( 76 0, 78 4, 73 9 )', 101));
  1165. # Buildings
  1166. INSERT INTO buildings VALUES(113, '123 Main Street',
  1167. PointFromText(
  1168. 'POINT( 52 30 )', 101),
  1169. PolyFromText(
  1170. 'POLYGON( ( 50 31, 54 31, 54 29, 50 29, 50 31) )', 101));
  1171. INSERT INTO buildings VALUES(114, '215 Main Street',
  1172. PointFromText(
  1173. 'POINT( 64 33 )', 101),
  1174. PolyFromText(
  1175. 'POLYGON( ( 66 34, 62 34, 62 32, 66 32, 66 34) )', 101));
  1176. # Ponds
  1177. INSERT INTO ponds VALUES(120, NULL, 'Stock Pond',
  1178. MPolyFromText(
  1179. 'MULTIPOLYGON( ( ( 24 44, 22 42, 24 40, 24 44) ),
  1180. ( ( 26 44, 26 40, 28 42, 26 44) ) )', 101));
  1181. # Named Places
  1182. INSERT INTO named_places VALUES(117, 'Ashton',
  1183. PolyFromText(
  1184. 'POLYGON( ( 62 48, 84 48, 84 30, 56 30, 56 34, 62 48) )', 101));
  1185. INSERT INTO named_places VALUES(118, 'Goose Island',
  1186. PolyFromText(
  1187. 'POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )', 101));
  1188. # Map Neatlines
  1189. INSERT INTO map_neatlines VALUES(115,
  1190. PolyFromText(
  1191. 'POLYGON( ( 0 0, 0 48, 84 48, 84 0, 0 0 ) )', 101));
  1192. #
  1193. # C.3.3.3 Geometry types and functions schema test queries
  1194. # Conformance Item T6
  1195. SELECT Dimension(shore)
  1196. FROM lakes
  1197. WHERE name = 'Blue Lake';
  1198. Dimension(shore)
  1199. 2
  1200. # Conformance Item T7
  1201. SELECT GeometryType(centerlines)
  1202. FROM divided_routes
  1203. WHERE name = 'Route 75';
  1204. GeometryType(centerlines)
  1205. MULTILINESTRING
  1206. # Conformance Item T8
  1207. SELECT AsText(boundary)
  1208. FROM named_places
  1209. WHERE name = 'Goose Island';
  1210. AsText(boundary)
  1211. POLYGON((67 13,67 18,59 18,59 13,67 13))
  1212. # Conformance Item T9
  1213. SELECT AsText(PolyFromWKB(AsBinary(boundary),101))
  1214. FROM named_places
  1215. WHERE name = 'Goose Island';
  1216. AsText(PolyFromWKB(AsBinary(boundary),101))
  1217. POLYGON((67 13,67 18,59 18,59 13,67 13))
  1218. # Conformance Item T10
  1219. SELECT SRID(boundary)
  1220. FROM named_places
  1221. WHERE name = 'Goose Island';
  1222. SRID(boundary)
  1223. 101
  1224. # Conformance Item T11
  1225. SELECT IsEmpty(centerline)
  1226. FROM road_segments
  1227. WHERE name = 'Route 5'
  1228. AND aliases = 'Main Street';
  1229. IsEmpty(centerline)
  1230. 0
  1231. # Conformance Item T14
  1232. SELECT AsText(Envelope(boundary))
  1233. FROM named_places
  1234. WHERE name = 'Goose Island';
  1235. AsText(Envelope(boundary))
  1236. POLYGON((59 13,67 13,67 18,59 18,59 13))
  1237. # Conformance Item T15
  1238. SELECT X(position)
  1239. FROM bridges
  1240. WHERE name = 'Cam Bridge';
  1241. X(position)
  1242. 44
  1243. # Conformance Item T16
  1244. SELECT Y(position)
  1245. FROM bridges
  1246. WHERE name = 'Cam Bridge';
  1247. Y(position)
  1248. 31
  1249. # Conformance Item T17
  1250. SELECT AsText(StartPoint(centerline))
  1251. FROM road_segments
  1252. WHERE fid = 102;
  1253. AsText(StartPoint(centerline))
  1254. POINT(0 18)
  1255. # Conformance Item T18
  1256. SELECT AsText(EndPoint(centerline))
  1257. FROM road_segments
  1258. WHERE fid = 102;
  1259. AsText(EndPoint(centerline))
  1260. POINT(44 31)
  1261. # Conformance Item T21
  1262. SELECT GLength(centerline)
  1263. FROM road_segments
  1264. WHERE fid = 106;
  1265. GLength(centerline)
  1266. 26
  1267. # Conformance Item T22
  1268. SELECT NumPoints(centerline)
  1269. FROM road_segments
  1270. WHERE fid = 102;
  1271. NumPoints(centerline)
  1272. 5
  1273. # Conformance Item T23
  1274. SELECT AsText(PointN(centerline, 1))
  1275. FROM road_segments
  1276. WHERE fid = 102;
  1277. AsText(PointN(centerline, 1))
  1278. POINT(0 18)
  1279. # Conformance Item T24
  1280. SELECT AsText(Centroid(boundary))
  1281. FROM named_places
  1282. WHERE name = 'Goose Island';
  1283. AsText(Centroid(boundary))
  1284. POINT(63 15.5)
  1285. # Conformance Item T26
  1286. SELECT Area(boundary)
  1287. FROM named_places
  1288. WHERE name = 'Goose Island';
  1289. Area(boundary)
  1290. 40
  1291. # Conformance Item T27
  1292. SELECT AsText(ExteriorRing(shore))
  1293. FROM lakes
  1294. WHERE name = 'Blue Lake';
  1295. AsText(ExteriorRing(shore))
  1296. LINESTRING(52 18,66 23,73 9,48 6,52 18)
  1297. # Conformance Item T28
  1298. SELECT NumInteriorRings(shore)
  1299. FROM lakes
  1300. WHERE name = 'Blue Lake';
  1301. NumInteriorRings(shore)
  1302. 1
  1303. # Conformance Item T29
  1304. SELECT AsText(InteriorRingN(shore, 1))
  1305. FROM lakes
  1306. WHERE name = 'Blue Lake';
  1307. AsText(InteriorRingN(shore, 1))
  1308. LINESTRING(59 18,67 18,67 13,59 13,59 18)
  1309. # Conformance Item T30
  1310. SELECT NumGeometries(centerlines)
  1311. FROM divided_routes
  1312. WHERE name = 'Route 75';
  1313. NumGeometries(centerlines)
  1314. 2
  1315. # Conformance Item T31
  1316. SELECT AsText(GeometryN(centerlines, 2))
  1317. FROM divided_routes
  1318. WHERE name = 'Route 75';
  1319. AsText(GeometryN(centerlines, 2))
  1320. LINESTRING(16 0,16 23,16 48)
  1321. # Conformance Item T32
  1322. SELECT IsClosed(centerlines)
  1323. FROM divided_routes
  1324. WHERE name = 'Route 75';
  1325. IsClosed(centerlines)
  1326. 0
  1327. # Conformance Item T33
  1328. SELECT GLength(centerlines)
  1329. FROM divided_routes
  1330. WHERE name = 'Route 75';
  1331. GLength(centerlines)
  1332. 96
  1333. # Conformance Item T34
  1334. SELECT AsText(Centroid(shores))
  1335. FROM ponds
  1336. WHERE fid = 120;
  1337. AsText(Centroid(shores))
  1338. POINT(25 42)
  1339. # Conformance Item T36
  1340. SELECT Area(shores)
  1341. FROM ponds
  1342. WHERE fid = 120;
  1343. Area(shores)
  1344. 8
  1345. # Conformance Item T37
  1346. SELECT ST_Equals(boundary,
  1347. PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',1))
  1348. FROM named_places
  1349. WHERE name = 'Goose Island';
  1350. ST_Equals(boundary,
  1351. PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',1))
  1352. 1
  1353. # Conformance Item T38
  1354. SELECT ST_Disjoint(centerlines, boundary)
  1355. FROM divided_routes, named_places
  1356. WHERE divided_routes.name = 'Route 75'
  1357. AND named_places.name = 'Ashton';
  1358. ST_Disjoint(centerlines, boundary)
  1359. 1
  1360. # Conformance Item T39
  1361. SELECT ST_Touches(centerline, shore)
  1362. FROM streams, lakes
  1363. WHERE streams.name = 'Cam Stream'
  1364. AND lakes.name = 'Blue Lake';
  1365. ST_Touches(centerline, shore)
  1366. 1
  1367. # Conformance Item T42
  1368. SELECT Crosses(road_segments.centerline, divided_routes.centerlines)
  1369. FROM road_segments, divided_routes
  1370. WHERE road_segments.fid = 102
  1371. AND divided_routes.name = 'Route 75';
  1372. Crosses(road_segments.centerline, divided_routes.centerlines)
  1373. 1
  1374. # Conformance Item T43
  1375. SELECT ST_Intersects(road_segments.centerline, divided_routes.centerlines)
  1376. FROM road_segments, divided_routes
  1377. WHERE road_segments.fid = 102
  1378. AND divided_routes.name = 'Route 75';
  1379. ST_Intersects(road_segments.centerline, divided_routes.centerlines)
  1380. 1
  1381. # Conformance Item T44
  1382. SELECT ST_Contains(forests.boundary, named_places.boundary)
  1383. FROM forests, named_places
  1384. WHERE forests.name = 'Green Forest'
  1385. AND named_places.name = 'Ashton';
  1386. ST_Contains(forests.boundary, named_places.boundary)
  1387. 0
  1388. # Conformance Item T46
  1389. SELECT ST_Distance(position, boundary)
  1390. FROM bridges, named_places
  1391. WHERE bridges.name = 'Cam Bridge'
  1392. AND named_places.name = 'Ashton';
  1393. ST_Distance(position, boundary)
  1394. 12
  1395. # Conformance Item T48
  1396. SELECT AsText(ST_Difference(named_places.boundary, forests.boundary))
  1397. FROM named_places, forests
  1398. WHERE named_places.name = 'Ashton'
  1399. AND forests.name = 'Green Forest';
  1400. AsText(ST_Difference(named_places.boundary, forests.boundary))
  1401. POLYGON((56 34,62 48,84 48,84 42,56 34))
  1402. SELECT AsText(ST_Union(shore, boundary))
  1403. FROM lakes, named_places
  1404. WHERE lakes.name = 'Blue Lake'
  1405. AND named_places.name = 'Goose Island';
  1406. AsText(ST_Union(shore, boundary))
  1407. POLYGON((48 6,52 18,66 23,73 9,48 6))
  1408. # Conformance Item T50
  1409. SELECT AsText(ST_SymDifference(shore, boundary))
  1410. FROM lakes, named_places
  1411. WHERE lakes.name = 'Blue Lake'
  1412. AND named_places.name = 'Ashton';
  1413. AsText(ST_SymDifference(shore, boundary))
  1414. MULTIPOLYGON(((48 6,52 18,66 23,73 9,48 6),(59 13,59 18,67 18,67 13,59 13)),((56 30,56 34,62 48,84 48,84 30,56 30)))
  1415. # Conformance Item T51
  1416. SELECT count(*)
  1417. FROM buildings, bridges
  1418. WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1;
  1419. count(*)
  1420. 1
  1421. DROP DATABASE gis_ogs;